Results 1 to 4 of 4

Thread: downloading a file into a specific folder

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Pittsburgh, PA
    Posts
    329
    i need to download a file from an internet site and save it in a specific folder. how do i do this?
    thanks in advance.

  2. #2
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633
    I can't take credit for the following code because Generation X help me on the same question a month ago.

    But here it is:

    Go up to Project-Component-Microsoft Inet Transfer Control

    Drop it and a command button on your form

    ___________________________________________________
    'PURPOSE: Reset
    Inet1.Cancel ' Stops any current operations
    Inet1.AccessType = icUseDefault

    'PURPOSE: Connect
    Dim byte_binarydata() As Byte
    byte_binarydata() = Inet1.OpenURL(The URL location, icByteArray)

    Open "C:\The name and location" For Binary Access Write As #1
    Put #1, , byte_binarydata()
    Close #1


    ___________________________________________________
    See you

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Pittsburgh, PA
    Posts
    329
    i have the vb learning edition and inet doesn't work. is there some other control or code i could use in its place?

  4. #4
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633
    Can you reference it instead? Go to Project-Reference rather than Components and reference it. Otherwise, if you can't I don't know of anyother method beside Inet control or Winsock Control.

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