Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP progrerss problem

Status
Not open for further replies.

murphyc

Programmer
Sep 6, 2002
25
HK
Inet1.Protocol = icFTP
Inet1.URL = "192.168.0.1"
Inet1.UserName = "update"
Inet1.Password = "update"
Inet1.Execute , "GET update/test.exe c:\pos\test.exe"
MsgBox "Transfer Complete"

How to make sure the file is complete download before display msgbox "Transfer Complete"? (Progress bar??)

Thanks :~/
 

I use 'still executing', when its ready to continue and no errors then complete.

'after execute
Do While Not inetReady
DoEvents
'should probably put something in to exit loop on
'ftp error raised
Loop

Private Function inetReady() As Boolean
inetReady = Not Inet1.StillExecuting
End Function
 
Great, it's work. Thanks

Another question.
How to make a progress bar when i download the file from FTP server?

Thanks a lot
 

I haven't done this but...

I think there is a 'SIZE' ftp command which returns the size of a file, so if you call that first and set the Max property of the progress bar to the filesize.

Then when you have issued your GET command and are in the loop waiting for completion, use the file system object to get the size of the part-downloaded file and set the progress bar Value to the current size of the local document.

Like I say, I haven't done this but it sounds good in theory!

Good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top