Friday, November 1, 2013

How to merge (and not replace) folders when copying on the Mac?

Problem:
If I try to copy or move a folder to somewhere it already exists, it asks to replace it. That would result in deleting the target. Rather I want to merge :(


With Windows is really simple, however on Mac, well, it works a little bit different!

Rather than using the GUI I'd rather recommend to use the command line:

$ditto from_folder destination_folder

Infallible!!


This is why

ditto -- copy directory hierarchies, create and extract archives.

If the destination directory does not exist it will be created before the first source is copied. If the destination directory already exists then the source directories are merged with the previous contents of the destination.

No comments:

Post a Comment