FTPPut

Puts a file on a remote server.

Function Group Execution Windows Embedded Thin Client
FTPPut FTP Asynchronous Supported Supported Supported

Syntax

FTPPut( strLocalFile, strRemoteFile, numTransferType )
strLocalFile
Full qualified name of the local file (e.g., "C:\file.extension")
strRemoteFile
Full qualified name of the remote file (e.g., "/Folder/File.extension"). Note that some FTP servers are case sensitive, so you have to enter the name of the file with the correct capitalization.
numTransferType
0 Unknown
1 ASCII
2 Binary

Default is 0.

Returned value

1 Failed to create FTP thread
0 Success
−1 Invalid number of parameters
−2 Unknown system error
−3 Invalid remote file
-4 Invalid local file
-5 Invalid transfer type

Notes

Before you can call this function, you must configure the FTP settings (i.e., server address and login) using the CnfFTP function.

Also, this function is executed asynchronously, so you must call the FTPStatus function to see if the transfer has been completed successfully.

Example

Tag Name Expression
Tag FTPPut("C:\Report.txt", "\Reports\040303.txt") // Retrieves the file C:\Report.txt with the name 040303.txtin the folder Reports in the FTP Server.