Altova DiffDog Server 2025 

The diff or compare command performs a side-by-side comparison of two files, directories, or URLs. The entities to be compared can be of different kinds (for example, you can compare a file URL like http://server/file.txt to a file path like C:\file.txt). Note that it is valid to compare files with URLs, for example, but not files and directories (or URLs and directories). Comparison of Microsoft Word 2003 or later documents (.docx, .dotx) is also supported. See Comparing Word Documents.

 

Most often, a comparison involves a "left" side and a "right" side to compare. However, three-way comparisons are also possible when comparing files or URLs—but not directories. The files or directories to be compared can all be on a DiffDog Server machine or on a DiffDog client machine. You can also compare local files or directories with remote ones. For examples, see Running Comparisons.

 

Comparison result

The format of the output comparison result can be text, XML, or HTML and is selected by the --output-mode option. By default the output is not quiet, which means that it will be displayed at the command line. Set the --quiet option to true suppress the display at the command line. Output can additionally be sent to file by using --output-file option. Tip: If you get an empty output file, try changing the --mode option, which specifies the type of comparison to be performed.

 

Syntax

diffdogserver diff [options] {path path [path]}

diffdogcmdlclient diff [options] {path path [path]}

 

Notes

A path may be a file or directory path, or a URL path in the format http://server/segment.

You can supply two paths or three paths as the arguments.

You can supply paths not only as arguments, but also by setting the options --client-left, --client-right, or --server-left, --server-right (see below). Use the second alternative if the client does not run on the same machine as DiffDog Server.

The paths must not be specified as a mix of arguments and options; they must be specified as one or the other.

The job argument can be specified more than once in order to run multiple database comparison jobs in one run of the command.

The --server and --port options apply to diffdogcmdlclient only. They specify the connection details of the server.

 

Options

The options below are listed in alphabetical order. You can specify defaults for most of the options below in the client configuration file. If you use a client configuration file, note the following:

 

When an option is set at the command line but it is commented out in client configuration file, the command line option applies.

When an option is set both at the command line and in a client configuration file, the command line option applies.

When an option is not set at the command line but is set (uncommented) in configuration file, the configuration file option applies.

When an option is set neither at the command line nor in the configuration file, it takes the default value as described in the command line help and in the documentation below.

 

 

Examples

To compare only local files or directories, supply them as arguments, which will be interpreted in the following index order. Two arguments (i) : left side, right side. Three arguments (ii): left side, middle, right side. While the --mode option is not mandatory, it is recommended to explicitly set it to either text, binary, or xml. In the first example above, it is set to text since two text files are being compared. In the second example, it is set to xml.

 

(i)  diffdogcmdlclient diff file1.txt file2.txt --mode=text

(ii) diffdogcmdlclient diff file1.xml file2.xml file3.xml --mode=text

 

 

Alternatively, you can specify the files to compare through options instead of arguments. For example, the command below supplies two XML files via options—not arguments. Note the client/server locations of the files

 

(i)  diffdogcmdlclient diff --client-left=file1.xml --client-right=file2.xml

(ii) diffdogcmdlclient diff --client-left=file1.xml --server-right=file2.xml --client-right=file3.xml

 

 

The command below compares a file on the client with a file on the server. The file on the server is expected to be in a folder that has an alias of public. Further, it is assumed that this alias has already been defined by an administrator on the server.

 

diffdogcmdlclient diff --client-left=file1.txt --server-right=file2.txt --mode=text --alias=public

 

To display a list of aliases defined on the server, run the aliases command. To save an alias as default, set the server-alias option in the Client Configuration File. This way, you will no longer need to specify an alias at the command line.

 

© 2019-2025 Altova GmbH