How to rearrange file name elements?

A swapping-ground for Regular Expression syntax

How to rearrange file name elements?

Postby Shinu » Fri Nov 09, 2012 6:26 am

Hello everyone. I'm trying to rename my MP3 collection but I'm having problems understanding certain things. I'd like to rearrange elements of the file names. Specifically moving the featured artists text to the end of the file name and placing it within brackets. eg.

Jamie Foxx feat. Drake - Fall For Your Type.mp3

to

Jamie Foxx - Fall For Your Type (feat. Drake ).mp3

I'm not even sure if this is possible. I'm new to the forum, so if I'm doing anything wrong in terms of posting this message please let me know. Thank you. :)
Shinu
 

Re: How to rearrange file name elements?

Postby Stefan » Fri Nov 09, 2012 8:59 pm

Hi, welcome.

Shinu wrote:I'd like to rearrange elements of the file names.
Specifically moving the featured artists text to the end of the file name and placing it within brackets.


You have to find an common rule for all your file names.
Or group your file names for several rules.

For example for

FROM:
Jamie Foxx feat. Drake - Fall For Your Type.mp3
TO:
Jamie Foxx - Fall For Your Type (feat. Drake ).mp3

the rule would be

- move everything from the second word till the dash to the end
or
- move the last two words before the dash to the end


Can you provide such an rule matching all your cases?
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU


Return to Regular Expressions