OSX: How to compare and merge two folders and their subfolders and differing files of the same origin

Solution 1:

The rsync command line tool is able to merge two folders. You'll need to open a terminal window. Take a look at the manual pages

man rsync 

There may be a one liner but the following steps are non-destructive since you won't change your source folders.

  1. Create a new folder (dest)
  2. Sync source1_path to dest
  3. Sync source2_path to dest

Here the script - check the manual pages for additional options

rsync -rv source1_path/ dest
rsync -rv source2_path/ dest

The following commands also create copies for non-identical files which exist in both source directories (with a difference in size or timestamp for example)

rsync -rv --backup --suffix=_source1 source1_path/ dest
rsync -rv --backup --suffix=_source2 source2_path/ dest

Solution 2:

If you like a graphical tool, try Kaleidoscope app.

https://www.kaleidoscopeapp.com/

It does a very nice job comparing folders and once you have files - you can quickly merge/copy/move them. It also does file comparisons and even image comparisons that are amazingly powerful.

You can see the folder view by clicking “Folder Scope” on the web page above.