This function configures the FTP settings used by other features in the project that can transfer files, such the FTPGet and FTPPut functions.
Function | Group | Execution | Windows | Embedded | Thin Client |
---|---|---|---|---|---|
CnfFTP | FTP | Synchronous | Supported | Supported | Supported |
CnfFTP( strServer, optStrUser, optStrPwn, optNumPassiveMode, optNumPort )
This parameter is optional; if no value is given, then the username "anonymous" is used by default.
This parameter is optional; if no value is given, then the password is left blank.
0 | Passive FTP mode is disabled. |
1 | Passive FTP mode is enabled. |
This parameter is optional; if no value is given, then Passive FTP mode is disabled by default.
This parameter is optional; if no value is given, then port 21 is used by default.
0 | Success |
−1 | Invalid number of parameters |
−2 | Invalid server name |
−3 | Invalid user name |
You must call this function at least once to configure these settings before you can use the FTPGet and FTPPut functions to transfer files.
Tag Name | Expression |
---|---|
Tag | CnfFTP( "ftp.mycompany.com", "admin", "12345", 1 ) // Configures the FTP server using passive mode. |