Here's what I need ...

Would you like Bulk Rename Utility to offer new functionality? Post your comments here!

Here's what I need ...

Postby dehalley » Sat Sep 10, 2011 8:51 pm

I've looked and looked and even RTFM, but:

How can I limit a change to specific occurrences of a string? For example, Replace "The Beatles" with "Beatles" in:

Filename: 01 - The Beatles - The Boy With The Beatles Haircut (Replace in the Artist string, but not in the Title string)

Useful criteria might be: At beginning - At end - Last - Occurrence (1,2,3,etc) - Iterations (1,2,3,etc)

The first three speak for themselves. The last two mean "Start with the x occurrence - and do the change for the next x occurrences".

This utility has better functionality in some regards than others I've tried. Specifically. directory rename, file selection, and filtering are done especially well. I collect music and may need to rename thousands of files in a day, but this (apparent) lack of functionality is keeping me from ditching my old tools in favor of this one.

Hopefully, I'm just missing something obvious. Am I? - Thanks - Don
dehalley
 
Posts: 1
Joined: Sat Sep 10, 2011 8:23 pm

Re: Here's what I need ...

Postby bitmonger » Thu Oct 20, 2011 10:00 pm

The Regex(1) section of BRU can do some of these things.
To remove the last occurrence of 'The' from the filename

01 - The Beatles - The Boy With The Beatles Haircut

Match: (.*)The(.*)
Replace: \1\2

Gives:
01 - The Beatles - The Boy With Beatles Haircut

To remove 'The' only if is the very last word in the filename use
Match; (.+)The$
Replace \1


To remove the first occurrence of 'The' from the filename

Match: (.*?)The(.*)
Replace: \1\2

Gives:
01 - Beatles - The Boy With The Beatles Haircut

To remove 'The' only if is the very first word in the filename use
Match; ^The(.+)
Replace \1

Make sure Include Ext. is Unchecked

The multiple occurrences and ranges can also be done but is more complicated to explain.
bitmonger
 
Posts: 50
Joined: Sat Sep 22, 2007 5:05 am


Return to Suggestions