Results 1 to 5 of 5

Thread: Inet problem - PLEASE HELP!

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2000
    Posts
    47
    Hi!

    I have VB6 and I am doing an Autoupdate-app. I'm using MS- Internet Transfer Protocol (v.6.0) to download the file. But the problem is that the control downloads the file in some temporary directory which changes too often. Is there any way to download the file (xxx.zip) DIRECT to the appfolder (ie. C:\Myapp)? This is very important because I want to compare the downloaded size with the orginal filesize (to make a download progress bar). Please help me?

    And could somebody say what's wrong with the following code:
    Inet1.Execute "http://www.mysite/~me/hello/app.zip", "GET", "C:\Myapp"
    This code doesn't download the file at all or it doesn't save it in my appfolder.

  2. #2

    Thread Starter
    Member
    Join Date
    Mar 2000
    Posts
    47
    The get-code wont work. Windows copies the file in its temporary direction with 0 bytes and wont move it to myapp-folder? What's wrong? Do I have to change Inet1 setup (password, port, protocol type and so on)....


  3. #3
    Lively Member
    Join Date
    Jan 1999
    Location
    Karjalohja, Finland
    Posts
    123
    Sorry, my fault. My example code not working. Try this:

    Public Sub FtpGetFile()

    Inet1.Execute "http://www.mysite/~me/hello/", "GET app.zip C:\Myapp\app.zip"

    FileTransfer

    End Sub

    If that not working you can try this.

    Public Sub FtpGetFile()

    Dim MyUrl as String
    MyUrl = "http://www.mysite"

    Inet1.URL = MyURL

    Inet1.Execute , "CD ~me\hello"
    Do
    DoEvents
    Loop While Inet1.StillExecuting

    Inet1.Execute , "GET app.zip C:\Myapp\app.zip"

    FileTransfer

    End Sub

    Hope this helps you
    - Dj4

  4. #4

    Thread Starter
    Member
    Join Date
    Mar 2000
    Posts
    47
    Thanks! But still I can't get that working. I have tried over 10 variations of get-code but vb wont download the file at all or it does it in a wrong folder. Do you have someother tip to download a file direct myapp-foler? It's very important that the file dont have to go trough some temporary-directory and then moved to the right folder. Can someone give me a code for that....get-like-codes wont work....

    OpenURL works, but it does downlaod the file in "wrong" way. I want the file be downloaded like in Netscape (direct to the folder) NOT like in Internet Explorer (trough some temp-directory)..


    In advance: Thanks!



    Lare-Mies

  5. #5
    Lively Member
    Join Date
    Jan 1999
    Location
    Karjalohja, Finland
    Posts
    123
    Are you try to change Inet Protocol??

    Like this:
    Inet1.Protocol = icFTP
    Inet1.URL = "www.mysite.???"
    'Add Username and PassWord, if you need.
    Inet1.UserName = "UserName"
    Inet1.Password = "PassWord"

    What IE version you using?. If you using IE5.0, you should upgrade IE5.0 -> 5.01.

    Can you send me example code or what is your e-mail, if I can send you my example code for you.

    - Dj4
    Toinen Suomi Mies ;-)

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