2009-07-30 123 views
0

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 
+0

的可能的複製[如何下載一個HTTP請求多個文件?(http://stackoverflow.com/questions/1041542/how-to-download-multiple-files-with-one- http-request) – Helen 2017-01-23 09:38:34

回答

1

之前我們已經建立了一個需要用戶下載多個文件系統。我們解決它的方式是壓縮服務器端的文件,然後將其作爲單個文件下載。

+0

我不能那麼做。用戶希望下載所有單個文件,而不希望將其解壓縮。 – ant2009 2009-07-30 19:11:37