Comparing lists and outputting only exact line matches or orphans

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mutos
    Visitor
    • Jan 2015
    • 3

    Comparing lists and outputting only exact line matches or orphans

    Hello all,


    I want to compare two versions of a list. I know there can be only three cases for a line :
    • Identical in both lists,
    • Present in left side, absent from right side,
    • Absent from left side, present in right side.


    Currently, text comparison displays inline difference, so I can't get it to only display whether or not a line is strictly identical to its counterpart.

    I thought this would be easy to find, a simple switch somewhere in the options, but nope, I've searched quite thoroughly and didn't find a clue. Also searched in the forums, but found nothing.

    Thanks for any hint !
    Last edited by Mutos; 02-Jan-2018, 06:55 AM.
  • Aaron
    Team Scooter
    • Oct 2007
    • 15997

    #2
    Hello,

    First, you'll need to right click the toolbar to switch to Toggles mode. You can then show only Left, Right, or aligned Differences, or Same.

    Are your lines already sorted and aligning? You can set the Session menu -> Session Settings, Alignment, Standard and enable "Never align differences" to allow only exact matches to align. If you need to Sort, you can switch to to the Sorted file format under the Rules button dropdown (or Format tab of the Session Settings).
    Aaron P Scooter Software

    Comment

    • krza
      Journeyman
      • Mar 2017
      • 10

      #3
      Does not work. I have tried out a lot of options and settings but it does not do it. Both sides are sorted already. It´s exactly the scenario which Mutos describes. But it does not find the matches.

      What am I doing wrong?

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 15997

        #4
        It would help if we had a full screen screenshot of what you were seeing. You can post here or email us at [email protected] with a link back to this forum thread.

        Are the left and right lines not pairing up as expected in the Text Compare? This is controlled by the Session menu -> Session Settings, Alignment tab, which may need to be customized to find a good method to align the correct pairs for your files.
        Aaron P Scooter Software

        Comment

        • milpan
          New User
          • Mar 2023
          • 1

          #5
          I was looking for a similar feature (in case I understood krza correctly).
          It would be something like this: http://www.listdiff.com/compare-2-lists-difference-tool
          It compares two lists and doesn't care about order.

          Is there a way to do that with Beyond Compare?

          Thanks

          Comment

          • Aaron
            Team Scooter
            • Oct 2007
            • 15997

            #6
            Hello,

            BC4's views care about the order, but we have Sort methods, depending on which viewer you are in.

            The Text Compare has a Sort file format which will sort all the lines in alphabetical order. If any edits are made and the file is saved, it does save in the new ordering. The viewer picks the top-most default format assigned to the file extension, and sort has no extension by default, but can be manually picked using the toolbar's Format button (small dropdown arrow next to it) to override the current format. It is also selectable in the Session menu -> Session Settings, Format tab.

            The Table Compare defaults to a cell-based, table view, where Column 1 is the default Key, and the Key is sorted and aligned by. If your data in a delimited or fixed-width format that would work for a Table view?

            You can also use any conversion utility to pre-process your files to re-order the content. We have an example of that (using RESX as the example) here:
            https://www.scootersoftware.com/supp...rnalconversion
            Aaron P Scooter Software

            Comment

            Working...