Mass File Rename


#1

I would like to rename my files from:

GEN001.mp3 to GEN1.mp3
GEN002.mp3 to GEN5.mp3
GEN003.mp3 to GEN3.mp3
........................
GEN050.mp3 to GEN50.mp3
GEN051.mp3 to GEN51.mp3
........................
GEN100.mp3 to GEN100.mp3 (keep the same).

In other words, get rid of the leading zero's, but still keep the zero's that matter.

Thanks in advance.


#2

Action type: Replace with regular expression
Field: _FILENAME
Regular expression: ([A-Z])0*([1-9].*)
Replace matches with: $1$2

[ ] case-sensitive comparison

#3

Thanks for the reply.
I guess I should have mentioned, that the preceeding number of letters is not neccessarily always three...

It can be:
~GEN001~
but can also be:
~RUTH001~
~1COR001~
~1THES001~

So the name preceeding the zero's can be either:
just letters (min 3 letters - max 5 letters)
~GEN001~ or ~RUTH001~ or ~TITUS001~
or a combination of 1 number (max 1 number either "1" "2" or "3") and letters (min 3 letters - max 4 letters)
~1COR001~ or ~2THES001~

Can this still be done or am I asking too much here?


#4

Did you try my action on your files because it seems to work on all cases described by you.


#5

Ahh... so it does. I tried adding an "_" between the GEN and the number... like: GEN_1 instead of GEN1. Can this be done? No biggy if it can't.

Thanks for the help.


#6

Did you try

Field: FILENAME
Regular expression: ([A-Z])0*([1-9].*)
Replace matches with: $1$2

add "_" between $1 and $2


#7

Yes, well at least I thought I had.
Now I'm second guessing myself, because I just tried it and it works.

I 'thought' I had... my bad.

The renaming is to help in a mass/batch lyric import (my other post).

Do you know of any way of doing this?
/t/5519/1


#8

The only solution is the one posted already that requires you to have the lyrics in one line per file. TextPad for example supports RegExp replace so you could replace \n with whatever character you want.