Compare Different File Names

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hoyanet
    Visitor
    • Jul 2018
    • 4

    Compare Different File Names

    Hi,

    I'm trying to compare folders where the files are similar but named in a different format (we were provided an updated package with a different naming convention and want to be able to identify additions or updated files)

    For example, I want the following files to align:
    Original: HWV21599908005A
    New: V215-99908-005_1_001__A_1

    Here, the pieces of the original that must match the new are "V215", "99908", "005" and "A"

    The formats will always translate from "??AAAABBBBBCCCD" to "AAAA-BBBBB-CCC_1_001__D_1"

    Can someone help me with a formula to align these file names?
  • Aaron
    Team Scooter
    • Oct 2007
    • 16026

    #2
    Hello,

    You can use the BC4 Pro feature Alignment Overrides in the Session menu -> Session Settings, Misc tab, and add a new Alignment Override rule as:
    Left =
    ..(.{4})(.{5})(.{3})(.)
    Right =
    $1-$2-$3_1_001__$4_1

    Enable Regular Expression. This assumes the "??" must always be on the Left side in order to be random. If on the Right, it will need to be defined explicitly ("HW") as well as redefining the mask for the left to right.
    Aaron P Scooter Software

    Comment

    • hoyanet
      Visitor
      • Jul 2018
      • 4

      #3
      Thank!

      Comment

      Working...