Document Comparison Command Line Examples

Command line examples for comparing of PDF, Word, TXT etc.

command line document comparison examples

Examples of Document 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.

Some examples below open DiffDoc once the compare is complete. Examples 3-6 close DiffDoc, but do create a report which is opened in the default app (e.g. Browser, Notepad, Excel).

Example Details

Example 1

Compare two TXT Files

Show Side by Side

Example 2

Compare two DOC Files

Show All In One

Create a log file

Example 3

Compare two DOC Files

Show All In One or Side by Side

Create HTML File Report and give it a title

Create Word File Report and give it a title

Create a log file

Exit when done

Example 4

Compare two DOC Files

Create Text File Report

Exit when done

Example 5

Compare two DOC Files

Create and open a CSV Report

Exit when done

Example 6

Compare two DOC Files

Create and open a DOC Report

Exit when done

Example 7

Compare two PDF Files with password "gonefishing"

Show Side by Side

Display status message after comparison


Example 1

DiffDoc /M "d:\a\Aristotle.TXT" /S "d:\a\Socrates.TXT" /V

This command line instructs DiffDoc to:

  • Compare two files "D:\A\Aristotle.TXT" to "D:\A\Socrates.TXT"
  • Display them in Side By Side mode.
  • Display the status of the comparison once completed (the / V switch - verbose).

 


Example 2

DiffDoc /M "d:\a\Aristotle.DOC" /S "d:\a\Socrates.DOC" /F1 /L D:\a\compare.LOG

This command line instructs DiffDoc to:

  • Compare two files "D:\A\Aristotle.DOC" to "D:\A\Socrates.Doc"
  • Display them in All In One mode (/F1).
  • Create a log file D:\a\Compare.LOG with the /L switch.

 


Example 3

DiffDoc /M "d:\a\Aristotle.DOC" /S "d:\a\Socrates.DOC" /F1 /R1 /T "D:\a\Report.HTM" /7"Geek Philosophers" /O /L"D:\A\compare.LOG" /X

This command line instructs DiffDoc to:

  • Compare two files "D:\A\Aristotle.DOC" to "D:\A\Socrates.Doc"
  • Display them in the All In One mode (/F1).
  • Generate an HTML report (/R1 /TD:\a\Report.htm) and a log file (/LD:\a\Compare.LOG).
  • Change the title of the html report (/7 "Geek Philosophers").
  • Open the report (/O) to be viewed once the comparison is done.
    Close DiffDoc once the comparison is done and the report has been opened (/X).


DiffDoc /M "d:\a\Aristotle.DOC" /S "d:\a\Socrates.DOC" /F2 /R1 /T "D:\a\Report.DOC" /7"Geek Philosophers" /O /L"D:\A\compare.LOG" /X

This variation of Example 3 instructs DiffDoc to:

  • Generate the same report as above, but side by side (/F2 replaces /F1).
  • Create the output report in html, but have it open in MS Word,  by giving the target file a *.DOC extension.

 


Example 4

DiffDoc /M "d:\a\Aristotle.DOC" /S "d:\a\Socrates.DOC"/R2 /T "D:\a\Report.TXT" /O /L "D:\A\compare.LOG" /X

This command line instructs DiffDoc to:

  • Compare two files "D:\A\Aristotle.DOC" to "D:\A\Socrates.Doc".
  • Generate a text report (/R2 /TD:\a\Report.TXT).
  • Generate a log file (/LD:\a\Compare.LOG).
  • Open the report (/O) to be viewed once the comparison is done.
  • Close DiffDoc once the comparison is done and the report has been opened (/X).

 


Example 5

DiffDoc /M "d:\a\Aristotle.DOC" /S "d:\a\Socrates.DOC" /R3 /T D:\a\Report.CSV /O /L D:\A\compare.LOG /X

This command line instructs DiffDoc to:

  • Compare two files "D:\A\Aristotle.DOC" to "D:\A\Socrates.Doc.
  • Generate a CSV report (/R3 /TD:\a\Report.CSV).
  • Generate a log file (/LD:\a\Compare.LOG).
  • Open the report (/O) to be viewed once the comparison is done.
  • Close DiffDoc once the comparison is done and the report has been opened (/X).

 


Example 6

DiffDoc /M "d:\a\Aristotle.DOC" /S "d:\a\Socrates.DOC" /R4 /T D:\a\Report.DOC /O /L D:\A\compare.LOG /X

This command line instructs DiffDoc to:

  • Compare two files "D:\A\Aristotle.DOC" to "D:\A\Socrates.Doc
  • Generate a DOC report (/R4 /TD:\a\Report.DOC).
  • Generate a log file (/LD:\a\Compare.LOG).
  • Open the report (/O) to be viewed once the comparison is done.
  • Close DiffDoc once the comparison is done and the report has been opened (/X).

 


Example 7

DiffDoc /M "C:\MyDocuments\FirstFile.PDF" /S "C:\MyDocuments\SecondFile.PDF" /8 gonefishing /F2 /V

This command line instructs DiffDoc to:

  • Compare two PDF files in the specified manner.
  • Handle PDFs with password protection (/8 password). In this case the password is gonefishing.
  • Display the results in the Side By Side mode (/F2).
  • Display  messages showing the status of the command line (/V).

See Also: