CLOSEHOST Close the current FTP connection
As this command does not accept any parameters the parenthesis are optional.
CLOSEHOST will return “OK” if the connection has been closed successfully. If the operation fails it will return an error code. You may retrieve the return value and execute various operations depending on this value. See Error handling.
# Connect to ftp.funet.fi anonymously, download README # and then upload it to ftp.myhost.com # The file will be downloaded to the Windows temp directory LOCALCHDIR("C:\WINDOWS\TEMP") OPENHOST("ftp.funet.fi") GETFILE("README") CLOSEHOST OPENHOST("ftp.myhost.com","myuser","mypassword") PUTFILE("README") CLOSEHOST # Delete the downloaded README file EXEC("del README")