Announcement

Collapse
No announcement yet.

2 file report ignoring files with no differences?

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

  • 2 file report ignoring files with no differences?

    Hello,

    I have a script that generates an html report for 2 files.

    Code:
     file-report layout:side-by-side options:display-mismatches,line-numbers output-to:%3 output-options:html-color %1 %2
    However I have over 2000 files to compare and don't want to generate a report for the ones that are the same. Is there a way to do this?

    Thank you!

  • #2
    Re: 2 file report ignoring files with no differenc

    It is possible to only generate a report of files that are different in your two directories.

    Code:
    criteria rules-based
    load c:\folder1 c:\folder2
    expand all
    select diff.files
    file-report layout:side-by-side options:display-mismatches,line-numbers output-to:report.html output-options:html-color
    If you don't pass filenames at the end, file-report will operate on the currently selected files.
    Chris K Scooter Software

    Comment


    • #3
      Re: 2 file report ignoring files with no differences?

      I tried this with two files that are identicle and the report is still generated. All it has in it is the path of the left and right files but it still is generated.

      Is there a way to not generate a report at all if there are no diffs between two files?

      Comment


      • #4
        Re: 2 file report ignoring files with no differenc

        Beyond Compare will always generate a report file, even if there are no differences and you only display mismatches.

        This is on our wish list for a future version.
        Chris K Scooter Software

        Comment


        • #5
          Re: 2 file report ignoring files with no differenc

          I may have a workaround: use the quick compare to see if error code is 2, indicating a mismatch. If so then generate a file report.

          Does this sound reasonable?

          Comment


          • #6
            Re: 2 file report ignoring files with no differenc

            The quick compare is limited to comparing a pair of files. It won't currently compare directories, so it probably won't work out to use the quick compare first.
            Chris K Scooter Software

            Comment


            • #7
              Re: 2 file report ignoring files with no differenc

              I have exactly this requirement.
              In interactive mode it is possible, and I thought the following script should work:

              load "foldera" "folderb"
              select all
              compare rules-based
              select diff.files
              file-report layout:side-by-side options:display-mismatches output-torinter output-optionsrint-mono,print-landscape

              But the "select diff.files" has a different meaning.
              What is required instead is the script command "select mismatch.files"

              This should not be too hard?

              Comment


              • #8
                Re: 2 file report ignoring files with no differenc

                mismatch.files isn't a valid selection.

                Try using this script instead:
                Code:
                criteria rules-based
                load "foldera" "folderb"
                expand all
                select diff.files
                file-report layout:side-by-side options:display-mismatches output-to:printer output-options:print-mono,print-landscape
                Let me know if the above script doesn't give you the output you're looking for.
                Chris K Scooter Software

                Comment


                • #9
                  Re: 2 file report ignoring files with no differenc

                  This produces the desired result.
                  Thank you.

                  Comment

                  Working...
                  X