Announcement

Collapse
No announcement yet.

How To Compare Same Files with Different Filenames?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How To Compare Same Files with Different Filenames?

    I have a group of files that I copied from one server to another. With the new server, the files needed to be renamed. I am using Beyond Compare to show that the files are still matching even though I had to truncate the names after copying them.

    Example: xxxx_yyyy.txt would become yyyy.txt. Only the names changed, not the contents.

    I am trying to perform a content comparison and show the differences (if any). Thanks in advance.

  • #2
    Hello,

    Beyond Compare alignment is dependent on the name, and after the alignment we can then compare the content.

    BC4 Pro has a feature called Alignment Overrides, where you could define
    (.*)_.*\.txt = $1.txt
    as a regular expression rule to align a change like this. This is in the Session menu -> Session Settings, Misc tab. If you are registered for Std edition, you can revert to trial mode to test this:
    http://www.scootersoftware.com/suppo...?zz=kb_evalpro
    Aaron P Scooter Software

    Comment


    • #3
      Originally posted by Aaron View Post
      Hello,

      Beyond Compare alignment is dependent on the name, and after the alignment we can then compare the content.

      BC4 Pro has a feature called Alignment Overrides, where you could define
      (.*)_.*\.txt = $1.txt
      as a regular expression rule to align a change like this. This is in the Session menu -> Session Settings, Misc tab. If you are registered for Std edition, you can revert to trial mode to test this:
      http://www.scootersoftware.com/suppo...?zz=kb_evalpro
      I was unable to figure out the wildcards.

      I will give you the exact names I am trying to align....

      12280422_1of1.prn needs to align with 12280421_12280422_1of1.prn.

      I just basically need to ignore the first 9 characters of the files on the right side.

      Comment


      • #4
        Ok I aligned the files but I wanted them to show on the same row. Because the filenames are different, its showing the file on the left and then the aligned file on the right one line up.

        Comment


        • #5
          Is there a way to ignore the filenames when comparing? I am basically trying to match the filesize, date, CRC. Thanks.

          Comment


          • #6
            No, we do not have a method of aligning on different content at this time.

            For these example files, due to a limitation in our Alignment Overrides, the longer name needs to be on the Left side. You can use the Swap command to swap base folder locations.
            Then use a RegEx like:
            [^_]+_(.*)\.prn
            =
            $1.prn
            Aaron P Scooter Software

            Comment


            • #7
              Originally posted by Aaron View Post
              No, we do not have a method of aligning on different content at this time.

              For these example files, due to a limitation in our Alignment Overrides, the longer name needs to be on the Left side. You can use the Swap command to swap base folder locations.
              Then use a RegEx like:
              [^_]+_(.*)\.prn
              =
              $1.prn
              I tried that and it just blanked the entire session (no files shown).

              I just read about manual align with. I tried that but when I selected the two files to manually align, the session shows no files.

              Comment


              • #8
                Originally posted by donb View Post
                I tried that and it just blanked the entire session (no files shown).

                I just read about manual align with. I tried that but when I selected the two files to manually align, the session shows no files.
                I had to select Ignore Folder Structure.

                Comment


                • #9
                  Hello,

                  Showing no files? Do you have a Display Filter set to only Show Differences or Show Same? If the new alignment was then a different criteria (equal, but Show Difference enabled), then they'd be removed.

                  Alignment (manual or the above rule) only works on an equal folder tree level. Ignore Folder Structure removes the folder structure, and aligns any equal file names (or alignment overridden) as if they were in a single large bucket.
                  Aaron P Scooter Software

                  Comment


                  • #10
                    Display was set to All *.* .

                    Comment


                    • #11
                      We may need a bit more information to help troubleshoot this. Perhaps work with a very small test folder set (a dozen files) with before and after screenshots?

                      Triggering an alignment would refresh the display, the aligned file pair might be pushed up or down based on where its new position would be.

                      You can post here or email us at support@scootersoftware.com (with a link back to this forum thread for reference).
                      Aaron P Scooter Software

                      Comment


                      • #12
                        Ignore folder structure resolved the issue.

                        Comment


                        • #13
                          +1

                          Just noticed this thread.
                          Have the same issue (see my thread).
                          My suggestion was/is to add a new option to 'Rules'
                          'Ignore filename comparison'

                          Filename comparison is 'ON' by default, hardcoded I think.
                          But -only- when CRC comparison is selected, then this new option, let's say it is displayed under 'Compare versions' and
                          greyed out-tagged by default, becomes accessible and users can untag that option.

                          Once selecting comparing on CRC then untag that.
                          (see my post)

                          =

                          Comment


                          • #14
                            Originally posted by bcdewul View Post
                            +1

                            Just noticed this thread.
                            Have the same issue (see my thread).
                            My suggestion was/is to add a new option to 'Rules'
                            'Ignore filename comparison'

                            Filename comparison is 'ON' by default, hardcoded I think.
                            But -only- when CRC comparison is selected, then this new option, let's say it is displayed under 'Compare versions' and
                            greyed out-tagged by default, becomes accessible and users can untag that option.

                            Once selecting comparing on CRC then untag that.
                            (see my post)

                            =
                            Its not there (see attached screenshot).
                            Attached Files

                            Comment


                            • #15
                              Indeed, it isn't there, regretfully so.

                              My suggestion was: to add that [new!] option there.
                              Ignore filenames: by default greyed out
                              Once CRC comparison is selected, then it can be tagged, so there is no filename comparison but just on hash.

                              Trying to illustrate what I mean, see below.

                              =

                              =

                              Hopefully Scooter Software developers will consider this...
                              If I am not mistaken, I think this is something similar has been requested before by others.

                              =

                              Comment

                              Working...
                              X