Hello,

I am using the web client to download a file. Which works ok.

However, now I have to download many and the number of files to download will change everyday.

I am not sure how I can get the web client to know which files have been downloaded or not? I was thinking of using a for loop to download each file. But I will never know how many there are to download?

The web client could download the same file twice?

Many thanks for any suggestions,

Code:
Private Sub btnStartDownload_Click(ByVal sender As Object, ByVal e As EventArgs)
 Dim client As New WebClient()
 AddHandler client.DownloadProgressChanged, AddressOf client_DownloadProgressChanged
 AddHandler client.DownloadFileCompleted, AddressOf client_DownloadFileCompleted
 
 ' Starts the download
 client.DownloadFileAsync(New Uri("UrlFilePath"), "DownloadPath")
 
 btnStartDownload.Text = "Download In Process"
 btnStartDownload.Enabled = False
End Sub