Announcement

Collapse
No announcement yet.

Rule based compare

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Rule based compare

    I want to use BYC for synchronising/comparing JPG files from my digital camera.
    The save versions reside on a network drive. Additionally to the name/date compare I wanted a content compare, but not a full binary one, I decided to do a partial compare.
    I therefore wrote a little exe which reads a couple blocks of the JPG and builds a SHA1 fingerprint (a type of checksum), an writes it into a file.
    Then I defined a rule for JPG and refer to my EXE.

    in a simple data (file) compare, it generates now 2 files with equal or different conversion file with the appropriate SHA1. BYC decides according to the SHA1 if file is equal or different. This works perfectly fine.

    I expected now that it would work in folder compare equally. I changed the compare rule to "rule-based" and compare 2 directories both containing JPGs. Unfortunately the compare starts now with a binary compare instead of calling my EXE. A binary compare takes as one folder is on a network drive much too long.

    I wonder now: do I misunderstand the way folder compare works, or do I miss an additional setting which is necessary to work as in a simple file compare? If I click on a file pair in the folder lists my SHA1 compare is performed.

  • #2
    Originally posted by PeterJ
    .....

    I wonder now: do I misunderstand the way folder compare works, or do I miss an additional setting which is necessary to work as in a simple file compare? If I click on a file pair in the folder lists my SHA1 compare is performed.
    Was wondering if you have your compare high in the file formats list? ahead of other items that cover jpegs?

    from file format management:

    The order of the list is important. When Beyond Compare looks for a file format to use on a file, it scans this list from top to bottom, stopping on the first match in the File Types field. If an item shows in red, it means that prior items cover the file types, so the file format will never be automatically selected (although you can manually select any file format). To change the order of the list, highlight an item and click Move Up or Move Down .

    So does your compare show there in red? move it up then

    Comment


    • #3
      Thanks for suggestion, but it is already the topmost item.

      Comment


      • #4
        When you select "rules-based" comparison in the Folder Compare, BC performs a binary comparison first. If the files are a binary match, then BC skips running the rules-based compare and returns a comparison result of match. If the binary comparison is different, then BC does a rules-based comparison, typically comparing the text of files.

        BC does this because binary comparison is much faster than rules-based comparison. If you have many files that are an exact binary match, then the comparison is much faster.

        It isn't possible to change this behavior.

        If the network drive is locally attached to a Windows PC, you can run BC on that system and generate a snapshot file (using Tools > Save Snapshot) with saved CRC values. Then copy the snapshot file to your computer and compare it against the new files.
        Chris K Scooter Software

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎