Page 2 of 7 FirstFirst 1234 ... LastLast
Results 11 to 20 of 69
  1. #11
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,384

    Default

    Could you post 2 or 3 specific filename pairs you would like to see aligned? You can post here or email us privately at support@scootersoftware.com. If you email us, please include a link back to this forum post for reference. A full screen screenshot may help as well.
    Aaron P Scooter Software

  2. #12
    Join Date
    Oct 2010
    Posts
    53

    Lightbulb

    Quote Originally Posted by Aaron View Post
    Could you post 2 or 3 specific filename pairs you would like to see aligned? You can post here or email us privately at support@scootersoftware.com. If you email us, please include a link back to this forum post for reference. A full screen screenshot may help as well.
    Can I suggest you confirm that the solutions offered here either do or do not work?

    @Michael Bulgrien offers a regex and some example filenames to test his solution, here:
    http://www.scootersoftware.com/vbull...06&postcount=3

    and here: http://www.scootersoftware.com/vbull...51&postcount=7

    And I've offered my specific case here:
    http://www.scootersoftware.com/vbull...36&postcount=5

    I would think this would be enough for you to recreate my problem and see if the solutions actually work.

  3. #13
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,384

    Default

    Michael's solution uses your original examples as a template. The {7} represents matching the first 7 characters.
    alpha123.txt
    to
    alpha12.txt

    For his first example, slightly modified, to work on your .eml file pair:
    Left:
    (.{95}).*\.eml
    Right:
    $1.eml
    (Regular Expression Enabled)

    Assuming the longer file name is on the left.
    Aaron P Scooter Software

  4. #14
    Join Date
    Oct 2010
    Posts
    53

    Post

    Here's my situation in more detail:








    What I'd like is for the solutions offered here to be confirmed as working or not working and if working I'd like the steps taken because it is not clear to me, after doing as advised then what next am I supposed to do? Re-run the compare or what. I've tried different lengths 95, 40, 7. Settings: for this view, "also update session defaults", rules based compare, binary compare.

    none seem to work

    and what about the solution...

    Left:
    (.{95}).*\.eml
    Right:
    $1.eml
    (Regular Expression Enabled)


    Presumably the . in the .{95} means any character, but does that include whitespace?

    Presumably the ( ) in the (.{95}) is the regex grouping which puts the match of the string it finds into $1

    But what about the .* after the (.{95}) ? if we've already found our match do we need to deal with any other characters?

    The \. is an escape code to allow the period/fullstop . to be treated literally rather than as a regex operation. But why is this not used in the right hand side?

  5. #15
    Join Date
    Oct 2010
    Posts
    53

    Lightbulb

    The other solution would be for me to write a script to truncate, uniquely each filename exceed the UDF1.02 file length limit, before burning to disc so as to be within the limit but with an index appended to maintain uniqueness. This way the files burnt shouldn't be truncated by the burning software as they already comply and therefore will compare indentically with the original source on hard disk.

    I'll do this as an interim solution and post here. Give and take though - would appreciate someone in ScooterSoftware actually trying the solutions here to see if they actually work!

    My interim solution is no comfort for the disc I've already burnt of course, comparing it to the non truncated original.

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

    Default

    Arjay,

    With the original examples Michael provided, I created pairs of text files, renamed them to your original examples (alpha123.txt) and they worked fine, verifying Michael's suggestion.

    Please also note that Michael Bulgrien is not a Scooter Software employee. He is a fellow customer who is posting in this thread with suggestions for you to try.

    With the updated example of "arjaydavis@emailaddress.com, Aaron@beyond compare email.com, Compare files with partially matching file names.eml" I created a pair of files that match those names, and used Beyond Compare to find the cursor position in the filename (displayed in the bottom Text Compare status bar) to determine where the truncation is taking place. I then put the suggested Alignment Override into the Misc tab of the Session Settings and it also aligned the file examples without issues.

    The reason for the extra .* after the initial match is the regular expression must "match" on the entire left side. So the definition of:
    .*\.eml would match on the left file. In order to 'find' the truncated beginning, the part we want to align by for the second file, we split it up into two parts:
    (.{95})
    followed by
    .*

    This allows us to pick out the Right File's name, and continue matching on the entire Left File Name.
    The (parentheses) allow us to reference the text found on the left again on the right. Since the truncated version in your example was 95 characters long (before the .eml), matching on the first 95 characters, followed by a .eml works. The regular expression for the right side looks like: $1 (matching the first 95), followed by .eml. $1.eml. You then need to enable/check the Regular Expression checkbox when defining the Alignment Override (or editing it).

    This way, the Left expression matches the File Name that would be found on the left, and aligns it with the File Name you expect on the right.

    Michael's suggestion relies on the logic that your truncation happens at a specific character count (7 characters based on your first example, 95 on your second). I tried counting the number of characters in your screenshot, and they appear to be more than 95. Is the truncation count a variable number?

    If you are still having trouble, I would suggest emailing us at support@scootersoftware.com with:
    1) Your Support.zip (from the Help menu -> Support; Export)
    2) A link back to this forum post for reference
    3) Two Snapshot files generated from the Tools menu -> Save Snapshot. One for each side of the comparison.

    A Snapshot is a virtual directory that can be loaded in Beyond Compare and contains all of your file names, but not the directories. With this information we would have a complete comparison and could test a few different Alignment Override regular expressions to see what trouble you are running into and why it isn't working for you.
    Aaron P Scooter Software

  7. #17
    Join Date
    Oct 2010
    Posts
    53

    Post A precise step by step guide please (here's what I did 1/3)

    What I need is a precise step by step guide as to how to achieve the partial filename comparison.

    Here is what I tried, step by step. Specifically: please advise on where I am going wrong and add and/or edit the steps I am making so that I can do the comparison.

    I've split it into 3 posts because your forum system doesn't allow more than 4 images per post.


    Part 1 of 3

    (Version of Beyond Compare 3.2.4 (build 13298))

    Steps:
    1) On Desktop create 2 folders:

    New Folder
    a@b New Text Document New Text Document New Text Document 0123456789.eml


    the file name length (without .eml extension) is 72 characters long


    New Folder (2)
    a@b New Text Document New Text Document New Text Document 0123.eml

    the file name length (without .eml extension) is 66 characters long


    The files are identical and contain New Text Document string

    1) Run Beyond Compare

    2) Select folder compare option



    3) Drag in the created folders so that beyond compare sees them and attempts the compare



    4) Select all contents (I'm guessing this is supposed to tell beyond compare what to operate on)



    5) Go to Session Settings Session drop down menu option


  8. #18
    Join Date
    Oct 2010
    Posts
    53

    Default A precise step by step guide please (here's what I did 2/3)

    Part 2 of 3:


    6) Click the Misc tab and enter the regex in Alignment Overide



    7) Click OK to see the reg ex session override entry



    8) Re-select all contents



    9) Do a full refresh from the Edit Drop down menu

    10) The files don't line up (still blue as well not black). So try Update Session defaults instead



    Still no luck.

  9. #19
    Join Date
    Oct 2010
    Posts
    53

    Post A precise step by step guide please (here's what I did 3/3)

    Part 3 of 3:


    Now, here's what I would like to see (but don't):

    A mock up:




    Both the identical files line up and are in black because the match. The regex in session overide has allowed beyond compare to match the files partially by filename so that it can go on and do the full binary comparison.


    I hope what I am trying to do is now absolutely crystal clear!

    Please advise on what I need to do to achieve the comparison of files that have filenames that partially match.

  10. #20
    Join Date
    Oct 2010
    Posts
    53

    Default

    P S in
    step
    6) Click the Misc tab and enter the regex in Alignment Overide of Part 2 of 3. I used a length to match of 65 because both filename strings should be identical for at least the first 65 characters in my example.

    I'm assuming I can stick with one value i.e. use it throughout to compare lots of files and not have to vary its value depending on the situation, provided I assume that the first 'n' or so characters will match in any situation I would always use n.

    Alas, I still need some advice to get the solution working, please insert/edit my steps.

Posting Permissions

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