Comparing via Command Line

The command line for file comparison is as follows:

CODECOMPARE [<Argument1> [<Argument2>] ...] <Paths>

Command-line parameter description:

Parameter Name Parameter Description
/SOURCECONTROL,/SC <SourceControl> Source control system. It is used for detecting a programming language, as well as for displaying Review Assistant comments in files opened from the source control client. Available values: tfs, svn, tortoisesvn, git, hg, tortoisehg, starteam, or none (by default).
/ENVIRONMENT <Environment> Environment selection order for opening a comparison window. You can read more about this parameter in the Environment on Comparison Opening topic. Available values: visualstudio, standalone, or auto (by default).
/WAIT,/W Wait until a user closes files to be compared.
/BLOCKED,/B Use this option if the called Visual Studio is blocked (for example, in integration with Visual SourceSafe).
/TITLE1,/T1 <Title> First compared file title.
/TITLE2,/T2 <Title> Second compared file title.
/TITLE3,/T3 <Title> Third compared file title.
Paths Files or folders to compare. You can specify up to 3 paths.

Note

You can specify command-line parameters using either the slash / or the dash - prefix. For example, the following commands are equivalent:

"C:\Program Files\Devart\Code Compare\CodeCompare.exe" /WAIT /T1="version 1" /T2="version 2" "C:\CC_Test\Class1.cs" "C:\CC_Test\Class2.cs"
"C:\Program Files\Devart\Code Compare\CodeCompare.exe" -WAIT -T1="version 1" -T2="version 2" "C:\CC_Test\Class1.cs" "C:\CC_Test\Class2.cs"

For more information about file comparison, see the File Comparison section.