PDA

Click to See Complete Forum and Search --> : Inet problem - PLEASE HELP!


lkivik
Mar 22nd, 2000, 04:25 AM
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.

lkivik
Mar 23rd, 2000, 12:23 AM
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)....

dj4
Mar 23rd, 2000, 11:35 AM
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

lkivik
Mar 24th, 2000, 04:20 AM
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

dj4
Mar 26th, 2000, 11:48 AM
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 ;-)