Switch portions of filename strings

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Switch portions of filename strings

Postby lutzipoo » Sun Dec 07, 2008 9:17 pm

Hello,

at first many thanks for this great utility which I am to explore from now! Looks very promising!

Question:

I have to rename quite a number of mp3-files by taking a part of the front of the file name with varying length, and inserting this partial string prior to the filename separator . (dot).

Example:
20071013_002_Come Away With Me_Norah Jones.mp3
to become
Come Away With Me_Norah Jones_20071013_002_.mp3
or
Come Away With Me_Norah Jones_20071013_002.mp3

Is this possible? Any help is appreciated. :roll:

Have a nice day

Lutzipoo
lutzipoo
 
Posts: 2
Joined: Sun Dec 07, 2008 9:03 pm

Re: Switch portions of filename strings

Postby jimwillsher » Mon Dec 08, 2008 10:31 am

Hi,

You can easily do this using Regular Expressions, check out the RegExp part of this board for loads of similar posts and solutions.



Jim
jimwillsher
 
Posts: 63
Joined: Wed Sep 24, 2008 1:22 pm

Re: Switch portions of filename strings

Postby GMA » Mon Dec 08, 2008 5:20 pm

Hi, Lutzipoo:
Try with this expression:

RegEx (1):
MATCH: ([0-9]*)(.)([0-9]*)_(.*)
REPLACE: \4_\1\2\3

Hope it helps. Happy holydays to the forum,

Gabriel.
GMA
 
Posts: 91
Joined: Sun Dec 02, 2007 1:30 pm
Location: Argentina

Re: Switch portions of filename strings

Postby lutzipoo » Mon Dec 08, 2008 7:51 pm

Hello Gabriel,

IT WORKED

you just caught me before getting ´insane´. Thanks a lot, I was struggeling with piles of paper on the subject PERL. Now I have a bit more time to relax and study.

Thanks Gabriel

Lutz :mrgreen: :mrgreen:
lutzipoo
 
Posts: 2
Joined: Sun Dec 07, 2008 9:03 pm


Return to BRU Support