Command Line Usage |
|
This topic shows examples of how you can use Compare It! in a command line.
Syntax
wincmp3.exe [ first_file second_file [result_file] /i=UserName] [options]
Where:
- first_file and second_file are the files to compare
- result_file is the name of the result file
- /i=UserName is the user name for a multiuser configuration
- options are explained below:
Option |
Description |
/=Alias |
Allows you to change the visible file name.
Example: wincmp3.exe file1.txt /=Old file2.txt /=New |
/1 |
Use single instance.
If specified, Compare It! will find an already running instance of itself and pass the new parameters to that instance, instead of opening an additional window. |
/G |
Generate report and exit |
/H |
Force horizontal split mode |
/L |
Use file lists for printing or reports. See details. |
/M |
Folders comparison. See details. |
/N |
Show line numbers |
/P |
Print file and exit |
/R |
Read only mode, edit mode will be disabled.
You can also use /R1 or /R2 syntax to make just one file readonly (left and right one accordingly) |
/min |
Start application minimized. When used with reports generation, keeps Compare It! completely hidden. |
/changes |
Start in "Changes only" mode |
/xls, /doc |
Select office converter |
/cmp:ProfileName |
Select comparison profile |
Additional Printing and Report Generation Options
Several additional options are available for both printing and report generation. These options can be specified as follows: /P:N2
The following printing/reporting options are available:
Option |
Description |
C |
Use colors (print only) |
E |
delete report file, if files are identical |
I |
Include navigation (HTML report only) |
L |
Wide mode (print only) |
N |
Include line numbers |
S |
Include statistics |
W |
Word wrapping (print only) |
X |
Use eXternal CSS file for HTML reports |
A |
Generate text report in Same format |
B |
Generate Composite report |
H |
Generate text report in HTML2 format |
M |
Generate text report in Merged format |
T |
Generate text report in Unix diff format |
U |
Generate text report in Unix diff Unified format |
The number at the end of the command means "print changes only" with the specified number of context lines.
To select a report file, you must specify it after the /G option, as shown in the following example.
wincmp3.exe file1.dat file2.dat /G:SN3 c:\report.htm
This command will generate a comparison report to c:\report.htm, including statistics and line numbers, and only 3 context lines around the differences blocks.
Selecting printer to use
When printing with command line, you can also choose which printer to use. To specify printer name, place it just after /P command:
wincmp3.exe file1.dat file2.dat /P:CN3 "My Printer Name"
See also:
Merged report
|