Although I’ve been using Macs since late 1984, I still find features in the operating system that surprise me. Recently I discovered that there is a merge function in macOS that makes it simple to merge the content of two folders. See how this tip works to make your file and folder organization a lot easier.
The old way
Here I have two folders that I want to merge. As you can see, some of the files inside both folders are the same, some are different, and some have the same name but different times associated with them. If I wanted to spend some time going through each folder and checking out the file names and times, I could create a temporary folder and do this manually.
That would mean just dragging one copy of the identical files to the temporary folder, getting the newer of the text files and dragging them to the temp folder, and then dragging the unique files in the folders to the temp space. This probably isn’t a bad idea with a couple of folders with few files. But what if you have hundreds of files in each folder?
If I wanted to copy all of the files from Folder 2 into Folder 1, I’d select the Folder 2 files, then drag them over to Folder 1 and drop them. Immediately I’d see a dialog telling me that one of the files already exists in Folder 1…
Skip it?
At this point, I could click on the Skip button, in which case the duplicate file wouldn’t be copied. Immediately, the same dialog would appear for “Keynote-Photo-Collage-2.jpg,” and I’d need to click Skip again. Alternatively, I could check the Apply to All box, which would skip copying any files with identical names. That would also skip copying the Test1 and Test 2 text files, which are not identical, as they have different time stamps.
Clicking Stop interrupts the entire file copy process, which isn’t what I want to do. Replace replaces files with identical file names in Folder 1 with files from Folder 2. This isn’t going to help matters. Because one of the files in Folder 2 is older than the one in Folder 1, we wouldn’t want that file to replace it.
So you see the dilemma. It appears that we either need to manually merge the folders, or click a lot of dialog buttons. But there is another solution!
Merging folders
Here’s the trick that I didn’t know about until a few weeks ago. There is a special way to merge folders that doesn’t copy identical files, and always keeps the newer version of files with the same file name. The trick? Both folders need to have the same name.
Of course, if I’m in Finder and I try to name a folder the same as another one, a dialog tells me that that folder name is already taken:
The trick? The Option key
The workaround is this: Create a temporary folder and drag Folder 1 into it. Now give Folder 2 the new name Folder 1. To merge the folders, hold down the Option key before dragging Folder 2 (now called Folder 1) to the temporary folder. A dialog we haven’t seen before appears:
See the Merge button? If we click it, then the contents of both folders are merged into one “Folder 1.” If there are individual files that are newer than their counterparts in the other folder, they are copied or stay in the combined folder.
Looking in the temporary folder (which kept the original name of “untitled folder”), we now see the merged Folder 1:
You can see that we have only one copy of each file from both folders in the merged folder, and the two test text files are the newest version from either folder.
How to avoid making a temporary folder
There is a way to avoid making a temporary folder to merge a couple of folders with the same name. You simply put one of them on another Mac volume. This can be an external drive, a flash drive, or a server.
After making sure that the folders have the same name on both Mac volumes, hold down the Option key, and drag the one folder onto the other volume. As long as macOS Finder sees two folders with the same name and they’re both going to be in the same volume, you’ll see the Merge button.
Related Topics
The Rocket Yard is filled with thousands of articles to answer your questions or stimulate creativity. You may find these articles to be helpful:
I had this issue where I wanted to combine multiple files from multiple folder in one…
It should be so simple!
So created a super simple MacOS Quick Action, maybe it can help someone else: https:// leofree.gumroad. com/l/combinefolders
This doesn’t work anymore… thanks Apple.
I can do it on my older MacBook air…. but can’t do it on my newer Mac Mini which is on Ventura. Why why why do they always take away the good things and never fix the bad things????
Hi Steve.
Just the other day I saw in some YouTube comments someone dissing macOS for it’s lack of a merge feature in Finder. So I was very interested to see your post.
Question: Is this working for you in macOS 12.x? I’m using 12.6, and was unable to get the mysterious merge button to appear.
Well, I have tried this technique every which way from Sunday and I still cannot get Finder to offer to merge anything. I tried putting a dummy file in. I tried putting the source folder on a different volume. Tried a whole bunch of other key combinations just in case.
How can a feature like this just disappear?
Finder will not present the “Merge” option if the only difference is that the target folder contains a subset of the source folder files but those files are otherwise identical. It will also not offer to “Merge” if the only differences are in sub-folders. Setting aside how dumb this is… You can work around this by introducing a dummy file to the top level of the target folder so that it contains something the source folder does not. This causes Finder to offer to Merge and it will merge sub-folders recursively (supposedly). Remember that it will also leave the dummy file.
THANK YOU!
THANK YOU!!
THANK YOU!!!
This tip saved me many hours of painstaking agony.
Is this tip operating-version dependent?
Thanks,
Jim