File Renames/Rarrange

A swapping-ground for Regular Expression syntax

File Renames/Rarrange

Postby blkburban » Thu Jan 08, 2015 9:50 pm

I have thousands of Songs that I would Like to rename/move around here are some examples.
I would like to move and trim Any item with the (Ft *) and move to just before the -
all files are layed out with the artist - title format however the items to moved can be anywhere in the title section


Original names
50 Cent - Peep Show (Ft Eminem)(Clean).MP3
50 Cent - Outta Control (Ft Mobb Deep).MP3

Wanted Final result
50 Cent Ft Eminem - Peep Show (Clean).MP3
50 Cent Ft Mobb Deep - Outta Control.MP3

What I have been doing is manually adding the Ft Mobb Deep before the -
and then running the following Regex (1) string which seems to work fine
(.*)(\(Ft .*?\))(.*)
\1\3

but I would greatly appreciate any help to automate the copy move part.
Please forgive me if my explanation is screwy
blkburban
 
Posts: 2
Joined: Thu Jan 08, 2015 9:09 pm

Rarrange parentheses different amount of parts

Postby Stefan » Fri Jan 09, 2015 9:04 am

 

FROM:
50 Cent - Peep Show (Ft Eminem)(Clean).MP3
50 Cent - Outta Control (Ft Mobb Deep).MP3

TO:
Wanted Final result
50 Cent Ft Eminem - Peep Show (Clean).MP3
50 Cent Ft Mobb Deep - Outta Control.MP3


RULE:
Find "(Ft.+)" and move it before the hyphen, additional remove the parentheses.



USE:
RegEx(1)
Match:(.+ )(- .+)\((Ft.+?)\)(.+)?
Repla:\1\3 \2\4




The problem is, that one file name consists of 4 part:
"50 Cent - Peep Show (Ft Eminem)(Clean)"
""50 Cent "//"- Peep Show "//"(Ft Eminem)"//"(Clean)""

and this one of 3 part:
"50 Cent - Outta Control (Ft Mobb Deep)"
""50 Cent "//"- Outta Control "//"(Ft Mobb Deep)""

So if we try to rename with four replacements on a three part-only file name,
we will get an additional " \4" to that file name, which turns it to invalid.

50 Cent Ft Eminem - Peep Show (Clean).MP3
50 Cent Ft Mobb Deep - Outta Control \4.MP3



So we need different expressions for different amount of parts and you can't rename
all variousnesses in one go, I guess. Or I just did not get the right idea this morning.




Oh, now I got the idea,... add an additional rule:

Repl.(3)
Replace: \4
With:

to remove the redundant " \4"


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

Re: File Renames/Rarrange

Postby blkburban » Mon Jan 12, 2015 4:47 am

Stefan,
That works perfectly as intended,
THANK YOU
blkburban
 
Posts: 2
Joined: Thu Jan 08, 2015 9:09 pm

Renames/Rarrange parts of filename brackets

Postby Stefan » Mon Jan 12, 2015 7:48 am

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


Return to Regular Expressions