Skip to content

Synchronise Directory

This task allows you to synchronise a local and remote directory. You can control the direction of the synchronisation, which files will be processed, and how to handle missing files.

Settings

Connection

Required
The connection to the remote server, see Connecting to a Remote Server for details.

Local Directory

Required
The path to the local directory e.g. C:\Users\Zynk\_site.

Remote Directory

Required
The path to the remote directory e.g. /site/wwwroot.

Delete Downloaded Files

Required
Set to True to delete files from the remote directory once they have been downloaded to the local directory. Defaults to False.

This setting will have no effect if the sync direction is set to Remote, as no files will be downloaded.

File Comparison Mode

Required
Determines the way in which the local and remote copy of a file are considered different. Defaults to Time.

  • Time - use the file modification timestamp
  • Size - use the file size
  • Either - check the modification timestamp then size
  • None - Only new files which don't already exist in the target directory are synced

File Mask

Optional
This setting can be used to ensure that only certain files are synchronised, by applying pattern matching to the file names. The following syntax is used:

  • * - Matches any number (including zero) of arbitrary characters. For example, order_*.xml will match the file order_001.xml.
  • ? - Matches exactly one arbitrary character. For example, order_???.xml will match the file order_001.xml.
  • [abc] - Matches one character from the set. For example, order_[0123456789][0123456789][0123456789].xml will match the file order_001.xml.
  • [a-z] - Matches one character from the range. For example, order_[0-9][0-9][0-9].xml will match the file order_001.xml.
  • All other characters are treated literally. To escape the *?[ characters, wrap them in square brackets. For example, order_*[*].xml will match the file order_001*.xml.

Mirror

Required
Set to True to sync in mirror mode, which also syncs older files to the target directory. This option can't be enabled when sync direction is set to Both. Defaults to False.

Remove Files

Required
Set to true to delete files no longer present in the source directory from the target directory. This option can't be enabled when sync direction is set to Both. Defaults to False.

Sync Direction

Required
You can control the direction in which files will be synchronised. Defaults to Remote.

  • Local - apply the changes made to the remote directory to the local directory
  • Remote - apply the changes made to the local directory to the remote directory
  • Both - sync in both directions.

Transfer Mode

Required
Select the transfer mode to use. Selecting automatic will set the transfer mode based on the file extension, so that text based files are transferred in text mode, and other files in binary mode. Defaults to Binary.

  • Binary
  • ASCII
  • Automatic

Zynk Settings

See Common Task Settings