Results 1 to 3 of 3

Thread: website files

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    website files

    Hi,

    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

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    create a loop and count the number up for the file?

    That or I'm sure there is a way to do a directory listing..hmm

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    download

    Thanks for the reply, but my query really is if the files can be generically doenloaded from a website? if so how?
    Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width