run

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  DiffDog Client Command Line >

run

The run command runs a comparison if given one of the following file kinds as argument:

 

*.dirdif (directory comparison)
*.filedif (file comparison)
*.dbdif (database data comparison)

 

You can create such files with Altova DiffDog desktop application (https://www.altova.com/diffdog), by saving any file, directory, or database data comparison as a file. Database data comparisons can also be created with Altova DatabaseSpy desktop application (https://www.altova.com/databasespy).

 

When you run this command, the outcome of the comparison is reported by the return error code (0 = no differences, 1 = differences, 2 = error), similar to how it works with the diff command. The output is displayed directly at the command line, unless you suppress it with the --quiet option.

 

For .filedif or .dirdif comparisons, you can optionally redirect the output (the comparison result) to a report file in XML or text format. The path of the report file is defined from the graphical user interface of DiffDog desktop application. Namely, in DiffDog, you can set the output path of a .filedif or .dirdif comparison as follows:

 

1.Open an existing .dirdif or .filedif file (or create a new comparison) in DiffDog.
2.On the Tools menu, click Comparison Document Options.
3.Do one of the following:
a.To use no redirection to a file, click No Export (this is the default option).
b.To redirect the report to a text file, click Text file, and then enter the path in the adjacent text box.
c.To redirect the report to an XML file, click XML file, and then enter the path in the adjacent text box.
4.On the File menu, click Save As, and then save the comparison as .filedif (or .dirdif, if applicable).

 

For .dbdif comparisons, the outcome of the comparison is available only in XML format. Use the command shell redirection to redirect the output to a file, for example:

 

DiffDogCmdlClient run comparison.dbdif >"C:\result.xml"

 

If you run the .dbdif file with DiffDog Server on a different machine or operating system, the database drivers required by the connection must be installed on the target operating system as well. Note that some database connections methods supported on Windows are not supported on Linux and macOS, see also Supported Databases.

 

Syntax

DiffDogCmdlClient run comparison-file1 [comparison-file2 [comparison-fileN]]

 

The run command can also be called using the import or load aliases. Therefore, you can use run, import or load interchangeably.

 

On Linux, use an all-lowercase to call the executable. In addition, on Linux and macOS, you might need to add the prefix "./" before the name of the executable when calling it from the current directory of the command shell.

 

Arguments

comparison-file

Specifies the path to a comparison file in .dirdif, .filedif, or .dbdif format. The path of the comparison file can be absolute or relative to the current working directory. You can supply as many comparison files as arguments as required. This is limited only by the number of input characters supported by your command shell.

 

Options

--config, --c

This option specifies the path to a client configuration file where the connection details to DiffDog Server are defined.

 

If you do not set the --c option, the DiffDog Command Line Client executable attempts to read the client configuration file from the same directory. If there is no configuration file in the same directory as the executable, the default values as described in the command line help and this documentation apply.

 

--port

This option specifies the port on which DiffDog Server listens for requests. Setting this option is meaningful if DiffDog Server runs on a port other than the default 29800. As an alternative to setting this option at the command line, you can set it in the Client Configuration File. Note that, if you set this value at the command line, it takes precedence over the one defined in the configuration file.

 

--quiet, --q

Prevents the standard output from being displayed at the command line. Valid values:

 

true

Do not display standard output in the terminal window.

false

(Default) Display standard output in the terminal window.

 

--server

This option specifies the server address on which DiffDog Server listens for requests. Setting this option is meaningful if DiffDog Server runs on a server other than the default localhost. As an alternative to setting this option at the command line, you can set it in the Client Configuration File. Note that, if you set this value at the command line, it takes precedence over the one defined in the configuration file.

Example

To to run the comparison file C:\DiffDog\Comparison1.filedif, use the following command:

 

DiffDogCmdlClient run C:\DiffDog\Comparison1.filedif

 

To run the comparison files Comparison1.filedif and Comparison2.dirdif (both located in C:\DiffDog directory), use the following command:

 

DiffDogCmdlClient run C:\DiffDog\Comparison1.filedif C:\DiffDog\Comparison2.dirdif


© 2019 Altova GmbH