# How to rename a batch of files like "01 Hello" to "01 - Hello"?

**URL:** https://community.mp3tag.de/t/how-to-rename-a-batch-of-files-like-01-hello-to-01-hello/43817
**Category:** General Discussion
**Created:** [December 8, 2018, 7:35pm UTC](https://community.mp3tag.de/t/how-to-rename-a-batch-of-files-like-01-hello-to-01-hello/43817 "2018-12-08T19:35:19Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![marcelo\_neri](https://community.mp3tag.de/user_avatar/community.mp3tag.de/marcelo_neri/32/409_2.png) [@marcelo\_neri](https://community.mp3tag.de/u/marcelo_neri)
#### Post date: [December 8, 2018, 7:35pm UTC](https://community.mp3tag.de/t/how-to-rename-a-batch-of-files-like-01-hello-to-01-hello/43817/1 "2018-12-08T19:35:19Z")

</div>

Hello guys!

The line of the topic explains the question for it self.

How can I rename a batch of files whose names like "01 Hello" to "01 - Hello"?

Thanks in advance.

Marcelo Neri

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 8, 2018, 7:40pm UTC](https://community.mp3tag.de/t/how-to-rename-a-batch-of-files-like-01-hello-to-01-hello/43817/2 "2018-12-08T19:40:39Z")

</div>

Use the function Convert\>Tag-Filename  
Format string: $num(%track%,2) - %title%  
(provided the tag fields are filled)  
Otherwise you should fill the tag fields first.  
E.g.  
function Convert\>Filename-Tag  
Pattern: %track% %title%

There was a similar problem some time back:

> [@Using part of filename as title](https://community.mp3tag.de/t/using-part-of-filename-as-title/5461/10):
>
> Hello! I followed as mentioned above but it didn't work. Maybe I'm doing something wrong. Can you guys help me please? Look the image: [image]

---

<div class="post-metadata">

### Author: ![marcelo\_neri](https://community.mp3tag.de/user_avatar/community.mp3tag.de/marcelo_neri/32/409_2.png) [@marcelo\_neri](https://community.mp3tag.de/u/marcelo_neri)
#### Post date: [December 8, 2018, 8:13pm UTC](https://community.mp3tag.de/t/how-to-rename-a-batch-of-files-like-01-hello-to-01-hello/43817/3 "2018-12-08T20:13:24Z")

</div>

ohrenkino you are always helping!  
Thanks a lot man!

I followed the steps, but at the end, the outcome was "01 - 01 Hello" .

How to fix to "01 - Hello"?

By the way, all my actions were saved on a damaged hard drive. All my questions and solutions about mp3tag were there. Too bad!

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 8, 2018, 8:19pm UTC](https://community.mp3tag.de/t/how-to-rename-a-batch-of-files-like-01-hello-to-01-hello/43817/4 "2018-12-08T20:19:45Z")

</div>

To clean up the filename:  
for filenames with 2 numbers:

Convert\>Tag-Tag for \_FILENAME  
Format string: `$regexp(%_filename%,(\d+ - )\d+ (.*),$1$2)`

for filenames with just 1 number:  
Convert\>Tag-Tag for \_FILENAME  
Format string: `$regexp(%_filename%,(\d+ )(.*),$1- $2)`

But that looks to me as though the TITLE also has a number in it. For that you can use the almost the same converter like for 1 number only this time with TITLE everywhere there was \_FILENAME

The preview in the converter should show you if everything is OK.

---

<div class="post-metadata">

### Author: ![marcelo\_neri](https://community.mp3tag.de/user_avatar/community.mp3tag.de/marcelo_neri/32/409_2.png) [@marcelo\_neri](https://community.mp3tag.de/u/marcelo_neri)
#### Post date: [December 8, 2018, 8:27pm UTC](https://community.mp3tag.de/t/how-to-rename-a-batch-of-files-like-01-hello-to-01-hello/43817/5 "2018-12-08T20:27:14Z")

</div>

In my version there's no "\_FILENAME" option. ]

Look:  
[image here](https://i.postimg.cc/WzYpPCV2/del.jpg)

I'll do it manually using what you allready told me.

Thanks a lot again!

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 8, 2018, 8:29pm UTC](https://community.mp3tag.de/t/how-to-rename-a-batch-of-files-like-01-hello-to-01-hello/43817/6 "2018-12-08T20:29:07Z")

</div>

That is in my so, too.  
You really have to type it in:  
\_FILENAME

---

<div class="post-metadata">

### Author: ![marcelo\_neri](https://community.mp3tag.de/user_avatar/community.mp3tag.de/marcelo_neri/32/409_2.png) [@marcelo\_neri](https://community.mp3tag.de/u/marcelo_neri)
#### Post date: [December 8, 2018, 8:31pm UTC](https://community.mp3tag.de/t/how-to-rename-a-batch-of-files-like-01-hello-to-01-hello/43817/7 "2018-12-08T20:31:29Z")

</div>

> [@ohrenkino](#):
>
> $regexp(%\_filename%,(\d+ )(.\*),$1- $2)

Oh Yeah!  
Now it works!

ohrenkino, you are the one man!

A thousand thanks,

Marcelo Neri

---

<div class="post-metadata">

### Author: ![Geoff](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/a3d4f5/32.png) [@Geoff](https://community.mp3tag.de/u/Geoff)
#### Post date: [December 23, 2018, 11:25pm UTC](https://community.mp3tag.de/t/how-to-rename-a-batch-of-files-like-01-hello-to-01-hello/43817/8 "2018-12-23T23:25:40Z")

</div>

Use the function: Convert \> Filename - Filename  
Old filename pattern:%1 %2  
New filename pattern:%1 - %2
