Announcement

Collapse
No announcement yet.

Comparing contents of two files?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Comparing contents of two files?

    We need to compare a 'before' text file with an 'after', and print a differences and summary report in PDF format. I've figured out how to do this via commandline and GUI (no script), but all that does is open the two text files and displays in the side-by-side comparison. I then have to do the Print step to get both reports.

    .\bcomp.com <before.txt> <after.txt> /fv="text compare"

    How can I compare the contents of two text files via script? I've tried quite a few things, like this:

    .\bcompare.exe "@instructions.txt" "<before>" "<after>"

    where Instructions.txt =
    text-report layout:side-by-side options:display-all,line-numbers &
    output-torinter output-optionsrint-color,wrap-word

    I've changed Instructions.txt quite a few times and I can get a PDF to be generated, but it's always blank... Any help would be appreciative

  • #2
    Hello,

    You almost have it with your instructions.txt as is here. All you need to do is add references to the files:
    Code:
    text-report layout:side-by-side options:display-all,line-numbers &
    output-to:"%3" output-option:html-color "%1" "%2"
    With
    .\bcompare.exe "@c:\instruction.txt" "before.txt" "after.txt" "c:\reportfile.html"


    The %1 refers to the first argument passed on the command line. Alternatively, you can type that text into the script directly referencing file paths:
    Code:
    text-report layout:side-by-side options:display-all,line-numbers &
    output-to:"c:\reportfile.html" output-option:html-color "c:\before.txt" "c:\after.txt"
    with
    bcompare.exe "@c:\instruction.txt"

    Once this is working, I would then suggest attempting to re-integrate your print to PDF.
    Aaron P Scooter Software

    Comment

    Working...
    X