History | Edit

The file comparison tool can be started by using command-line arguments. In the installation folder there is an executable shell (diffFiles.bat on Windows, diffFiles.sh on OS X and Linux). To specify the files to compare, you can pass command-line arguments using the following construct: diffFiles.bat/diffFiles.sh [path to left file] [path to right file] [path to 3-way 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.

If you want to launch the file comparison tool from an external application with specified files and you want the file browsing tools at the top of both panels to be hidden, you should use the -ext argument as the first command. There are some additional arguments that are allowed and to see all the details for the command line construct, type diffFiles.bat --help in the command line.

Example:

To do a 3-way comparison, the command line might look like this:
Windows
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.
Linux
diffFiles.sh home/file1 home/file2 home/basefile
Mac OS X
diffFiles.sh documents/file1 documents/file2 documents/basefile