Text files - Comparison rule - If line present, do not report as missing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bckoe
    New User
    • Oct 2008
    • 1

    Text files - Comparison rule - If line present, do not report as missing

    Hello,

    I am interested in possibly enabling a comparison rule between text files (A,B) so that a line from the first file (A) is NOT part of the reported differences, whenever such line is included (at the same position or elsewhere) in the 2nd file (B).

    Example:

    File A contents:
    <line1>bird
    <line2>parish
    <line3>boston garden

    File B contents:
    <line1>parish
    <line2>bird
    <line3>staples centre

    Differences:
    The following lines are not reported as differences since they are included in the file B (altough at different positions):
    <line1>parish
    <line2>bird

    The following lines are reported as different:
    >>>>> <line3>boston garden vs. <line3>staples centre <<<<<

    If this is doable, the aim is to then expand this type of comparison to folder level.

    Thank you.
    SK
    BeyondCompare v.2.4.3 (build243)
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    Beyond Compare compares files in order, so if lines are in a different order it will be detected as a difference.

    If your text can be sorted, BC does have a sort rule that sorts lines of text before comparison, so that might work for your example. You can get the sort rule for BC2 from: http://www.scootersoftware.com/downl...z=kb_morerules

    The sort rule is included in BC3. To sort in BC3, just select "Sorted" from the file formats list.
    Chris K Scooter Software

    Comment

    Working...