download multiple ftp files

Coding Camel

Member
Joined
May 14, 2013
Messages
19
Programming Experience
1-3
Okay, thanks. I think I figured that out, only one issue now. I can't download multiple files at once using webclient, but I can with downloadfile. I need the program to wait until ALL the files are done downloading, as it will be doing them all at once. I know I can use webclient with multithreading, but it seems very complicated. Is there any way for it to wait until the downloadfile is complete?
 
Last edited:
You can't download multiple files at once using any object, and you need to use multithreading no matter what method you choose. Just put a BackgroundWorker on your form and use that to download files.
 
Okay, well when I use My.Computer.Network.Downloadfile it downloads all the files that are 'out of date' but I need the program to display a message box when its done.
 
Since this is a completely different topic I have split the thread.

Network.Downloadfile will only download one file, to download multiple files you must call it repeatedly. Each time you call that method it creates one WebClient object interally to download that file. DownloadFile method is synchronous (blocking), the call returns when the file download is completed.
 
Yes, that's what I said:
DownloadFile method is synchronous (blocking), the call returns when the file download is completed.
 
Back
Top