26

Before Mavericks one could hold the ALT key and move a folder "A" onto a folder "B" where already an "A" existed. In this case Mac OS X asked in Lion if I want to merge - or on Mountain Lion if I want to keep both (which was also a merge).

I can't find this option in Mavericks.

Did Apple remove this useful feature?

Any hints?

(And yes: I own ForkLift, which can do it - I just sometimes still prefer the Finder).

4
  • The feature still exists in 10.9 Holding down the ALT key while dragging still works.
    – markhunte
    Commented Oct 27, 2013 at 23:10
  • Yes - I knew about that pressing the ALT key is a precondidtion. Nevertheless my Mavericks did not present me the "Merge" option. But I found out why... - I will write an answer to my question. Thanks anyway!
    – DerWOK
    Commented Oct 28, 2013 at 10:08
  • What do you do if this entire window has disappeared? I never get this to appear when I am dragging folders now. And the computer just does nothing. Doesn't move files. Doesn't tell me anything. Suggestions on how to bring this back?
    – user133208
    Commented Jun 23, 2015 at 17:43
  • Per Apple, support.apple.com/en-us/HT201236 alt-drag is equivalent to a copy. So there's nothing special about alt-dragging, you can get same merge to show up via simple cmd-c/cmd-v. What is special however is that if you are copying or moving multiple files (not a folder) into a directory where names would collide, pressing option toggles between "keep both" and "skip"
    – 1110101001
    Commented Oct 23, 2023 at 5:07

6 Answers 6

34

OK. I found out myself... Luckily Apple did not remove the Finder Merge functionality with Mavericks. But sometimes it is not offered to the user. But let me explain:

Supose you have a folder named TARGET with a subfolder TARGET/SomeStuff. And you have a SomeStuff folder somewhere else. Now drag this second SomeStuff folder to the TARGET folder (without any modifier keys pressed) then the Finder will presented you the following dialog (Stop and Replace):

enter image description here

So, no merge here.

Now - if you instead press the Alt key while you drop the SomeStuff folder to the TARGET folder there are two possibilities:

1.) If the files in the two SomeStuff Folder have completely different (not overlapping) contents. In other words: no duplicate filenames. Then finder will give you these options (Stop, Merge & Replace All):

enter image description here

So, here you can merge. And the result will be a TARGET/SomeStuff folder with the content of both SomeStuff folders.

2.) But here comes what is sometimes confusing (and actually made me think merging is gone in Mavericks): if there exists at least one filename that is contained in both SomeStuff folders, then merging is not possible. Then the finder will offer you these options (Don't Replace, Stop, Replace):

enter image description here

So, no merge possible, here too!

2
  • The filename contained in both folders threw me off! This helped me figure out why this feature seemed so finicky.
    – loeschg
    Commented Jan 29, 2014 at 19:25
  • 1
    I just wasted about 1 hour because of this... In the end I just did it with the command line. Seriously I cannot believe they made this change!
    – BoD
    Commented Feb 22, 2014 at 18:06
13

Short answer

Using the command line (Terminal):

cp -r -n ~/Desktop/src/* ~/Desktop/destination/

The command above adds the src content and the subdirectories to the destination without overwriting the content already present in the destination.

Long answer

Even if the content overlaps, you can still use cp to do it. Assume that you have two folders on your desktop: the src and the destination folders and you want to merge src into destination:

enter image description here

To merge, just do:

cp -r ~/Desktop/src/* ~/Desktop/destination/

NOTE When you use this, the content in src overwrites the content in the destination folder and adds the extra stuff that are missing in the destination. It shouldn't matter if you just want to add the missing files from src into destination.

ALSO it doesn't matter how many subdirectories are there, it will just go through each folder recursively and it will overwrite the content and will add the stuff that is missing in the destination folder.

BUT

PITFALL If you have huge files (like video files), you don't want to wait until everything is overwritten, it adds a lot of overhead.

PITFALL SOLUTION: Instead, you can use the -n flag to skip the overwriting:

cp -r -n ~/Desktop/src/* ~/Desktop/destination/

This is the description of the -n flag from the man page:

man cp
 -n    Do not overwrite an existing file.  (The -n option overrides any
       previous -f or -i options.)

Further Reading

  1. https://stackoverflow.com/questions/5088332/overhead-of-a-flag-in-cp-command
5

I just found this problem too. I worked round it by using a simple command line cp -r command in Terminal. It's crazy that you can't do it in the GUI!

cp -r ./srcFolder/ ./targetFolder/
3
  • 1
    As much as Finder tries to help with file maintenance, I always feel better dropping into terminal and using rsync, cp and such.
    – bmike
    Commented Dec 31, 2013 at 15:56
  • I think there is the best solution there is... I can never seem to make sense of how to make the "Merge" options appear in Finder when I need it.
    – Camden S.
    Commented Feb 6, 2014 at 6:59
  • 1
    It's probably a good idea to add the -n switch to avoid overwriting files, because it might take forever if you have large files that you are trying to merge. So it will be like : cp -r -n ~/src/* ~/destination/ Commented Mar 19, 2014 at 14:29
1

Having not found my answer above, I am compelled to redirect you to that other answer which rightly advices to use the ditto command:

In a Terminal, type: ditto from_folder destination_folder, for instance:

   ditto ./srcFolder ./targetFolder
1

I found this from Apple Support (http://support.apple.com/kb/PH14224), you need to choose "Keep newer" to merge, works for me:

Merge two folders

If you have two folders with identical names at two different locations, you can merge them into a single folder. To do so, you must copy (not move) one folder to the location that already contains a folder with the same name. In the dialog that appears, click Merge.

The Merge option appears only if one of the folders contains items that are not in the other folder. If the folders contain different versions of identically named files, the only options are Stop or Replace.

0

For users who want an alternative GUI or fear terminal: here is a free App that I found that will merge folders for you.

http://subrosasoft.com/software/freeware/macmerger

Disclaimer: I am in no way affiliated with the company that makes the app.

The copywright is 2012. There is little feedback, but it seems to work fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .