Puts a file on a remote server.
Function | Group | Execution | Windows | Embedded | Thin Client |
---|---|---|---|---|---|
FTPPut | FTP | Asynchronous | Supported | Supported | Supported |
FTPPut( strLocalFile, strRemoteFile, numTransferType )
0 | Unknown |
1 | ASCII |
2 | Binary |
Default is 0.
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 |
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.
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. |