Renumber files with higher number

A swapping-ground for Regular Expression syntax

Renumber files with higher number

Postby Spockears » Sat Feb 06, 2016 3:44 pm

Hi

I'm trying to organize my TV Shows, but a couple of them have conflicting formats for the seasons. Without going into unnecessary detail I want to renumber some episodes with a higher number.

example:

"Pawn Stars S02E15.mkv" needs to become "Pawn Stars 2009x23.mkv"

Changing the S02 to 2009x is easy of course, it's the change in number I'm struggling with, in this example I need to make the episode number +8, or put another way - "find (n) & replace with (n+8)" so 15 become 23, 16 becomes 24 & so on.

Is this possible?
Spockears
 
Posts: 2
Joined: Sat Feb 06, 2016 3:32 pm

Re: Renumber files with higher number

Postby Admin » Sun Feb 07, 2016 7:38 am

Hi, it's possible with Javascript.... but it requires a commercial license.
Admin
Site Admin
 
Posts: 2344
Joined: Tue Mar 08, 2005 8:39 pm

Re: Renumber files with higher number

Postby Spockears » Sun Feb 07, 2016 9:27 am

Thanks for the reply. Managed to do this in 2 stages with Directory Opus, maybe possible in BRU?

Renamed all files in numerical order, with the range starting at the new number so "Pawn Stars S02e11.mkv" became "0023.mkv" etc. Then did a find & replace on the "00" to Pawn Stars "S2010SE" giving me the final name.
I then ran them through TV Renamer to put in the episode names.
Spockears
 
Posts: 2
Joined: Sat Feb 06, 2016 3:32 pm

Re: Renumber files with higher number

Postby Admin » Mon Feb 08, 2016 1:46 am

Yes, that should be possible with BRU too. Using Javascript it can all be done in one step, probably better if it needs to be done repeatedly. thanks
Admin
Site Admin
 
Posts: 2344
Joined: Tue Mar 08, 2005 8:39 pm


Return to Regular Expressions