by Bryan Blake (8 Submissions)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 17th March 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Download and upload files using ftp. Really easy!
API Declarations
You'll need two command buttons: Command1 and Command2 and that's it!
Inet1.AccessType = icUseDefault
Inet1.Protocol = icFTP
Inet1.RemoteHost = "ftp.host.com"
Inet1.RemotePort = "21"
Inet1.Password = "password"
Inet1.UserName = "username"
Inet1.RequestTimeout = "60"
End Sub
Private Sub Command1_Click()
'use to download files to ftp server
strRemote = "index.htm"
strLocal = "index.htm"
Form1.Inet1.Execute , "GET """ & strRemote & """ " & strLocal
End Sub
Private Sub Command2_Click()
'use to upload files to ftp server
strRemote = "index.htm"
strLocal = "index.htm"
Form1.Inet1.Execute , "PUT """ & strLocal & """ " & strRemote
End Sub