Synchronizing folders
Synchronize folders…, under Compare in the Commands menu, compares two folders all the way down, shows every difference, and lets you plan what happens to each before anything is done. Nothing on either side changes until you apply the plan.
What it asks first
- Left, Right
- The two folders, filled in from the panes. The same folder twice, or one inside the other, is refused — also when a link leads there by another path.
- Two files are the same when they match in
- Size and date, Size only, or Contents. Dates within two seconds of each other count as the same. Contents reads both files and takes as long as that does; files of different sizes are never read, and a file that is not downloaded is not fetched to be compared.
- Include hidden files
- Unticked, hidden files are not compared, copied or deleted.
- Only files named
- A pattern such as
*.jpg. Only matching files are compared, in every folder.
The view
The two folders stand side by side with their rows lined up. Where one side does not have an item its half of the row is blank. Folders are a tree: → opens one, ← closes it, and Enter does whichever applies. A folder that only one side has starts closed. Rows that are the same on both sides are left out until ⌘F1 shows them; F10, the view options, holds the same choice.
The narrow column between the two sides is the plan for the row.
→ ← |
Copy to the right, or to the left |
→! ←! |
The copy would put an older file over a newer one |
× |
Delete, on the side it stands beside |
≠ |
The two differ and nothing is planned |
· |
On one side only with nothing planned, or left alone by you |
= |
The same on both sides |
? |
Not compared, or cannot be paired — below |
! alone |
Could not be read |
→14 |
A closed folder: which way its rows go, and how many |
The line under the rows describes the row under the cursor, and the line under that adds up the plan: how many to copy each way, to delete, over a newer file, undecided, and how much there is to copy.
Planning
The view opens with nothing planned.
| F5 | Copy to the right |
| F6 | Copy to the left |
| F8 | Delete |
| F7 | Skip: leave alone |
| Space, Insert | Mark the row, so the keys above act on every marked row |
| F4 | Fill the plan for every row |
| F3 | Compare the row’s two files side by side |
- Setting a folder sets everything in it.
- F8 on a row that only one side has plans to delete it there. Where both sides have it, you are asked which side, once for all the rows chosen.
- F8 on a folder both sides have never deletes the folder: it plans only what that side has in it that the other lacks or has differently.
- A folder that only one side has is deleted as a whole only while everything in it is to be deleted.
Filling the plan
- To the right, To the left
- What the other side is missing is copied to it. What differs there is replaced, whatever its
date, and a row that replaces a newer file is marked
!. What only the other side has is left, unless you tick Also delete what the other side does not have — which is never ticked for you. - Both ways
- What either side is missing is copied to it, and the newer of two files replaces the older. Nothing is deleted. Two files that differ with the same date are left alone, since nothing says which to keep.
- Clear
- Nothing is planned for any row.
- Files that differ
- Newer wins both ways, Replace one way. Leave undecided fills only what is missing and leaves every differing pair for you.
A fill — Clear too — keeps the rows you set yourself unless Replace what was set by hand is ticked. The question has no answer on Enter: press Fill.
What cannot be planned
- A row that could not be read.
- A file on one side against a folder or a link on the other.
- Names that differ only by capitals, where nothing says which belongs with which.
- Another disk mounted inside one of the folders. It is one row, and nothing in it is looked at.
- A pair compared by contents where one file is not downloaded is left alone by every fill; you can still set it yourself.
Applying
F2 asks first, and has no answer on Enter. It says how many files are new, how many are written over and how many are deleted — the last two in red — how many of those written over are newer than what replaces them, how many files will be downloaded first, and what is left alone: pairs that differ with the same date, rows with nothing planned, and rows that cannot be planned.
- What is deleted goes to the Trash.
- Keep replaced files in the Trash, ticked every time the question opens, moves a file to the Trash before it is written over. If it cannot be moved there, it is not written over.
- A volume with no Trash is named in red: what is deleted there is gone for good, and what is written over there is not kept. That is the only case in which either happens.
It runs as one operation you can pause, stop or send to the background. Each row is looked at again as its turn comes: one that has changed since the folders were compared is left alone and counted, never written over or deleted. A folder holding something the comparison did not list — a hidden file, say — is kept with that in it.
When it ends, the view says what was done, compares again and stays open. The journal has every step, and those that were left with the reason. Esc leaves the view, and asks first if anything is planned.