Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Feb 2017
    Posts
    16

    Default 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. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,609

    Default

    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

  3. #3
    Join Date
    Feb 2017
    Posts
    16

    Default

    Quote 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.

  4. #4
    Join Date
    Feb 2017
    Posts
    16

    Default

    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.

  5. #5
    Join Date
    Feb 2017
    Posts
    16

    Default

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

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,609

    Default

    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

  7. #7
    Join Date
    Feb 2017
    Posts
    16

    Default

    Quote 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.

  8. #8
    Join Date
    Feb 2017
    Posts
    16

    Default

    Quote 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.

  9. #9
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,609

    Default

    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

  10. #10
    Join Date
    Feb 2017
    Posts
    16

    Default

    Display was set to All *.* .

Posting Permissions

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