No announcement yet.

Ignoring specific lines

  • Filter
  • Time
  • Show
Clear All
new posts

  • Ignoring specific lines


    I need to compare a whole lot of generated code files.
    The files should be identical except for some lines containing date & time.
    These lines typically start with a known prefix for example:
    DATE: 8 Apr 2007

    Is it possible to create some kind of rule which causes BC to ignore such lines?


  • #2
    Re: Ignoring specific lines

    It isn't possible to configure a rule from a script, so you'll have to create a rule in an interactive session of BC. If you use "criteria rules-based" in your script, it will compare the text contents of your files using the defined rule. The rule will also be used by the file-report command.

    For details on configuring a rule, see this earlier thread:

    Rules are also covered in the Rules section of Beyond Compare's help file.
    Chris K Scooter Software


    • #3
      Re: Ignoring specific lines

      If the OP's "prefix lines" change often, he'll need a way to update the rules before invoking BC. The rules are stored in XML, but the OP probably wants to do the first draft of the rule interactively through the appropriate menu.

      (Chris previously pointed out to me that the menu is the best way to write a rule; in another thread I was trying to start from scratch by modelling off of the examples in the download section).