Announcement

Collapse
No announcement yet.

Can BC align 2 filenames only differing by punctuation as in "Marty's" and "Marty_s"?

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

  • Can BC align 2 filenames only differing by punctuation as in "Marty's" and "Marty_s"?

    I have a lot of files differing only by punctuation changes in their names such as "Marty's Report" and "Marty_s Report". Is there anyway to ignore slight differences like this in file names?

  • #2
    Hello,

    BC4 Pro includes an Alignment Override feature where you can define an alignment rule. For example, the rule could be:
    *'*
    =
    *_*
    to align the two files above.

    You can test Pro if you are already registered for Std, here:
    http://www.scootersoftware.com/suppo...?zz=kb_evalpro
    Aaron P Scooter Software

    Comment


    • #3
      Hi,
      i got the pro version and I dont find the menu/point to configure this.Is there any tutorial?

      the left side I
      20200206-1524-1000-4003-100188000001_300007_DQM_request.json

      should automatically align tothe right side
      20200207-1312-1000-4003-100188000001_300007_DQM_request.json

      so 20200207-1312-1000-4003-100188000001_ is the changing part in the filename
      while 300007_DQM_request.json is the part to align.

      Bye Joe

      Comment


      • #4
        Hello,

        The Session Settings is context sensitive, so you would need to be in a Folder Compare first to see the menu items. Load your folders containing json files, then go to the Session menu -> Session Settings, Misc tab. From here, Alignment Overrides is the top item/section, with a New "+" button.

        An alignment override rule can define a mask for the Find side (one side), but the With Right Side does not support regular expression masking. So you could define something that is 206 to 207, or 1524 to 1312, but not a matching to \d (any numeric character) for the right side.
        Aaron P Scooter Software

        Comment


        • #5
          Thank you, this one works fine:

          Left Side: 20200211-0943-1000-4003-100188000001*

          Right Side 20200207-1731-1000-4003-100188000001*

          RegEx [ ]
          Last edited by Joe99; 11-Feb-2020, 04:56 AM.

          Comment


          • #6
            Now I tried with regEx but didnt find out how to do it:

            Left Side: \d\d\d\d\d\d\d\d.\d\d\d\d.\d\d\d\d.\d\d\d\d.\d\d\d \d\d\d\d\d\d\d\d\d\d.*

            Right Side 20200207-1731-1000-4003-100188000001*

            RegEx [X]
            Last edited by Joe99; 11-Feb-2020, 06:54 AM.

            Comment


            • #7
              The later example wouldn't work since as a Regular Expression, the * is not supported for masking. The different text must be explicitly defined in the Right Side definition. You can use the dropdown next to each text entry to see the list of supported regex commands for that text box.
              Aaron P Scooter Software

              Comment


              • #8
                Thank you Aaron. I guess regex on the right side would be useful feature, perhaps for the next update?
                Thanks Joe99

                Comment


                • #9
                  Certainly useful. It's a larger feature enhancement, so it probably wouldn't make it into a near-term update.
                  Aaron P Scooter Software

                  Comment


                  • #10
                    Hi,

                    Quick note: we don't get a notification if you edit an existing post with a new example, so I almost missed these except for another member of the team catching the updates.

                    For this example:
                    "
                    Left Side: \d\d\d\d\d\d\d\d.\d\d\d\d.\d\d\d\d.\d\d\d\d.\d\d\d \d\d\d\d\d\d\d\d\d\d.*

                    Right Side 20200207-1731-1000-4003-100188000001*
                    "

                    The "." characters on the left side match to Any Single Character. Is this the intention? Or did you want to manually match on -? You can also replace \d\d\d with \d{3} to help with readability. The trailing * on the right is a dos mask approach, but you can achieve something similar with (.*) matching to $1

                    Code:
                    Left Side: \d{8}-\d{4}-\d{4}-\d{4}-\d{12}(.*)
                    
                    Right Side 20200207-1731-1000-4003-100188000001$1
                    Aaron P Scooter Software

                    Comment

                    Working...
                    X