5

I've recently switched from Windows 7. One Windows feature that I'm missing is the possibility to merge folders (the German version of Windows is calling this "integrate") when copying & pasting them.

The merge feature works like this: if you paste a folder into a location that already contains a folder of that name, you get the option to merge the content of both folders. The files from the new folder will be pasted into the existing one; on conflicts, you get a choice what to do.

enter image description here

Finder doesn't seem to support this: the only choice I get is to overwrite the older folder with the new one (with no explanation of what exactly this does), or stop the process.

Is there a way to merge folders in Finder? Am I overlooking something?

7

Because of a lot of complaints of people used to the Windows way, merging folders is now a feature in OSX Lion :

enter image description here

This merge dialog will only show up if:

  • destination folder isn't empty
  • destination folder contents are different from to be copied one

So the way to merge folders in an officially supported way is to upgrade to Lion :-)

  • But you can do with subfolders.. – G M Oct 18 '13 at 13:30
5

Use rsync in terminal:

rsync -arvu SOURCE_DIR DEST_DIR --ignore-existing

The --ignore-existing flag will ensure that you do not overwrite files in the dest folder that are already there. Incidentally, if you want to sync with an external hard drive or USB drive look under the folder /Volumes (All external hardware is mounted there)

1

The feature you're talking about is NOT supported out of the box.

What you could do though to achieve the very same thing is to use some external utility :

Folder Merge (Free)

Small software utility that will merge folder contents

By Default OSX doesn't merge folder contents so this is a simple GUI tool to do just that.

If simply you want to merge the files located in two separate folders, you can easily do that with Folder Merge.


Unison (Free)

Unison is a file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.

  • 3
    It is supported on Lion. – Tyr Apr 21 '12 at 18:23
  • 1
    -1: misinformation: this has been supported for two major releases (Lion and Mountain Lion). – Blacklight Shining Nov 22 '12 at 1:25
1

You can also go into the source folder, hit command-a which will select all items in the folder then drag them to the destination folder and drop. You can process the overwrites one at a time by responding to the dialogs or you can tell it to just skip.

0

Check the cp command. Use man cp and read the options. You can do something like:

cp -r -u ~/source ~/destination

-R, -r, --recursive : copy directories recursively
-u, --update : copy only when the SOURCE file is newer than the destination file or when the destination file is missing
-p same as --preserve=mode,ownership,timestamps
-v --verbose : explain what is being done

So if you want to copy files from you Downloads/music folder to say your Music/new folder you would do something as:
cp -ruvp ~/Downloads/music/* ~/Music/new/
This would merge the contents of these two folders and if two files with the same name and path exist it would keep the newest one based on the timestamp.

You must log in to answer this question.

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