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.

  1. Create the folder C:/FtpServer and inside that folder create the file myDocument.txt.
  2. Set C:/FtpServer as the starting folder on the FTP server.
  3. Start the FTP server.
  4. 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 FTPClientLogic script.

    The files and folders to be transferred are already configured through FileTransferDownload and FileTransferUpload.

    The pages in the project include:

    • FTP client configuration. Allows you to change the configuration parameters of the FTP client. The OverwriteExistingItems switch defines whether an existing file must be overwritten.
    • Transfer files. Shows how to connect and disconnect the FTP client using the ConnectFTPClient and DisconnectFTPClient methods and how to download and upload using the DownloadItem and UploadItem methods.
    • Periodic backup method. Allows you to enable periodic downloading of a given file using the PeriodicActionLogic script. The script is configured with Period set at 30 seconds and Action set to DownloadItem. See Download example.