The following code downloads particular files from a website.
How can I download all files in a particular folder in that web site?
Thanks
Dim strURL As String = "http://www.test.com/images/"
Dim strFileName() As String = {"image1.jpg", "image2.gif"}
Dim strFullPath As String
Dim wc(1) As WebClient
For i As Integer = 0 To 1
wc(i) = New WebClient
strFullPath = strURL & strFileName(i)
wc(i).DownloadFile(strFullPath, "C:\test\Net\VB\Windows\" & strFileName(i))
wc(i).Dispose()
Next
How can I download all files in a particular folder in that web site?
Thanks
Dim strURL As String = "http://www.test.com/images/"
Dim strFileName() As String = {"image1.jpg", "image2.gif"}
Dim strFullPath As String
Dim wc(1) As WebClient
For i As Integer = 0 To 1
wc(i) = New WebClient
strFullPath = strURL & strFileName(i)
wc(i).DownloadFile(strFullPath, "C:\test\Net\VB\Windows\" & strFileName(i))
wc(i).Dispose()
Next