Batch Renaming of Folders

A swapping-ground for Regular Expression syntax

Batch Renaming of Folders

Postby russg » Fri Apr 16, 2021 4:31 pm

I need to batch rename a bunch of music folders. Currently the folders are named "Artist - Album" (without quotes). I want to remove the "Artist - ", leaving just the "Album" as the folder name. So , "Album - Artist" becomes "Album" (again, without quotes). Essentially, I am remove all characters prior to "Album". Or, you could say that I am removing all characters from the space after the hyphen to the beginning of the folder name. Could you please give me the correct method to accomplish this in BRU?

Thanks.
russg
 
Posts: 2
Joined: Fri Apr 16, 2021 4:28 pm

Re: Batch Renaming of Folders

Postby Luuk » Fri Apr 16, 2021 5:44 pm

The first description..... 'Artist - Album' ====> Album
The second description.. 'Album - Artist' ====> Album

To keep everything after the first space-space, the RegEx(1) uses a Match and Replace like...
.+? - (.+)
\1

To keep everything before the first space-space...
(.+?) - .+
\1
Luuk
 
Posts: 690
Joined: Fri Feb 21, 2020 10:58 pm

Re: Batch Renaming of Folders

Postby russg » Sat Apr 17, 2021 5:34 pm

Thanks, Luuk. Sorry about the confusion in the descriptions. The first description was correct, as was your solution!

Thanks again,

Russ
russg
 
Posts: 2
Joined: Fri Apr 16, 2021 4:28 pm


Return to Regular Expressions


cron