FtpGet

The FtpGet method gets a single file from the FTP server.

Syntax:

>>-- myftpobj~FtpGet(localfilename, remotefilename--+----------+--)------><
                                                    +--, mode--+

Arguments:

localfilename

The filename and optional path where the retrieved file will be stored. If the path is not given the file will be placed in the user's current directory.

remotefilename

The filename and optional path to the file to be retrieved. If the path is not given the file will be retrieved from the current directory on the ftp server.

mode

The file transfer mode, either 'ASCII' or 'BINARY'. If the argument is not given the current mode will be used.

Return Values:

A value of 0 indicates successful execution of the method. The value -1 indicates an error. You can get the specific error code by inspection of the method FtpErrno. Possible values:

FTPCOMMAND

The internal FTP command or the arguments to the method are in error.