Have you ever made two folders on your computer that should really be one? If you handle a lot of different files and documents on a daily basis, you’ve probably come across that issue often. 

If you’ve ever found two files on your computer with the same or slightly different names, there are two things you can do to free up space on your Mac. One way to do it is to replace one folder with the other. When that’s not an option, you’ll need to learn how to merge files on your Mac.  

Learning these file handling tricks is a good next step after you learn how to move files on your Mac. Read on to find out how to join two folders into one without losing any of your files. 

How To Replace Files On Mac

If you know that you have two identical files or folders on your computer and want to only keep one, you can do it by replacing one of them with the other.

  1. Choose the file you’d like to keep. 
  2. Click on the file to select it. Then drag it on top of the file you’d like to replace.
  3. When you drop it, you’ll get the pop-up window asking whether you want to Replace the second file or Stop

If you choose Replace, Finder will delete the second file with all its contents. So before you do that, make sure you have a recent backup of all your files so you don’t lose any important data. 

Alternatively, you can select Stop and learn how to merge two files instead. That way you can keep all of your files without building up clutter on your computer. 

How To Merge Two Folders 

When you’re not sure whether two folders have the same contents, you can play it safe by merging them together. 

In order to merge two folders with identical names on Mac, follow these steps.

  1. Choose the final location of the merged folder. You need that to decide which of the two folders you will be moving. 
  2. Select the folder that you want to move.
  3. Hold down the Option key (Alt), then drag the folder you’d like to get rid of towards the folder you want to merge it with. 
  4. Still holding the Option key, drop the folder. 
  5. You’ll get the pop-up window that will now have an option to Merge the files.

Note, that Merge option will only appear if the contents of one of the folders differ from the contents of the other folder. If both of your folders have the same items in them, you will only get the same Stop and Replace options. 

How To Merge Two Folders On Mac With Different Names

If the two folders you’d like to join have different names, you can simply change one folder’s name to match the other and use the method described above to merge them. 

Another way to do it is to manually move the contents of one of the folders to the other. 

  1. Open the folder that you want to get rid of.
  2. From the ribbon menu on top, choose Edit > Select All to select all the files inside the folder. You can also do it by using the keyboard shortcut Cmd (Command) + A
  3. Drag and drop the files into the second folder. 
  4. After you move the files, delete the empty folder. 

If the two folders you want to merge have the files with the same names, you’ll get a pop-up window asking if you want to Keep Both, Stop, or Replace the file. Choosing Keep Both will save the copy of the file with the same name and the word “copy” added in the end. 

Use The Ditto Terminal Command

For advanced users, there’s one more way to merge files on a Mac. You can use the Terminal command called Ditto

  1. Open Spotlight and type Terminal into the search bar. 
  2. In Terminal, type in the Ditto command.

The command uses the following syntax:

ditto / source / destination

We have a folder with the name Test Folder located on the desktop, and a folder with the same name stored in Downloads. Here’s what the ditto command for those two folders looks like this:

ditto -V ~/Desktop/”Test Folder” ~/Downloads/”Test Folder”

If the name of your file only has one word (like “Test”), you won’t need to use double quotes in the command. 

  1. Press Enter, and the command will overwrite the contents of the destination folder with those of the source folder. 

Mastering the Ditto command might seem a little tricky, especially if you’ve never used Terminal before. However, it’s a more sophisticated and effective way of merging two folders on a Mac. 

Learn To Use Your Mac Intelligently

File handling on Mac can be a little confusing if you don’t know how the system works. However, learning to operate your files is essential if you don’t want to run into problems like not having enough space, or struggling to find the right file in a pile of digital clutter. 

Once you master commands like replacing and merging files on Mac, have a look at how to permanently delete and password protect your files on Mac

Do you suffer from overpopulating your computer with identical files? How do you normally solve that problem? Share your thoughts with us in the comments below.