Classes

Method FTPClient():putFile() Professional

Upload a file to the FTP server.

Syntax
:putFile( <cSourceFileName>, [<cTargetFileName>] ) --> lSuccess
Parameters
<cSourceFileName>
The parameter is a character string with the name of the file to be uploaded to the FTP server. <cSourceFileName> must include the filename plus path information specified relative to the current directory on the local drive. Alternatively, the path may be specified as an absolute path.
<cTargetFileName>
<cTargetFileName> is a character string which specifies the file to be created on the FTP server. The parameter must include the filename plus path information specified relative to the current directory. Alternatively, the path may be specified as an absolute path. <cTargetName> is optional and defaults to the filename portion of the path assigned to <cSourceFileName>.
Return

The method returns .T. (true) when the file could be uploaded to the FTP server, otherwise .F. (false) is returned.

Description

The method :putFile() transfers a file from a local drive to the FTP server. When a connection to the FTP server does not exist, an attempt to establish a connection is made. The file is then transferred to the FTP server. :putFile() can transfer files of arbitrary size.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.