VS 2008 SP1從網絡服務器下載多個文件
我正在使用網絡客戶端下載文件。哪些工作正常。
但是,現在我必須下載許多文件,下載的文件數量每天都會改變。
我不知道如何讓Web客戶端知道哪些文件已被下載或沒有?我正在考慮使用for循環來下載每個文件。但我永遠不知道要下載多少個?
Web客戶端可以下載同一文件兩次?
非常感謝您的任何建議,
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
的可能的複製[如何下載一個HTTP請求多個文件?(http://stackoverflow.com/questions/1041542/how-to-download-multiple-files-with-one- http-request) – Helen 2017-01-23 09:38:34