# Mass File Rename

**URL:** https://community.mp3tag.de/t/mass-file-rename/5531
**Category:** General Discussion
**Created:** [October 2, 2007, 11:23pm UTC](https://community.mp3tag.de/t/mass-file-rename/5531 "2007-10-02T23:23:52Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![TheChipstar](https://community.mp3tag.de/user_avatar/community.mp3tag.de/thechipstar/32/200_2.png) [@TheChipstar](https://community.mp3tag.de/u/TheChipstar)
#### Post date: [October 2, 2007, 11:23pm UTC](https://community.mp3tag.de/t/mass-file-rename/5531/1 "2007-10-02T23:23:52Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Sebastian\_Mares](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sebastian_mares/32/9285_2.png) [@Sebastian\_Mares](https://community.mp3tag.de/u/Sebastian_Mares)
#### Post date: [October 3, 2007, 4:12am UTC](https://community.mp3tag.de/t/mass-file-rename/5531/2 "2007-10-03T04:12:46Z")

</div>

_Action type:_ **Replace with regular expression**  
_Field:_ **\_FILENAME**  
_Regular expression:_ **([A-Z])0\*([1-9].\*)**  
_Replace matches with:_ **$1$2**

[] case-sensitive comparison

---

<div class="post-metadata">

### Author: ![TheChipstar](https://community.mp3tag.de/user_avatar/community.mp3tag.de/thechipstar/32/200_2.png) [@TheChipstar](https://community.mp3tag.de/u/TheChipstar)
#### Post date: [October 3, 2007, 7:29am UTC](https://community.mp3tag.de/t/mass-file-rename/5531/3 "2007-10-03T07:29:11Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Sebastian\_Mares](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sebastian_mares/32/9285_2.png) [@Sebastian\_Mares](https://community.mp3tag.de/u/Sebastian_Mares)
#### Post date: [October 3, 2007, 8:43am UTC](https://community.mp3tag.de/t/mass-file-rename/5531/4 "2007-10-03T08:43:06Z")

</div>

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

---

<div class="post-metadata">

### Author: ![TheChipstar](https://community.mp3tag.de/user_avatar/community.mp3tag.de/thechipstar/32/200_2.png) [@TheChipstar](https://community.mp3tag.de/u/TheChipstar)
#### Post date: [October 3, 2007, 5:50pm UTC](https://community.mp3tag.de/t/mass-file-rename/5531/5 "2007-10-03T17:50:36Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ffolke](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/8edcca/32.png) [@ffolke](https://community.mp3tag.de/u/ffolke)
#### Post date: [October 3, 2007, 6:19pm UTC](https://community.mp3tag.de/t/mass-file-rename/5531/6 "2007-10-03T18:19:28Z")

</div>

Did you try

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

add "\_" between $1 and $2

---

<div class="post-metadata">

### Author: ![TheChipstar](https://community.mp3tag.de/user_avatar/community.mp3tag.de/thechipstar/32/200_2.png) [@TheChipstar](https://community.mp3tag.de/u/TheChipstar)
#### Post date: [October 4, 2007, 3:11am UTC](https://community.mp3tag.de/t/mass-file-rename/5531/7 "2007-10-04T03:11:11Z")

</div>

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](https://community.mp3tag.de/t/5519/1)

---

<div class="post-metadata">

### Author: ![Sebastian\_Mares](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sebastian_mares/32/9285_2.png) [@Sebastian\_Mares](https://community.mp3tag.de/u/Sebastian_Mares)
#### Post date: [October 4, 2007, 3:34am UTC](https://community.mp3tag.de/t/mass-file-rename/5531/8 "2007-10-04T03:34:30Z")

</div>

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.
