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. Files or folders to compare. You can specify up to 3 paths.

Example: “C:\Program Files\Devart\Code Compare\CodeCompare.exe” /T1=”version 1” /T2=”version 2” “c:\Class1.cs” “c:\Class2.cs”.

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