Configure periodic file transfer via FTP
Combine FTPClientLogic and PeriodicActionLogix to automate the upload and download of files and folders in a periodic and non-interactive manner. You can use this FTP server configuration to automate file and folder transfers between devices.
- Create the folder C:/FtpServer and inside that folder create the file myDocument.txt.
- Set C:/FtpServer as the starting folder on the FTP server.
- Start the FTP server.
-
To use the FTP server that exists in Template Libraries, see FTP Server configuration, and configure the connection parameters to the FTP server in the
FTPClientLogicscript.The files and folders to be transferred are already configured through
FileTransferDownloadandFileTransferUpload.The pages in the project include:
- FTP client configuration. Allows you to change the configuration parameters of the FTP client. The
OverwriteExistingItemsswitch defines whether an existing file must be overwritten. - Transfer files. Shows how to connect and disconnect the FTP client using the
ConnectFTPClientandDisconnectFTPClientmethods and how to download and upload using theDownloadItemandUploadItemmethods. - Periodic backup method. Allows you to enable periodic downloading of a given file using the
PeriodicActionLogicscript. The script is configured withPeriodset at 30 seconds andActionset to DownloadItem. See Download example.
- FTP client configuration. Allows you to change the configuration parameters of the FTP client. The
