Remove number and hyphen before episode number.

Bulk Rename Utility How-To's

Remove number and hyphen before episode number.

Postby Ronstang » Sat Sep 23, 2023 12:55 am

I have a bunch of TV series on disc I am ripping and encoding but many have 5+ seasons and many episodes. To be able to queue them to encode all at once I had to number them with a season number and hyphen before the episode number like follows:

1-2. Hold That Tiger.mkv

I simply want to rename the file to remove the season number prefix and the hyphen so that is fine, unless....

Can BRU create folders and move files? If so it would be super awesome if I could create a folder named based on the first number....Season 1, Season 2 etc. depending upon the first numeral and then rename the files to remove the number and hyphen and move them into the season folder. Now something tells me this is either impossible or very difficult since I will always have multiple seasons so as long as I can rename them in bulk I can make the folders and move them if I have to....it would just be cool if this could be automated. LOL

Thanks
Ronstang
 
Posts: 45
Joined: Tue Feb 09, 2021 2:14 am

Move parts of filename into new parent-folder-name

Postby Luuk » Sat Sep 23, 2023 6:38 am

Yes, it just needs a checkmark for "Renaming Options, Advanced Options, Allow using '\' to create folders.
This an example using RegEx(1) with a checkmark for "v2", so then a "Match" and "Replace" like...
^(\d{1,2})-(\d{1,2}\. .+)(?X)((?<= )(\d\\)|(?<=\\)\d\.)/g
Season $1\\$2(?X)0$1

It renames and moves like...
C:\Path\Hogans Heroes\1-2. Hold That Tiger.mkv ---> C:\Path\Hogans Heroes\Season 01\02. Hold That Tiger.mkv
C:\Path\Hogans Heroes\1-12. The Scientist.mkv ----> C:\Path\Hogans Heroes\Season 01\12. The Scientist.mkv
C:\Path\Hogans Heroes\2-7. Hogan Springs.mkv ----> C:\Path\Hogans Heroes\Season 02\07. Hogan Springs.mkv

To only pad the episode numbers...
^(\d{1,2})-(\d{1,2}\. .+)(?X)(?<=\\)(\d\.)
Season $1\\$2(?X)0$1

If not wanting to pad any numbers, its much simpler like...
^(\d{1,2})-(\d{1,2}\. .+)
Season $1\\$2
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm


Return to How-To