|
-
Mar 22nd, 2000, 05:25 AM
#1
Thread Starter
Member
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.
-
Mar 23rd, 2000, 01:23 AM
#2
Thread Starter
Member
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)....
-
Mar 23rd, 2000, 12:35 PM
#3
Lively Member
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
-
Mar 24th, 2000, 05:20 AM
#4
Thread Starter
Member
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
-
Mar 26th, 2000, 12:48 PM
#5
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|