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