This function gives access to ftp servers. This command is used mostly for downloading files using the ftp protocol. Use FTPLastError to check for errors executing this command.
When using the get and put commands, the local_file and remote_file parameters must be valid. For a put command, the command will copy the file at the path given in the local_file parameter to the path given in the remote_file parameter. Note that the remote_file specification should not include any path information. Set the path parameter to the correct path for the file. For get commands, the file at the remote_file location is copied to the file at the local_file location.
For the del command, the file at the remote_file location is deleted.
The dir command returns the directory as a string.
The rename command uses local_file as the old name, and remote_file as the new name.
Parameter: host
Type: string
Description: This is the name or IP
address of host to connect to, such as HomeSeer.com.
Parameter: username
Type: string
Description: This is the username for access to the server.
Parameter: password
Type: string
Description: This is the password for access to the server.
Parameter: command
Type: string
Description: This can be one of the following FTP commands: put,
get, del, dir,
or rename.
Parameter: path
Type: string
Description: This is the path to the file, such as public.
Parameter: local_file
Type: string
Description: This is the file name where the downloaded file will be saved.
Parameter: remote_file
Type: string
Description: This is the name of the file on the remote server to download.
Return value: depends
on command
Type: string
Description: For the dir command, a directory listing is returned.
For all
other commands, if no error occurs an empty string is returned, else an
error message is returned which starts with the text "ERROR".