Text-report to only show differences, not matching files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Statek
    Visitor
    • Aug 2015
    • 5

    Text-report to only show differences, not matching files

    Hey there.
    First of all, I'd just like to say that BeyondCompare is an invaluable tool - so thank you!

    I'm getting a report emailed to me daily after files are compared overnight.
    I am getting a large report which lists all the files with differences as well as the files that have been checked that are matching.
    Is there any way for the report to only list and show the files with differences?

    The script I currently have configured is:

    criteria rules-based
    load "%1" "%2"
    expand all
    select all.diff
    text-report layout:side-by-side &
    options:ignore-unimportant,display-mismatches &
    output-to:"%3\Audit2.html" output-options:html-color


    ..and my report looks something like this (except many, many, many pages):
    Click image for larger version

Name:	Screenshot_2015-09-01@09-40-52.png
Views:	1
Size:	226.5 KB
ID:	76903

    I know I can press the =/= icon in BeyondCompare to only show differences, but how to output this into the report?
    Cheers,
    Kris.
  • Aaron
    Team Scooter
    • Oct 2007
    • 15997

    #2
    Hello,

    The above script should work as you expect. Which version of Beyond Compare are you running? The latest BC 3.3.13?

    The key is the select all.diff is controlling the extra entries you are seeing. With a rules-based scan, and select all.diff, this should leave you with a selection of only the files that have diffs in them, so the report should only have the files that have a diff present. If you run the script from the Windows Command Prompt, does it work in this simpler test scenario?
    Aaron P Scooter Software

    Comment

    • Statek
      Visitor
      • Aug 2015
      • 5

      #3
      Thanks for your reply Aaron

      I am running BC 3.3.13.
      I'm running the script from the Command Prompt, and the HTML output file is displaying ALL compared files.
      The header of the HTML file is:

      Text Compare
      Produced: 8/09/2015 8:49:04 a.m.

      Mode: Differences, Ignoring Unimportant
      Left base folder: D:\Reports\Master Copy
      Right base folder: D:\Reports\Latest


      ..and it continues by listing each file compared.
      If no difference is found, only the file location is shown, e.g.: File: FolderName\subFolderName\FileName.csv
      If a difference is found, the file location is shown, and differences are displayed below this.

      What else should I look at, so only the files with differences are listed? Have I missed a setting in Beyond Compare?

      Regards, Kris.

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 15997

        #4
        Thanks. I think we need to update "select all.diff" to "select all.diff.files". If you have subfolders, this would explain the behavior you are seeing.
        Aaron P Scooter Software

        Comment

        • Statek
          Visitor
          • Aug 2015
          • 5

          #5
          Hi Aaron

          I have changed my script from "select all.diff" to "select all.diff.files" but it hasn't made any difference.
          By "we need to update" did you mean you, the developers?

          Cheers!
          Kris

          Comment

          • Aaron
            Team Scooter
            • Oct 2007
            • 15997

            #6
            No, sorry, I was just referring to the text. I originally tested your script with all.diff and it works as expected without the extra entries, but my test folders were probably too simple. With a more complex folder structure you would need all.diff.files.

            Could you email in to us at [email protected] with:
            - A copy of your BCSupport.zip from the Help menu -> Support; Export
            - A copy of your script as a file
            - add:
            log verbose c:\bclog\bclog.txt
            as the first line of your script and re-run, the attach this log as well.
            - A link back to this forum thread for our reference.
            Aaron P Scooter Software

            Comment

            • Statek
              Visitor
              • Aug 2015
              • 5

              #7
              I have sent an email, included the requested files and have also added the files generated by the script, as examples.

              Many thanks
              Kris

              Comment

              • Aaron
                Team Scooter
                • Oct 2007
                • 15997

                #8
                Thanks. We got the script, and I noticed it was an older version that was still using all.diff. I updated to all.diff.files. Does this help?
                Aaron P Scooter Software

                Comment

                • Statek
                  Visitor
                  • Aug 2015
                  • 5

                  #9
                  Thanks to Aaron for solving the issue.

                  For anyone else who strikes this problem, I quote his last email with the solution:
                  "Ah hah! I found the issue you are hitting. You have a saved "ignore-unimportant-session" setup but your script is not loading it.
                  Script always uses factory defaults (to allow copying a script to other users) rather than global defaults. The script workaround to use defaults is "load <default>", but in this case I recommend the explicit "load ignore-unimportant-session" as the first line, then set criteria, then load your folder pair."

                  This means I only get a report of the broken files, and all matching files are not shown, nice and clean.

                  Thanks again Aaron!

                  Comment

                  • AjitPandey
                    Journeyman
                    • Oct 2015
                    • 12

                    #10
                    Where did the "ignore-unimportant-session come from? In the original question from Statek, there is no mention of any session.

                    Comment

                    • Aaron
                      Team Scooter
                      • Oct 2007
                      • 15997

                      #11
                      In email we received a copy of the settings, and the script is using a Rules-based comparison.

                      If the criteria is Rules-based and you need to ignore unimportant changes, you will want to first setup a saved session in the graphical interface that has this enabled. This is tackled in one of two ways:
                      -Save a Folder Compare session with your folders loaded, criteria set to Rules-based, and the Ignore Unimportant Differences toolbar enabled. If you load this session in script, it will load all of these settings and work as expected
                      -Save a blank Folder Compare session with no options changed except for the Ignore Unimportant Differences toggle enabled with the name "IgnoreUnimportantSession". Then in script, add an extra load before your other commands:
                      load "IgnoreUnimportantSession"
                      criteria rules-based
                      load "c:\folder1" "c:\folder2"
                      expand all
                      ....
                      Aaron P Scooter Software

                      Comment

                      Working...