Removing ", The" from suffix, adding "The" prefix for subset

Bulk Rename Utility How-To's

Removing ", The" from suffix, adding "The" prefix for subset

Postby sloppyjoe » Mon Jun 01, 2020 6:12 pm

Hi All,

Absolutely love BRU and have been using it for years. Thanks for this amazing little program.

I have a bunch of movie files that I originally painstakingly moved the prefix "The" and "A" to a suffix (ex. "Princess Bride, The"). However over time this naming convention has become problematic and inconsistent. My goal is to go through all of my movies and move the suffix ", The" back to a prefix "The ". So the end goal would be "The Princess Bride". Doing that is easy in BRU if all the files have the exact same structure. My problem is that most files don't have the trailing ", The".

So ultimately my question is: is there a way to filter the files that BRU applies its rules to in order to only apply the Replace and add Suffix actions to the files that have the ", The" in their name?

Thanks in advance for any help you can provide!

SJ
sloppyjoe
 
Posts: 2
Joined: Mon Jun 01, 2020 6:03 pm

Re: Removing ", The" from suffix, adding "The" prefix for subset

Postby sloppyjoe » Mon Jun 01, 2020 9:07 pm

Sigh. RTFM.

Just read through the manual and figured this out for myself. Sorry to waste everyone's time.

Under Filters, I set Regex to On and entered the following Mask: (?:\,\ A). Works perfectly.

Thanks again for this awesome program!
sloppyjoe
 
Posts: 2
Joined: Mon Jun 01, 2020 6:03 pm

Re: Removing ", The" from suffix, adding "The" prefix for subset

Postby RegexNinja » Wed Jun 03, 2020 6:25 am

Dont be too hard on yourself, nobody's born knowing this kinda stuff.
I've learned alot from the manuals too, though I usually have to expirament till it sinks in.

The only thing I dont like about 12Mask, is that you cant turn-off matching file-extensions.
Its no big deal, except when you wanna match names ending-with some-particular-string.
In those cases, you just need to include the .ext like: .*some-particular-string\.ext$

I often use something like: xyz\.[a-z]{3,4}$ to match names ending-with 'xyz' (3-4 lowercases in file-extension).
With Regex/MatchCase checked, you could use a 12Mask like:
, A\.[a-zA-Z]{3,4}$

That would filter away names like Name, anytext.txt
Cheers!
RegexNinja
 
Posts: 134
Joined: Fri Feb 21, 2020 5:26 pm


Return to How-To