"General" character?

Post any Bulk Rename Utility support requirements here. Open to all registered users.

"General" character?

Postby darksable » Fri Apr 24, 2015 8:41 am

Hey guys!

Just discovered Bulk Rename Utility, and it's making my life much, much easier!

I've figured out most of what I need, but I have one question: Is there anything I can input (specifically to the replace function) that acts as a general character?

Essentially I've got many seasons of many different shows, so remove from won't work because it's at different dates. They're currently formatted "S** E**", and I want them to be formatted "S**, E**"

Now, I can just go through the replace function and say replace "S01 " with "S01, " but I would have to do it some fourteen times, and the chances of me forgetting to change "S09, " to "S10, " and messing everything up are too great.

So is there a way of just saying replace "S** " with "S**, ", where the characters in the asterisks aren't touched?

I get that this is asking for a very advanced option, but failing that, is there even an "any character" that stands in for all characters when replacing or matching?

Thanks,

DarkSable
darksable
 
Posts: 1
Joined: Fri Apr 24, 2015 8:34 am

Re: "General" character?

Postby bitmonger » Sat Apr 25, 2015 4:46 pm

Check out the regular expressions section and give that a try.
They can use various wildcards, for example \d represents any number 0-9, \w any number letter etc.
You have not given actual examples of the complete filename so I don't know if the complete name is merely the S** E** or if this is part of a larger name. If you check that part of the forum you can find many examples similar to yours.
However, going by what you have shown
Now, I can just go through the replace function and say replace "S01 " with "S01, " but I would have to do it some fourteen times, and the chances of me forgetting to change "S09, " to "S10, " and messing everything up are too great.

So is there a way of just saying replace "S** " with "S**, ", where the characters in the asterisks aren't touched?


In the example S\d\d would substitute for an S followed by any 2 numbers
So you could try something like:

Regex (1)

Match: (S\d\d) (E\d\d)

Replace: \1, \2

Include Ext box NOT checked

Hope this helps,
Bit
bitmonger
 
Posts: 50
Joined: Sat Sep 22, 2007 5:05 am

RegEx: match S01 E01 and change to S01, E01

Postby Stefan » Mon Apr 27, 2015 6:47 am

A more general match, as the file names may not made up of "S01 E01.ext" only but contain other words too,
and also there may be single digits only too: "S2 E3.ext", here is a expression who try to help for that:


Regex (1)
Match: (.*S\d+) (E\d+.*)
Replace: \1, \2



I want to invite all askers to provide expressive examples of there real file names for to let use do a better support.

FROM:
S01 E01.ext
S5 E1.ext
S5 E02.ext
This is a Movie S1 E1 Description.ext
This is a Movie S02 E1 Description.ext
This is a Movie S03 E01 Description.ext

TO:
S01, E01.ext
S5, E1.ext
S5, E02.ext
This is a Movie S1, E1 Description.ext
This is a Movie S02, E1 Description.ext
This is a Movie S03, E01 Description.ext


 
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU


Return to BRU Support