How to Merge Folders on Mac

Untitled Design 1

Anyone who has used a Mac for an extended period of time will have come up against this problem. There are two Finder folders with identical names, and both have a huge number of files. This tutorial shows how to easily merge folders on Mac without losing any files.

Merging Folders on a Mac

Rather than manually moving files from one folder to another and dissecting which file’s a duplicate and which just happens to carry the same name, let your Mac do the heavy lifting.

Name the two folders you want to merge with the same name, but be aware that you will get an error message about the name already being taken.

Macos Error Box Identical Folder Name merge folders on mac

At this point, you will think that you can’t merge them, but hang in there.

Using the Option Key to Merge Folders on a Mac

The secret is to use the Option key on your keyboard to merge folders on your Mac. Follow these steps to merge two folders:

Make a new temporary folder, and move the first folder into the temporary folder. Give the second folder the name of the first one. You won’t be bothered by the pesky error message coming up, as the first folder is inside the temporary folder.

Note: if there are sub-folders involved, they must be named identically in each folder.

Hold down the Option key to move the second folder into the temporary folder.

macOS duplicate folder name error

Click the Merge button, and the two folders will be merged into one when you do.

If your Mac encounters another file with the same name, it will consult the file’s timestamp. It will either create a uniquely named copy of the file with the more recent timestamp, or it will stay in the temporary folder for your review.

In this case, it has left them outside the other folder. The other identical named files with different timestamps have been put into the first folder.

macOS replacement folder

When you examine the duplicates with the different timestamps, you will find it much easier to differentiate between them.

How to Merge Folders on a Mac Using Terminal

If you are more of a Terminal fan, you can easily use it to merge folders on a Mac. It will produce the same end result as above. Provided the two folders have different names, it will put all of the files together but leave the others outside the folder for your review.

Open the Terminal window and type: ditto. Drag the source folder into the Terminal window, followed by the destination folder.

Merge Folders Mac Terminal

Hit Enter to complete the process.

The Manual Method to Merge Folders on a Mac

Prior to the above two methods, you had to merge folders on a Mac manually. Follow along below to see why it’s a less desirable option.

As before, the first folder has various files inside.

Macos Downloads Folder

When you try to add the files from the first folder to the second folder, your Mac will alert you that a file with that same name already exists.

An item with that same name already exists in this location error message with options to Skip, Stop, or Replace.

The problem here is not that the files may be identical in content. The danger is that if they are, the moved file will overwrite the original one. This is a particular danger if you’re dealing with digital photos with file names such as IMG01.JPG.

If you only have a few files, then the solution is simple. Open the files, rename the identical ones, and move the others over. Easy.

But if you have hundreds of files, with most of them having the same name, then the task becomes much more difficult. Obviously, you can’t individually examine each one.

The obvious solution is to merge the folders by using one of the first two options. With those two much easier options, you can avoid the lengthy manual process. There are many other things you can do with Mac Finder folders, too, such as password-locking the folders and even hiding the icons for the folders on your desktop.

Image credit: Canva. All screenshots by Mark O’Neill

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Mark O'Neill

Mark O'Neill is a freelance tech journalist, editor, and bestselling spy fiction author. Originally from Scotland, he now lives in Germany with his wife and his dog.