How to merge folders on Mac
Have you ever tried to get your computer files organized only to realize you should merge some of your files? Or maybe you're collaborating with other people and want to combine all of your files and folders. Seems pretty straightforward, right? Not entirely.
Some of those folders might have duplicate files or even different versions of the same file. What you'll quickly see is it's not as simple as just dragging and dropping the files. But don't worry, in this article you'll read about how to merge folders on a Mac without losing your files.
How to merge folders with Terminal
If you're not afraid to get into Terminal, you can use the ditto command to merge your folders. Now, a couple of things to get into before you go over the instructions. Terminal is a powerful tool, so you should only use the commands in this article exactly as they're typed. One character off could cause you to lose some of the data.
The other thing to keep in mind is that the ditto command overwrites any duplicate file in the destination folder. That means, if you're transferring a file named "Test" in Folder A to Folder B. If you have another file named "Test" in Folder B, ditto will delete that file and move the one from Folder A.
With those things in mind, here are the steps for how to merge folders on Mac using Terminal:
- Open Terminal.
- In the window, type ditto.
- Then, drag the source folder you want to copy into the window. And then, drag the destination folder into the window.
- Press return or enter.
Depending on how big the folder is, it may take some time for this process to finish.
How to merge folders with Finder
Of course, if you have incredible amounts of patience, you can try to manually combine two folders by dragging and dropping the files in them. Just follow these steps to merge folders on Mac:
- Open both folders.
- Press common+A or select the files in your source folder.
- Drag the files and drop them into your destination folder.
If any of the files you're copying over has the same name as a file in your destination folder, then a pop-up window will appear. It'll ask you to select one of the following:
- Keep Both - This keeps both copies and renames the file you're copying to have "Copy."
- Stop - This button cancels the copy altogether.
- Replace - Pressing this replaces the file in the destination folder with the file from the source folder.
- Skip - macOS hides this button, but if you hold down Option, the Keep Both button changes to Skip and will continue your transfer skipping the file in question.
The somewhat annoying thing is that a dialog box will pop up every time there is a file with the same name as a file in your destination folder. If you want to choose the same response for all of your files, you can just check the box next to Apply to All.
How to move folders on Mac
If you don't want to mess with selecting files, you could just move the folder completely. And then, if there's already a folder with the same name in the new location, Finder will prompt you to stop the transfer or replace the old folder.
But, if you hold down the Option key on your keyboard while you drag the folder over, you will be prompted with a third button, and that is Merge. This is where it gets messy, though. If any files have the same name in those folders, Finder will automatically choose the newer file and delete the old one.
As you're probably realizing, with any of these options, duplicates are going to cause some headaches if you don't address them before you start merging folders. Using a duplicate finder, like Gemini 2, can save you a lot of time and frustration.
Merging folders on your Mac can be quite a handful and get messy pretty quickly. Especially if you have copies of similar files living in those folders. But hopefully, this article has helped give you some ideas on where to start with the process. And gets you on your way to a cleaner and more organized digital life!