Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2013
    Posts
    2

    Default Generating HTML only when differences exist

    Hello,


    Could you, please, help me ?

    Indeed, I use the following script in order to compare files:

    text-report layout:side-by-side &
    options:ignore-unimportant,display-context &
    output-to:%3 output-options:html-color %1 %2

    By calling it like this

    BCompare.exe @"compare_file_script.txt" "file1.txt" "file2.txt" "REPORT.html"

    I would like to know if it is possible to not generate the report if the files are identic ?

    Thanks in advance

    Best Regards

    Jeannot

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

    Default

    Hello,

    It is not possible using only BCScript. A bcompare.exe "@script.txt" will always generate the report.

    You could create a wrapper around this script call using another scripting language (like a bat file) to check the comparison of the two files, and then only call the BCScript if the files are different.

    Within the overall script file, you can setup a call to:
    bcomp.com /qc "file1.txt" "file2.txt"

    which would return an ErrorLevel. Check this error level and skip the script call if it returns 1 or 2. You can see a full list of ErrorLevel values in our Help file -> Command Line Reference chapter, at the very bottom of the chapter.
    Aaron P Scooter Software

  3. #3
    Join Date
    Apr 2013
    Posts
    2

    Default

    Hello,

    thanks for you answer !!!

    Best regards

    jeannot

Posting Permissions

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