No announcement yet.

Binary Comparison on File Headers "Only"

  • Filter
  • Time
  • Show
Clear All
new posts

  • Binary Comparison on File Headers "Only"

    I am a novice in the B-Compare world, but I have scoured the posts and haven't found a solution to my problem.

    I'm trying to isolate files headers and ensure that at a binary level, the header's are equivalent to "approved" headers. The reasoning behind this request, is that there have been encoding issues in the past, when saving a csv file from a p.c. in comparison to saving on an Apple.

    Any solutions/advice, on solutions to this problem, would be greatly appreciated!!!

  • #2

    Beyond Compare will ignore line break differences (Mac vs. PC line ending characters) by default, but you can configure BC4's Rules-based scan to catch this. You will need to go here, and download the text format for CSV files:

    Then, in the Text Compare, Session Settings, Importance tab, check "Compare line endings (PC/Mac/Unix)". This will consider a line ending change to be important. You can then update the dropdown at the bottom for "Use for this view only" or "Also update session defaults" to use for future text comparisons or rules-based scans. If you update session defaults, you can load a pair of folders, and in the Folder Compare's Session menu -> Session Settings, Comparison tab, leave Timestamp, Size, and Override enabled, and also enable Rules-based (which uses the Text Compare's session defaults).

    Is this the type of comparison and difference you are hoping to catch? Let us know if you have any questions.
    Aaron P Scooter Software


    • #3
      Thanks Aaron,

      Really appreciate the quick response. I'll start digging into that.



      • #4
        To be more specific, I want to ignore the data outside of the header line.

        The data will change month to month, but the headers need to be consistent. So the hope is to only analyze discrepancies between the headers and ignore any other data below the header. If the solution mentioned above does this, I apologize, I'll look further into the link that you gave. Thanks again for your help.


        • #5

          If the Header is a line of text, and is the only line you wish to compare, you could define a grammar element to match on the first line. Then, in the Text Compare's Session Settings, you can check that grammar element name (making it Important) and uncheck all other items. This would then only compare that first line.

          You probably wouldn't want to make this the default, however. Instead, start a specific Folder Compare session with your folders on the left and right. Save this session. Then double click a pair of files, while viewing them, update the Session Settings Importance tab, and update the dropdown from "use for this view only" to "use for all files in parent session". Then click Ok, close the Text Compare, and re-save the parent Folder Compare session that is configured to run a Rules-based scan. Note, this still requires the CSV Text format installed from our website.

          Note, we have a video here about defining grammar formats:

          Instead of unchecking the one you defined, however, you'd leave it checked and uncheck the other items and the Everything Else item at the bottom. Checked items are Important, while Unchecked items are Unimportant for a rules-based scan.
          Aaron P Scooter Software