Edit online

Compare Directories Tool

The Compare Directories tool can be used to compare and manage changes to files and folders within the structure of your directories. The utility is available from the Tools > Comparison Tools menu or can be opened as a stand-alone application from the Oxygen XML Editor installation folder (diffDirs.exe).

Figure 1. Diff Directories Dialog Box

Starting the Tool from a Command Line

The directory comparison tool can also be started by using command-line arguments. In the installation folder there is an executable shell (diffDirs.bat on Windows, diffDirs.sh on macOS and Linux). To specify the directories to compare, you can pass command-line arguments using the following construct: diffDirs.bat/diffDirs.sh [directory path 1] [directory path 2].

If you pass only one argument, you are prompted to manually choose the second directory or archive.

Example:

To do a comparison between two directories, the command line would look like this:
Windows
diffDirs.bat "c:\documents new" "c:\documents old"
Tip: If there are spaces in the path names, surround the paths with quotes.
Linux
diffDirs.sh home/documents1 home/documents2
macOS
diffDirs.sh documents1 documents2

Directory Comparisons

To perform a directory comparison, follow these steps:
  1. Select a folder in the left panel and the folder you want to compare it to in the right panel. You can specify the path by using the text field, the history drop-down, or the Browse for local directory action in the Browse drop-down menu.

    Step Result: The selected directory structures are opened in the two side-by-side panels.

  2. To highlight the differences between the two folders, click the Perform Directories Differencing button from the toolbar.
  3. You can also use the Diff Options button to access the Directories Comparison preferences page where you can configure various options.
To compare the content of two archives, follow these steps:
  1. Use the Browse for archive file action in the Browse drop-down menu to select the archives in the left and right panels.
  2. By default, the supported archives are not treated as directories and the comparison is not performed on the files inside them. To make Oxygen XML Editor treat supported archives as directories, select the Look in archives option in the Directories Comparison preferences page.
  3. To highlight the differences, click the Perform Directories Differencing button from the toolbar.
The directory comparison results are presented using two tree-like structures showing the files and folders, including their name, size, and modification date. A column that contains graphic symbols separates the two tree-like structures. The graphic symbols can be one of the following:
  • An X symbol, when a file or a folder exists in only one of the compared directories.
  • A symbol, when a file exists in both directories but the content differs. The same sign appears when a collapsed folder contains differing files.
The color used for the symbol and the directory or file name can be customized in the Directories Comparison / Appearance preferences page. You can double-click lines marked with the symbol to open a Compare Files window, which shows the differences between the two files.

The directories that contain files that differ are expanded automatically so that you can focus directly on the differences. You can merge the contents of the directories by using the copy actions. If you double-click (or press Enter) on a line with a pair of files, Oxygen XML Editor starts a file comparison between the two files, using the Compare Files tool.