Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how download file from internet and move it to folder with c#

private void install()
    {
        WebClient webClient = new WebClient();                                                          // Creates a webclient
        webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);                   // Uses the Event Handler to check whether the download is complete
        webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged);  // Uses the Event Handler to check for progress made
        webClient.DownloadFileAsync(new Uri("http://www.com/newfile.zip"), @"C
ewfile.zip");           // Defines the URL and destination directory for the downloaded file
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #download #file #internet #move #folder
ADD COMMENT
Topic
Name
4+6 =