How to Merge Two Folders on a Mac Without Losing Files

You have two folders with the same name: photos from a trip on your Mac and an older copy on a cloud drive, or a project on your laptop and the version on a USB stick. You want one folder with everything from both. Drag one onto the other's location in the Finder, and the dialog asks whether you want to Replace the folder that's there. Replacing doesn't combine anything: the folder that was there is swapped for the new one, along with every file that only it had.
To merge two folders in the Finder, hold the Option key (⌥) while you drag one folder into the folder that contains the other, then click Merge. The button only appears in some cases. When it doesn't, ditto or rsync in Terminal can merge, and a file manager like Folia Files offers Merge whenever two folders with the same name meet, keeps the newer of two files with the same name and puts what it replaces in the Trash.
Why Replace is the wrong button
When you copy or move a folder to a place that already has a folder with that name, the Finder offers Replace: it keeps the folder you are dragging and removes the one that was there, with its contents. Files that existed only in the old folder are not carried over into the new one.
If you come from Windows, this is the surprise: File Explorer merges two folders with the same name on its own and only asks about files with the same name. The Finder merges only if you ask it to.
Merge folders in the Finder
- Open the folder that contains the destination folder, so you can drop next to it. Don't drop onto the folder itself: the dragged folder would just go inside it.
- Press and hold ⌥ (Option), drag the other folder into that window, and let go.
- In the dialog that says a folder with that name already exists, click Merge.
On the same disk, the Option key makes the Finder copy instead of move, and Merge is offered for a copy: the Finder's “merge or replace” messages all speak of the folder “you're copying”, while its message for a move only asks about replacing. After a merge, the original folder is still where it was: delete it yourself once you have checked the result.
When Merge doesn't appear
Apple's own guide sets two limits:
- Merge appears only if one of the folders contains items that aren't in the other.
- If the folders contain different versions of files with the same name, the only choices are Stop and Replace.
The Finder doesn't let you decide file by file, and it doesn't show you what differs before you choose.
Merge folders in Terminal
Two commands that come with macOS merge folders, without any dialog. Try them on a copy first.
ditto
ditto ~/Desktop/Photos ~/Documents/Photos
When the destination folder already exists, ditto merges the source into it, subfolders included. A file with the same name is overwritten, whichever one is newer, and the overwritten file doesn't go to the Trash.
rsync
rsync -aEuv --dry-run ~/Desktop/Photos/ ~/Documents/Photos/
-acopies subfolders and keeps dates and permissions;-Ealso copies extended attributes, where Finder tags are kept.-uskips a file when the one already in the destination is newer.--dry-runonly lists what would be copied. Run the same command without it to merge.- The slash after the source folder matters: it copies what is in Photos, not the Photos folder itself.
- Leave out
--delete, which removes from the destination whatever isn't in the source.
An older file that rsync replaces is overwritten. Add --backup to keep it, with a ~ at the end of its name.
Merge folders in Folia Files
In Folia Files, you copy or move a folder as in the Finder: drag it to another pane or folder, use ⌘C and ⌘V, or choose File › Copy to Other Pane (F5). When a folder with the same name is already there, a dialog shows both side by side, To Copy and Already There, with the number of items, the date and a Newer badge on the more recent one.

What each button does
- Keep Both is the default button, so ↩ never destroys anything, even if the dialog appears while you are typing elsewhere.
- Merge adds the contents to the existing folder, and subfolders on both sides are merged too. For two files with the same name, the newer one is kept: if it's the incoming file, the older one already there goes to the Trash; if the one already there is as recent or newer, it stays and the incoming one isn't copied.
- Replace swaps the whole folder, but the replaced one goes to the Trash once the new one is fully copied. If the copy fails or you cancel it, the old folder stays where it was.
- Skip leaves this item and goes on with the others; Stop ends the operation.
When two files rather than two folders clash, Merge gives way to If Newer, which replaces only if the item you are copying is newer. When several items clash, the Apply to the … other conflicts checkbox answers them all at once.
Merge works for moves too, not only for copies. Everything goes into the existing folder, then the folder you moved, with any older duplicates left in it, goes to the Trash. Apps and other packages count as single files: their insides are never merged.
A few rules protect the rest.
- A merge never deletes a file outright: if one can't go to the Trash, as on some network drives, it stays where it is and Folia Files tells you.
- Your disks, your home folder and the folders of macOS are never replaced: choose Replace and Folia Files suggests Merge or Keep Both instead.
- A merge onto an external drive or a server that is cut off halfway can be resumed where it stopped.
One thing a merge doesn't do: it can't be undone with ⌘Z, but every file it replaced is in the Trash. The page on safe copies and history covers the rest. All of this is in both editions of Folia Files, the one from the website and the one from the Mac App Store.
See the differences before you merge
In a merge, “newer” only means a later modification date: a file saved again more recently wins, even if it isn't the version you meant to keep. So it's worth looking first.
Tools › Compare… (⇧⌘K) compares two folders, subfolders included, and lists every item as Left only, Right only, Different or Identical. Files count as different when their size or date differs; Compare contents (slower, exact) checks every byte. Copy Selection to Right → then copies only what you picked, through the same dialog.

Which method to use
- Files that are only in one folder or the other: ⌥-drag in the Finder, then Merge.
- Files with the same name in both, and you want the newer: rsync with
-u, or Merge in Folia Files, which puts what it replaces in the Trash. - The same two folders, again and again: keep them in sync rather than merging by hand.


