Questions and issues with rules-based comparison

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • daluu
    Journeyman
    • Nov 2010
    • 12

    Questions and issues with rules-based comparison

    I looked over the script command reference and the sample scripts section and hyperlinks in those areas that point to more info on rules, and couldn't quite get all the info/clarification I need.

    Looking at the other areas of the help file, pertaining to the GUI to do comparisons, the filtering and rules comparison was easier to understand, I think.

    For scripting, can someone clarify how "criteria rules-based" works? Does it also require an accompanying "filter [option/settings]" command before or after the rules-based criteria command?

    And this rules-based comparison works against both folder and file/text/data compare?

    And last, I found a particular issue that the BC log doesn't clarify:

    This command is accepted by BC w/o any complaints:

    Code:
    criteria version timestamp:2sec;IgnoreDST size binary timezone:ignore
    However, when I add rules-based in there, BC complains about:

    Code:
    11/6/2010 9:05:36 PM  Fatal Scripting Error: Unexpected argument(s) "rules-based"
    Which doesn't say much. According to the script command reference, there is no statement that says you can only have 2 or less comparison criteria between the 4 available in the group (size, CRC, binary, rules-based). And it wasn't made very clear whether they had to be in a certain order like the order I presented which is what is listed in the help file.

    More clarification in this area would be helpful. If there is already "enough" clarified info out there, someone please point me to it.
  • Aaron
    Team Scooter
    • Oct 2007
    • 16017

    #2
    Hello,

    Rules-based, Binary, and CRC are the 3 methods we use for a content comparison. In the graphical interface, these are in the Folder Compare session, Session menu -> Session Settings -> Comparison tab. Here you can see the various options you have set in script, and how they boil down between Quick Tests and Requires Opening Files. If it requires opening the file, it is a longer comparison since it cannot simply look at the file attributes.

    A rules-based comparison specifically compares the text inside of text files. It is as if you double-clicked on the file and used the file specific comparison (Text Compare, MP3 Compare, or whichever is the Compare type default for that file). Binary and CRC scan the file on a whole and return if the files are binary equivalent or if the CRC codes are identical.
    Aaron P Scooter Software

    Comment

    • daluu
      Journeyman
      • Nov 2010
      • 12

      #3
      Thanks, I'll try your suggestions.

      But can someone respond on why the script complains about the unexpected rules-based argument I got. Perhaps someone can describe how to use rules-based comparison together with size and binary comparison (unless that is not possible) in a script sample, as part of the criteria script command. Or does it have to be broken down as multiple criteria commands?

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16017

        #4
        Hello,

        You would pick to use either Rules-based, CRC, or Binary. You can't perform a combination of those commands. In the Scripting Reference, the commands are listed as a single bullet point. Also, if you boot up the graphical interface, you can see that the commands are part of a single radial selection (only one can be selected). Scripting in general is designed to mirror actions you can take in the graphical interface; it is often beneficial to test out your "script" interactively walking through the steps, and then going back to create the automated solution.

        I hope that helps clear up the behavior you are seeing. Let us know if you have any questions.
        Aaron P Scooter Software

        Comment

        Working...