Free

Free coded apps to suit all. No sign up, no email, usable offline, updates when I can, feedback welcome. Send feedback

How-to

Two-way folder sync over FTP, with a preview first

FTP by Zaweba syncs a local folder and a server both ways with Sync set to Both ways (newer wins), and lists every action with a reason before it runs.

Two-way folder sync over FTP, with a preview first

Two-way sync lives in Site > Sync in FTP by Zaweba. Set the direction to Both ways (newer wins), let it compare your local folder with the server, and read the list it gives you. Every planned upload and download has a reason beside it, and nothing moves until you press Run.

Two-way sync is powerful and a little dangerous, so the preview is the part that matters. This page is mostly about reading it well.

What "newer wins" means

In a two-way sync, each file that differs between the two sides goes in one direction or the other. With newer wins, the copy with the later date is treated as the right one. A page you edited on your PC this morning goes up. An image a colleague replaced on the server yesterday comes down. Files that exist on only one side are copied to the other.

That works well when both sides have honest dates. It goes wrong when they don't, for example when the server's clock is out or it works in another time zone. FTP by Zaweba watches for that: when it warns that the server has newer files, it explains each one with both times and the difference, and a whole number of quarter hours apart usually means a clock or time-zone gap rather than a real edit. If you see that, sort out the cause before trusting a two-way run.

Running a two-way sync

Connect to the site and choose Site > Sync. Pick Both ways (newer wins) as the direction. The other choices, Server to local and Local to server, are one-way versions of the same window.

Decide on the options. Include deletions makes the sync remove files from one side when they've gone from the other; you're asked to confirm before anything is deleted. Only download newer protects local files that are newer than the server's. Also download files that are already the same forces a fresh copy even of identical files, which is rarely needed.

Let the comparison finish, then go down the list. Each row says what will happen and why. Untick anything that looks wrong. If you change something on either side while the window is open, press Rescan.

When the list reads right, press Run.

Reading the preview without missing things

Start with the downloads. They're the ones that can replace work on your PC, so make sure each is a file you expect someone else to have changed. Then look at the uploads, which replace what's live.

If you ticked Include deletions, give those rows the most care. A file missing from one side might have been deleted on purpose, or might never have been copied there in the first place. The preview can't know which, but you usually can.

A long list on a site you thought was nearly in step is a warning sign. It often points to a clock difference, an exclusion you forgot, or a folder pointing at the wrong place in Site Manager.

Keeping the noise down

Add folders and files that shouldn't travel to the site's Exclude box, one pattern per line, such as node_modules, *.log or cache/**. Excluded items are never transferred, so they drop out of the preview entirely and the real changes are easier to see.

If something goes the wrong way

Every file overwritten by a download, and every server file overwritten by an upload, has its previous version kept in local version history on your PC. The history window has Compare with current and Restore, so a mistaken run can be undone file by file.

For lighter jobs, FTP by Zaweba has simpler tools. Get Newer from Server and Put Newer to Server each work in one direction and show their list first. Many people use those day to day and keep two-way Sync for catching up after a spell of work on both sides.