How to get the names of files to be downloaded (Using client As New Net.WebClient)

J Trahair

Well-known member
Joined
May 14, 2008
Messages
175
Location
Spain
Programming Experience
10+
Using client As New Net.WebClient: this seems to only download a file whose name you know. Is there a client.DownloadFiles(whatever, whatever, "*.csv")?
Or a strFileNames = client.GetFilesInRemoteFTPFolder(whatever), so I can parse the file names from the result?

Thank you.
 
You would need to use an FtpWebRequest to interact with the FTP server. You could use an FtpWebRequest directly for the download too if you wanted. In fact, that's exactly what the WebClient will do internally for an FTP URL. The WebClient just provides a simplified interface for common operations.
 
Back
Top