It's backup time, and I've been trying to merge two big directory trees on the same (physical) partition, with lots levels of depth. The first one is the base containing all my projects up to 2014, and the other one is only a partial one containing the "changes" that have happened over the last few years (2014-16). New projects, and revisited ones.

In other words, mostly directories or files that have been added/modified exist in this new tree. There are a few files that only by accident ended up having the same name (but in essence are different, and not from the same original) and a few untouched files here and there (mostly files in projects that were revisited, updated, but not in every single aspect).

Now I wish to consolidate all the changes in one big base tree so I can put it in my drawer. In the past I used to work with arRsync but it makes actual copies of the files; and at this point I don't have the space (or time) to spare for all the files to be duplicated. It needs to be done by moving the files.

I've tried rsync, ditto, and the Finder on Sierra (with the alt key pressed), but all of them end up actually duplicating the files! Not sure if I missed something, but since I'm a bit stuck and afraid to mess up I thought of asking here for help!

Anybody who could point me to a safe direction on how to merge these trees without copying but moving the folders/files?

PS. I don't mind if the files with the same name get overwritten unintelligently - as long as no folder gets replaced, and all unique files come together it is good for me. The files that have the same name on both trees, are few and can be easily recovered. However it would be nice if the answer made mention on how to perform intelligently these overwrites for the sake of completeness (and future reference)

  • To move files within one partition with Finder, just drag them into the target folder (without any modifier keys pressed).
    – nohillside
    Jan 25, 2017 at 11:58
  • hi @patrix! If I remember correctly, at the time I was trying to consolidate a few hundred gigs of folders while merging them recursively without having to find where in the tree were any differences. It was imperative that no file gets lost (but I didn't mind about files being overwritten)- I was pretty sure that finder couldn't do it...
    – FotisK
    Jan 25, 2017 at 21:22

3 Answers 3


Have you tried DiffMerge ? Its an application that is used to merge and compare files and folders.

It updates the content of respective folders by comparing and merging contents graphically.

Product Features

DiffMerge is an application to visually compare and merge files on Windows, OS X and Linux.

Graphically shows the changes between two files. Includes intra-line highlighting and full support for editing.

Graphically shows the changes between 3 files. Allows automatic merging (when safe to do so) and full control over editing the resulting file.

Performs a side-by-side comparison of 2 folders, showing which files are only present in one file or the other, as well as file pairs which are identical or different.

Right-click on any two files in Windows Explorer to diff them immediately.

Rulesets and options provide for customized appearance and behavior.

Identical feature set on Windows, OS X, and Linux.

  • Please don't simply propose a tool. Explain how the tool helps to solve the problem at hand.
    – nohillside
    Jan 25, 2017 at 11:52
  • hi @Olanrewaju T, thanks for the suggestion; I tried a few diff/sync tools, but all of them after finding the differences would allow you to copy but not relocate the files. This was major issue for me since I didn't have the wiggle room to allow it to create interim copies; it had to literally relocate the files via renaming or by recreating its hard link - see here. Do you have any indication that DiffMerge can move files, without rewriting all the data? Would be interesting if it does!
    – FotisK
    Jan 25, 2017 at 21:47
  • Sure it does. Depending on your preference... I once used it to update the content of folder tree... I mean to update the content of folders in a folder. In particular, to update a library of books sorted into folders by authors.
    – Laredo
    May 2, 2017 at 11:34

I've found the only software that do that conveniently and in the expected way.
Good old Far manager that has a Linux(Mac) port known as Far2l

When I want to copy(F5 key) or move(F6 key) a folder to a destination where the folder with the same name already exists, it merges them and does the following with the folder content:

  • creates files if they don't exist in the target folder (or in the same subfolder)
  • when file exist it shows info about size and creation date for both of them and allow to Overwrite, Skip, Rename, Append, Cancel.

What do those options mean:

  • Overwrite: target file will be replaced
  • Skip: target file will not be replaced (when you move files it will stay in the original location)
  • Rename: existing file will not be changed, a new name will be given to the file being copied/moved
  • Append: source file content will be appended to the end of the target file content
  • Cancel: interrupt operation at the current moment.

It allows to repeat the selected choice for all such cases.

It will also allows to view files content by selecting the desired line with up/down/tab button and pressing F3 to view/exit the integrated text viewer.

  • Application on MacOS are actually folders with .app extension, not files. That probably explains why Finder replaces folder content when copying/moving folders instead of merging it like it usually happen in other OSes
    – VAS
    Mar 25, 2021 at 20:14

In Finder if you just drag a duplicate directory into the same directory where it already exists, OSX will ask you if you want to merge them. I'm assuming it will have the expected behavior, but am not very familiar with it.

You must log in to answer this question.

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