Using a Script to Connect to a Remote Site

The script below connects the TE to the public GlobalSCAPE FTP server and displays the words Connected OK in a message box after a successful connection.

Set MySite= CreateObject("CuteFTPPro.TEConnection")

MySite.Option ("ThrowError") = False

MySite.Protocol = "FTP"

MySite.Host = "ftp.cuteftp.com"

if cbool(MySite.Connect) then

MsgBox "Connected OK"

else

MsgBox MySite.ErrorDescription

end if

MySite.Disconnect

MySite.Close

 

Save this script in a text editor with a .vbs extension, then double-click the .vbs file to execute the script.

Related Topics

Connecting to a Remote Server (Connect)

Finding a Method Alphabetically

Finding a Method by Category

Finding a Property Alphabetically

Finding a Property by Category