Edit online

Compare Files or Directories

Oxygen XML Developer provides a simple means of performing file and folder comparisons. You can see the differences in your files and folders and merge the changes. You can also use the file comparison to compare fragments or files inside zip-based archives.

There are two types of comparison tools: Compare Directories or Compare Files. These utilities are available from the Tools menu or can be opened as stand-alone applications from the Oxygen XML Developer installation folder (diffDirs.exe and diffFiles.exe).

Starting the Tools from a Command Line

The comparison tools can also be started by using command-line arguments. In the installation folder there are two executable shells (diffFiles.bat and diffDirs.bat on Windows, diffFiles.sh and diffDirs.sh on macOS and Linux). To specify files or directories to compare, you can pass command-line arguments to each of these shells. The arguments can point to file or folder paths in directories or archives (supported formats: zip, docx, and xlsx).

Directory Comparison Example
To start a comparison between the two directories, use 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.
For example, to start a comparison between two Windows directories, the command line would look like this:
diffDirs.bat "c:\documents new" "c:\documents old"
Tip: If there are spaces in the path names, surround the paths with quotes.
File Comparison Example

To start a comparison between 2 or 3 files, use the following construct: diffFiles.bat/diffFiles.sh [path to left file] [path to right file] [path to base file].

If three files are specified, the tool will start in the 3-way comparison mode. If only two files are specified, the tool will start in the 2-way comparison mode. The first specified file will be added to the left panel in the comparison tool, the second file to the right panel, and the optional third file will be the base (ancestor) file used for a 3-way comparison. If you pass only one argument, you are prompted to manually choose another file.

For example, to do a 3-way comparison on Windows, the command line would look like this:
diffFiles.bat "c:\docs\file 1" "c:\docs\file 2" c:\docs\basefile
Tip: If there are spaces in the path names, surround the paths with quotes.