GuideHQ

How do I merge two folders without losing files?

Merge combines, replace destroys, skip preserves. What each option actually does to each file, and the safe method for consolidating years of scattered copies.

Difficulty
intermediate
Time
30 min
Read
4 min
Safety
warning

Short answer

Copy one folder onto another and you get a choice. Merge or keep both combines the contents, keeping every file that exists in only one place and asking about the ones that exist in both. Replace, on macOS, deletes the destination folder entirely — this is the one that loses data. Skip keeps the destination version of any clash. When in doubt, copy the source into a new folder alongside, compare, then combine deliberately.

This is where people lose files during a tidy-up, and the reason is that the same word means different things on the two platforms. Windows offers to merge folders and asks per file about clashes. macOS offers Merge only in some circumstances and otherwise offers Replace, which is a folder-level operation and is destructive.

Safety

The dialogue that appears when you copy a folder onto one of the same name offers options that read similarly and behave completely differently. On macOS, choosing Replace deletes the entire destination folder and puts the source in its place, so files that existed only in the destination are gone. Read the wording every time, and never merge folders you have not backed up.
What actually happens when you copy one folder onto another

Step by step

  1. Understand the three outcomes.Files present only in the source: copied across in every option except skip-all. Files present only in the destination: kept by merge, destroyed by a folder-level replace. Files present in both: the option you choose decides which survives, and this is the one that needs thought.
  2. Look at what the dialogue actually says.Windows asks whether to replace files in the destination, skip them, or compare and let you choose — and it merges the folders themselves. macOS, when the folder cannot be merged, offers to replace the whole folder, which is not the same operation at all. Hold the option key on macOS to reveal the merge choice where it is available.
  3. Copy, do not move, while you are working it out.A copy leaves the source intact so a mistake costs disk space rather than data. Delete the source only after you have verified the combined result.
  4. For anything valuable, use the three-folder method.Make a new empty folder. Copy folder A into it. Then copy folder B into it and choose to keep both for any clash, which produces numbered duplicates rather than overwriting. You now have everything, and you can resolve the duplicates deliberately.
  5. Resolve duplicates on content, not on date.The modified date is unreliable after copying between drives and platforms. Compare file size first, then open both if the sizes differ. A duplicate finder that compares contents rather than names is the right tool once the numbers get large.
  6. Beware of same-name, different-content files.This is the case that quietly destroys work: two files called notes.txt or IMG_0001.jpg that are genuinely different. Photo file names in particular repeat constantly between cameras and phones. Always choose keep both when merging photographs from different sources.
  7. Verify by count and size before deleting anything.The combined folder should be at least as large as the larger of the two originals, and its file count should reconcile. If it is smaller, something was overwritten and you should stop and work out what.
  8. Use a synchronising tool for large or repeated merges.File synchronisation software compares two folders, shows you exactly what differs, and lets you decide before it acts. For consolidating years of backups across several drives it is far safer than dragging folders.

If it doesn't work

Files that were in the destination folder have vanished

Cause: A folder-level replace rather than a merge — Fix: Check the recycle bin or trash immediately — on macOS a replaced folder often does not go to the trash, in which case restore from backup. This is the reason the backup matters before a tidy-up.

Merge produced hundreds of files with numbers after their names

Cause: Keep-both applied to every clash — Fix: Working as intended and nothing is lost. Use a content-comparing duplicate finder to remove the true duplicates and inspect the rest.

Copy fails partway with a path too long error

Cause: Nested folders exceeding the traditional path limit after being copied under another folder — Fix: Shorten the parent folder names before copying, or compress the deep structure into an archive and expand it at the destination.

Newer file was overwritten by an older one

Cause: Replace-all chosen without comparing dates — Fix: Restore from backup or from a cloud version history. When the dialogue offers to compare and choose per file, that option exists precisely to prevent this.

Merging across a network or a NAS loses dates or permissions

Cause: The destination file system does not carry the same attributes — Fix: Expect it, and do not rely on modified dates after such a copy. Use a tool that preserves attributes if the dates matter to you.

Questions people ask

Does Windows ever destroy the destination folder?

No — Windows merges folders and only ever replaces individual files, after asking. macOS is the one to be careful with, because its Replace applies at folder level.

What is the safest way to consolidate photographs from several old drives?

Copy everything into one new folder, choosing keep both for every clash, then run a content-based duplicate finder. Photo file names repeat constantly, so any merge that overwrites on name will lose pictures.

Can I undo a merge?

Not as an operation. You can restore individual overwritten files from a backup or a cloud version history if they exist. That is the whole reason to copy rather than move while you are working.

Written and maintained by the GuideHQ editorial team. More in Technology.