Results 1 to 7 of 7

Thread: code for download

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2010
    Posts
    20

    code for download

    Could anyone please show me a simple code for downloading a file from internet with a URL,
    Line by Line with streamreader
    Last edited by Russellhenry23; Jan 20th, 2010 at 07:09 PM.

  2. #2
    Lively Member
    Join Date
    Jan 2010
    Location
    Republic of Macedonia
    Posts
    114

    Re: code for download

    The simplest one:

    Code:
    Dim client As New Net.WebClient
    client.DownloadFile("address", "filename")
    client.Dispose()

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2010
    Posts
    20

    Re: code for download

    LIne by line with steamreader

  4. #4
    Lively Member
    Join Date
    Jan 2010
    Location
    Republic of Macedonia
    Posts
    114

    Re: code for download

    WebClient is just a specific implementation of HTTPWebRequest/Response. Sort of "wrapper" class, so using it is perfectly OK.

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: code for download

    Thread moved from 'Database Development' forum to 'VB.Net' (VB2002 and later) forum.

  6. #6
    Lively Member
    Join Date
    Jan 2010
    Location
    Republic of Macedonia
    Posts
    114

    Re: code for download

    Yep, thanks for moving it to the appropriate forum.

  7. #7

    Re: code for download

    Quote Originally Posted by Russellhenry23 View Post
    LIne by line with steamreader
    Step 1) Download File to specified Location
    Step 2) Open StreamReader onto specified location
    Step 3) Read File
    Step 4) Stop Reading
    Step 5 [optional]) Delete file

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