Announcement

Collapse
No announcement yet.

Generating HTML only when differences exist

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

  • Jeannot
    replied
    Hello,

    thanks for you answer !!!

    Best regards

    jeannot

    Leave a comment:


  • Aaron
    replied
    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.

    Leave a comment:


  • Jeannot
    started a topic Generating HTML only when differences exist

    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
Working...
X