Compare Folders
Three-Way Synchronization

Three-Way Folder Synchronization

Manual Three-Way Synchronization

Synchronization using Copy/Move/Delete

Any desired synchronization result can be achieved using two or three basic operations—Copy, Move and Delete.

Here are the steps involved in synchronizing two folder hierarchies with DeltaWalker, specifically for making the second hierarchy the same as the first:

  • Select the folders of interest in the first and second folder selectors and hit the "Compare" button on the main toolbar.
  • If there are files present only in the Reference folder, they'd be reported as deleted, and the little orange rectangle with a minus sign on the status bar would show their count. Those files need to be copied from the Reference to the Modified folder. To do that, right-click and choose Select > Deleted. Right-click on one of the selected items in the first hierarchy then click on Copy Selected from First to Second.
  • Next, copy the different files, if there are any: right-click and choose "Select Different", then copy the selection from first to second as in the previous step.
  • Finally, if there are files present only in the second folder, you'd probably want to delete them. To do that, choose "Select Added", then right-click in the second folder hierarchy and choose "Delete Selected" or hit the Delete key.

The thing to ensure when copying files is that the files that are being overwritten don't contain valuable changes. It is not uncommon that two folder hierarchies have been changed independently and both branches contain valuable changes. The safest approach is to analyze carefully the different files and, if necessary, manually merge them. Comparing and merging different files with DeltaWalker is easy—just double-click on them from your folder comparison window and they'll open for comparison..

DeltaWalker presents you with everything you need to make informed and confident merge and synchronization decisions; it also offers the tools to carry out these decisions with the least amount of effort.

Automatic Three-Way Synchronization

Available exclusively in the Oro edition, the DeltaWalker automatic folder synchronizing is an advanced capability that operates only on non-conflicting differences. It automatically merges changes from the first and second folder hierarchies into their common ancestor. DeltaWalker defines automatic synchronizing of folder hierarchies strictly in the context of three-way folder comparison.

Automatic synchronizing, or merging, is best illustrated by a simple example, which in turn, is best illustrated by before and after screenshots. Please remember that files are classified as added or deleted always in relation to the common ancestor.

The before auto-synchronizing image shows:

  • One triplet of files with conflicting differences —the "Different file with conflicts.txt" file in each of the compared folders.
  • One triplet of files with non-conflicting differences—the "Different file.txt" file in each of the compared folders.
  • Two added files—the "First-only file.txt" in the first and "First-only file.txt" in the second folder.
  • One deleted file—the "Ancestor-only file.txt" present only in the ancestor folder.

Three-way file comparison image before auto non-conflicts sync

The after screenshot below shows the result of the auto-synchronization:

  • The triplet of files with conflicting differences that had their non-conflicting differences automatically merged, and their conflicting differences left intact for manual reconciliation—the "Different file, with conflicts.txt" file in each of the compared folders.
  • The triplet of automatically merged files with non-conflicting differences—the "Different file.txt" file in each of the compared folders.
  • Two added files—the "First-only file.txt" in the first and "First-only file.txt" in the second folder.
  • Two deleted files—the "First-only file.txt" in the first and "First-only file.txt" simultaneously present only in the ancestor folder.

Three-way file comparison image after auto non-conflicts sync

The following simple rules govern automatic merging in DeltaWalker:

  • Files with non-conflicting changes, e.g. the "Different file.txt" file triplet, will be merged by the rules of automatic merging of files in three-way file comparison.
  • Added files e.g. the "First-only file.txt" and "Second-only file.txt", are copied to the ancestor folder.
  • Files deleted in both branches, e.g. the "Ancestor-only file.txt", are deleted from the common ancestor folder as well.
  • Files with conflicting changes, e.g. the "Different file, with conflicts.txt" file triplet, will have their non-conflicting differences merged by the rules of automatic merging and their conflicting differences will be left intact for manual reconciliation.
  • The absence of a file in either the first or the second role while there are actual differences in the contents of the other two roles yields a triplet with conflicting changes that does not lend itself to automatic merging and requires manual reconciliation.

Automatic merging is applied only on the selected files or folders, meaning you need to make an explicit selection before performing an auto-synchronizing.

Note that all changes you made during the automatic merging process are committed instantly within DeltaWalker and are not undoable. To ensure that you don't lose data inadvertently, we recommend that you make a backup copy of the entire ancestor folder.

See Also