Skip to main content

Synchronise folders

Make a local and a remote folder match: copy new and changed files one way or both ways, optionally delete files that are no longer on the source side, or only report what would change.

Command in the FTP / SFTP toolkit · id ooa.file_transfer/sync_folder · 9 inputs (3 required), 5 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
DirectionStringYesupload makes the remote folder match the local one, download the other way round; both copies each side's new and newer files to the other.
Local folderFileYesLocal folder.
Remote folderStringYesRemote folder.
SessionStringNotransferSession name.
PatternStringNo*Only files whose names match this wildcard (* and ?); other files are neither copied nor deleted.
Include subfoldersBooleanNotrueAlso synchronise sub-folders and their files.
CompareStringNonewerWhen a file is on both sides, copy it when the source is newer (newer), when the sizes differ (size), or either (both). Times within 2 seconds count as the same; on FTP servers that only give times to the minute, within a minute.
Delete extraBooleanNofalseDelete files on the target side that are not on the source side; folders are left in place. Not allowed when direction is both.
Dry runBooleanNofalseOnly report what would be copied and deleted; change nothing.

Outputs​

OutputTypeWhat it is
uploadedNumberFiles copied to the server (or that would be, in a dry run).
downloadedNumberFiles copied from the server.
deletedNumberFiles deleted on the target side.
skippedNumberSource files left alone because the target copy is the same, or, in both directions, because neither copy is newer.
detailsListOne entry per file: {path, action}; path is relative to the folders, action is upload, download, delete_remote, delete_local, skip or conflict.