Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2012
    Posts
    2

    Default compare files in a batch

    Hello everyone,

    I have 2 folders with inputfile and outputfile (same filename).
    I would like to compare every same filename and write the differences in a file report.

    Is there a way to do this in a batch?

    So:
    c:\input\file1.xml
    c:\input\file2.xml

    c:\output\file1.xml
    c:\output\file2.xml

    c:\results\report-file1.html
    c:\results\report-file2.html

    I allready have

    batch
    "C:\Program Files\Beyond Compare 2\BC2.exe" @C:\tools\Compare.script "C:\input" "C:\output" /silent

    Compare.script
    load "C:\input" "C:\output"
    filter "*.xml"
    expand all
    select all
    file-report layout:side-by-side options:display-mismatches output-to:"C:\results\compare_report.html" output-options:wrap-word,html-color

    but it's everything in one report!

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,376

    Default

    Hello,

    Yes, when selecting multiple files, it will generate a single report. You would need to perform multiple file reports on multiple pairs of files to generate a new report each time (given a new "output-to:c:\report3.html" each time, which can be done by using a 3rd parameter: output-to:%3).

    bc2.exe "@c:\bcscript.txt" "c:\file1.txt" "c:\file2.txt" "c:\bcreport1.html"

    where bcscript.txt is:
    file-report layout:side-by-side options:display-mismatches output-to:"%3" output-options:wrap-word,html-color "%1" "%2"

    We do not have an automated method to create or pass the list of files to separate reports; this would need to be done with a separate script.
    Aaron P Scooter Software

  3. #3
    Join Date
    Aug 2012
    Posts
    2

    Default

    Hi Aaron, This worked really fine!! Thnx for the support.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •