Credit where credit is due ... this is based on following this thread in the Forums, but I thought it would be of general interest. First of all, a WARNING to Windows users new to Macs:
In Windows, dragging a folder to a destination where a folder with the same name already exists results in the contents of the source folder being added to the contents of the pre-existing folder. If a file with the same name exists within both folders, then the version in the destination folder will be replaced, but otherwise, the contents of the pre-existing folder remain intact.
On Macs, although you will be warned first, the pre-existing folder as an entity will be replaced by the source folder. If you are not familiar with the traditional Mac behaviour, DATA WILL BE LOST. (If you immediately realize your mistake, OS X Finder can 'undo' this). According to the original poster (rozeel) in the thread, Finder is the oddball in this case, and Windows and Unix follow the merging behaviour.
This won't be news to a Unix user, but for a long time Mac-user but Unix dummy like myself, learning of the existence of a way to effectively merge different versions of a folder was a 'wow' moment. Read the rest of the hint to see a quick Terminal command to merge two folders together...
Given a source folder:
~/FolderX (containing files 1.txt, 2.txt, 3.txt)... and a destination folder:
~/EnclosingFolder/FolderX (containing files a.txt b.txt c.txt)Then the Terminal command:
cp -R ~/FolderX ~/EnclosingFolder
results in
~/EnclosingFolder/FolderX containing files 1.txt, 2.txt, 3.txt, a.txt, b.txt, and c.txt. The contents of the two folders are merged.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20040410183752130