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
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Direction | String | Yes | upload 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 folder | File | Yes | Local folder. | |
| Remote folder | String | Yes | Remote folder. | |
| Session | String | No | transfer | Session name. |
| Pattern | String | No | * | Only files whose names match this wildcard (* and ?); other files are neither copied nor deleted. |
| Include subfolders | Boolean | No | true | Also synchronise sub-folders and their files. |
| Compare | String | No | newer | When 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 extra | Boolean | No | false | Delete files on the target side that are not on the source side; folders are left in place. Not allowed when direction is both. |
| Dry run | Boolean | No | false | Only report what would be copied and deleted; change nothing. |
Outputs
| Output | Type | What it is |
|---|---|---|
| uploaded | Number | Files copied to the server (or that would be, in a dry run). |
| downloaded | Number | Files copied from the server. |
| deleted | Number | Files deleted on the target side. |
| skipped | Number | Source files left alone because the target copy is the same, or, in both directions, because neither copy is newer. |
| details | List | One entry per file: {path, action}; path is relative to the folders, action is upload, download, delete_remote, delete_local, skip or conflict. |