Command Line Folder Comparison Examples

Command line examples for comparing of folders

command line folder comparison example

Examples of Folder Comparison by Command Line

Have a question? Ask us! We love to help!

Below are some examples to choose from. Select the example closest to what you require and modify it. If you have any trouble using these examples see:


Note: If you don't specify a particular option in the command line, the option will default to whatever was last set in the user interface. Therefore, you can set up the application to generate a detailed file difference report for each set of changed files. To specify switches for the comparison of textual content (e.g. -  Ignore white space /W or Ignore Case /I), you must first set up the user interface by going into Folder Compare Options and enabling Check Textual Content if Binary Content Is Shown to Differ.

 


Example Details

Example 1

Compare the contents of two folders

Example 2

Compare the contents of two folders contents including their subfolders


Example 1

DiffDoc /D /S"E:\delme\Compare1" /M"E:\delme\Compare2" /U*.DOC /T"C:\output\Report.CSV" /V /X

This example illustrates how to use the command line to compare all *.DOC files within two folders E:\delme\Compare1\ and E:\delme\Compare2\. A CSV style report will be created and the program will exit upon completion. A status message will be displayed telling the user how the command line went.

 

Switches used:

/D = Compare folders

/U = Which extensions to compare. Leave blank to compare all.

/T = Where to save the tab delimited report file.

/X = Exit upon completion.

/V = Report any errors in a verbose fashion.



Example 2

DiffDoc /D /S"E:\del\Compare1" /M"E:\del\Compare2" /U"*.HTM *.HTML" /T"C:\output\Report.CSV" /V /C /X

This example is identical to Example 1 above, except that subfolders are specified and instead of *.DOC, all *.HTM and *.HTML files will be compared.

 

Switches used:

/D = Compare folders

/C = Compare all subfolders

/U = Which extensions to compare. Leave blank to compare all.

/T = Where to save the tab delimited report file

/X = Exit upon completion

/V = Report any errors in a verbose fashion



See Also: