scriptingbeyondcompare4

Beyond Compare text-report on all the files from given folders


my goal is to run text-report on all the files from folder A and B and get as an output html-file with all of the differences between corresponding files. The best would be, if it was just one output file. Is there a way to do it without calling text-report iteratively?

My current script looks like this:

log normal log.txt
text-report layout:side-by-side options:ignore-unimportant,display-mismatches
& output-to:"%3" output-options:html-color "%1" "%2"

I could use folder-report with links to the output of file comparison, but this does not support text-report options which I am after i.e. ignore-unimportant,display-mismatches. At least as far as I know, but I am new to this tool.

I will be very happy about any answer. If it is really not possible I will try to do it differently.


Solution

  • Beyond Compare's text-report scripting command operates on a pair of named files or on selected files. Use the latter method (selected files) to generate a single report for all files in a pair of folders.

    log normal log.txt
    load c:\folder1 c:\folder2
    expand all
    select all.files
    text-report layout:side-by-side options:ignore-unimportant,display-mismatches
    & output-to:c:\out.html output-options:html-color
    

    To limit the report to files with differences, modify the select command and add a criteria command.

    log normal log.txt
    criteria rules-based ignore-unimportant
    load c:\folder1 c:\folder2
    expand all
    select diff.files orphan.files
    text-report layout:side-by-side options:ignore-unimportant,display-mismatches
    & output-to:c:\out.html output-options:html-color