Home » , , » How to Merge Files with the Same Name into a Single Folder in Mac Finder Using "Keep Both"

How to Merge Files with the Same Name into a Single Folder in Mac Finder Using "Keep Both"

In this example, let’s say you have two folders with contents that share the same name – but the files are different – like 0.png, 1.png, 2.png, etc, thus, you do not want to overwrite any files, you simply want them all to be in the same folder, thereby joining them together and merging the directories into one:

1. Select all files from the source folder, then hold down the “Option / alt” key and drag and drop them into the destination folder (remember, the destination folder has files of the same name)


2. You’ll get a message saying “An item named ‘file’ already exists in this location. Do you want to replace it with the one you’re moving?” – DO NOT choose Replace as it would overwrite the files

3. Instead, assuming you held down the Option key (you can also hold it down after the fact), you’ll see a third option button “Keep Both” – choose this instead (optionally, check the “Apply to All” box if you’re confident you want to keep both of all files and don’t want to approve each one)


The Finder will move the source files into the destination folder and rename them automatically so they do not overwrite one another. The naming convention is rather basic, it simply appends a counting number to the end of the files coming from the source. Using the aforementioned filename example, that means copying 0.png, 1.png, 2.png, etc into another folder with the same named files will rename them automatically to “0 2.png, 1 2.png. 2 2.png”, and so on.


Because of the naming convention of simply appending a number to the end of the source files being copied, perhaps a better option is to first batch rename the file contents of one folder, and then just drag and drop the newly renamed files into the other folder. In that case, because the file names are different, it will not triggering the ‘keep both’ option at all and the files would drop into the folder as you would moving any other items around. This is often preferable since you can choose the file names yourself rather than going with the naming convention that ‘keep both’ assigns to the files, but it’s really up to the Mac user to figure out what’s best for their situation.

It’s also worth pointing out that you can enable the “Keep Both” Option after the dialog box has been triggered for file copies. If you see a “Skip” option in the dialog instead, hold down the OPTION key to switch to to ‘Keep Both’ like so:


Note: The “Keep Both” choice only appears with identical named files in folders, if the file names are different, the button will not appear, and if you held the Option key it would simply copy the files into the other folder.

Source: http://osxdaily.com/2015/08/10/use-keep-both-merge-same-name-files-into-folder-mac-os-x/