Appendix: Built-in Scripting Language Example FTPGet Gets a file from a remote server and saves it on the local machine. Syntax FTPGet( strRemoteFile , strLocalFile , numTransferType , numOverwrite ) strRemoteFile The full path and name of the desired file on the remote server, using the syntax "/ file path / file name . extension " . Some FTP servers are case sensitive, so you should always use correct capitalization. strLocalFile The full path and name where you want to save the file on the local machine, using the syntax "C:\ file name . extension " . numTransferType A numeric flag that specifies the file transfer type.
This parameter is optional; if no value is given, then the transfer type is unknown (0) by default. Note: In most cases, you should use option 10 . This automatically detects the format (ASCII or Binary) of the remote file and sets the transfer type accordingly, and it also forces the project to download the file from the actual FTP server rather than from an intervening proxy or cache server. numOverWrite A numeric value that specifies whether the local file (specified by strLocalFile ) may be overwritten if it already exists. This parameter is optional; the default value is 0.
Returned value Page 618 InduSoft Web Studio Tag Name Expression Tag CnfFTP( "ftp.mycompany.com", "admin", "12345", 1 ) // Configures the FTP server using passive mode. Function Group Execution Windows Embedded Thin Client FTPGet FTP Asynchronous Supported Supported Supported 0 Unknown 1 ASCII 2 Binary 10 Unknown, without caching 11 ASCII, without caching 12 Binary, without caching 0 Do not overwrite — return an error if the file already exists. 1 Overwrite. 1 Failed to open FTP connection 0 Success -1 Invalid number of parameters -2 Unknown system error -3 Invalid remote file