Ftp (remote file download problem)
i am using Microsoft Internet Transfer Control 6.0 (MSINET.OCX) in
visual basic 6 with a name Inet1 and trying to download file from my ftp server .
code is given below.
this code do gave any error but also do save the file to my
local computer drive.
any help is highly appericated.
Private Sub cmdcheck_Click()
Inet1.AccessType = icUseDefault
' URL of FTP Site goes here.
Inet1.URL = "ftp://10.132.3.190"
Inet1.UserName = "anonymous"
Inet1.Password = "vbtest@cri.com"
Inet1.RequestTimeout = 40
' GET Command here.
' download welcome.txt and place it on c:\welcome.txt
Inet1.Execute , "GET welcome.txt c:\welcome.txt"
Do While Inet1.StillExecuting
DoEvents
Loop
Inet1.Execute , "CLOSE"
MsgBox ("Download Completed")
End Sub

