Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2009
    Posts
    1

    Unhappy How to ignore Line Ordering?

    Hello,
    I'm having a frustrating issue with BC3. I'm hoping I'm just missing an obvious check-box somewhere - what I'm trying to do is very basic.

    So, I have two 500 line-long configuration files (plaintext ini's) that I need to compare. Most configuration lines/parameters are present & identical in the two files, however the line orders are completely different. This seems to confuse the hell out of BC, highlighting everything red as they aren't in the expected positions within the file. i.e. parameter line #1 from the left file might have an identical line in the right file, however it is located at line #466 - both are highlighted as differences!

    So, how do I configure BC to ignore the ordering of lines between the two files, and to only highlight line parameters which are either not present or set to a different value between the files?

    Any help appreciated!

    Thanks,
    Alistair

  2. #2
    Join Date
    Oct 2007
    Location
    Pennsylvania
    Posts
    1,772

    Default

    BC3 can only ignore line order in a data compare. You could try viewing the files in a data compare, but could not update anything since a data compare is currently read-only. The other obvious option is to pre-process the files by sorting them before using BC to compare them.
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

  3. #3
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,584

    Default

    If that Data Compare isn't an option for you, you can select to use the "Sorted" file format in the Text Compare to sort the files before comparison. To force a specific format, select it from the dropdown next to the file formats button. You can also access it in the "Format" tab of "Session > Session Settings".
    Chris K Scooter Software

  4. #4
    Join Date
    May 2011
    Posts
    18

    Default

    Im looking at trying to do this exact same thing but with BC2 on the command line. We are getting lots and lots of differances reported when in fact its just a case of the lines not matching up in the same location.
    Any help please?

  5. #5
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,584

    Default

    Hi rob3770,

    In BC2, you can sort text in the File Viewer using the "Sort" rule here:
    http://www.scootersoftware.com/downl...z=kb_morerules

    Once you've installed the rule, select "Tools > Options". Go to the "Rules" section. Edit the sort rule, and add a file mask that matches your files so it is used as the default rule for those file types. Multiple file extensions are separated by semicolons, such as "*.c;*.h".
    Chris K Scooter Software

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •