2

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 '17 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 '17 at 21:22
1

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.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • Please don't simply propose a tool. Explain how the tool helps to solve the problem at hand. – nohillside Jan 25 '17 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 '17 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. – Olanrewaju Olukosi May 2 '17 at 11:34

You must log in to answer this question.

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