# Tagging releases - replacing spaces with hyphen and underscore in filename

**URL:** https://community.mp3tag.de/t/tagging-releases-replacing-spaces-with-hyphen-and-underscore-in-filename/67079
**Category:** Support
**Created:** [January 7, 2025, 7:20pm UTC](https://community.mp3tag.de/t/tagging-releases-replacing-spaces-with-hyphen-and-underscore-in-filename/67079 "2025-01-07T19:20:50Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![charlesbarkley](https://community.mp3tag.de/user_avatar/community.mp3tag.de/charlesbarkley/32/18595_2.png) [@charlesbarkley](https://community.mp3tag.de/u/charlesbarkley)
#### Post date: [January 7, 2025, 7:20pm UTC](https://community.mp3tag.de/t/tagging-releases-replacing-spaces-with-hyphen-and-underscore-in-filename/67079/1 "2025-01-07T19:20:50Z")

</div>

Hi. I'm new to this game, so please bear with me. I have a bunch of CDs that I'd like to tag correctly. The file is called 08-sabaton the valley of death , and I'd like it to be tagged 08-sabaton-the\_valley\_of\_death , so I don't have to change it manually. Thanks for the tips.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [January 7, 2025, 7:23pm UTC](https://community.mp3tag.de/t/tagging-releases-replacing-spaces-with-hyphen-and-underscore-in-filename/67079/2 "2025-01-07T19:23:04Z")

</div>

"Tagging" means to add metadata inside your tracks.  
Such metadata can be read and displayed by playing software.  
Examples are TITLE, ALBUM, ARTIST and many more.

What you describe is some kind of renaming (of filenames).

So what exactly do you want to do?

---

<div class="post-metadata">

### Author: ![charlesbarkley](https://community.mp3tag.de/user_avatar/community.mp3tag.de/charlesbarkley/32/18595_2.png) [@charlesbarkley](https://community.mp3tag.de/u/charlesbarkley)
#### Post date: [January 7, 2025, 7:50pm UTC](https://community.mp3tag.de/t/tagging-releases-replacing-spaces-with-hyphen-and-underscore-in-filename/67079/3 "2025-01-07T19:50:46Z")

</div>

I want to rename files. I just don't want to have to do it manually.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [January 7, 2025, 7:57pm UTC](https://community.mp3tag.de/t/tagging-releases-replacing-spaces-with-hyphen-and-underscore-in-filename/67079/4 "2025-01-07T19:57:03Z")

</div>

> [@charlesbarkley](#):
>
> `08-sabaton the valley of death`  
> renamed to  
> `08-sabaton-the_valley_of_death`

You want to replace the spaces in the trackname with underscores?  
And add a hyphen between the artist and the trackname?

I'm not sure if Mp3tag is the preferred way to do that.

I'm just curious:  
Did you find this forum as an answer in a AI or Google?

---

<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: [January 7, 2025, 7:57pm UTC](https://community.mp3tag.de/t/tagging-releases-replacing-spaces-with-hyphen-and-underscore-in-filename/67079/5 "2025-01-07T19:57:22Z")

</div>

> [@charlesbarkley](#):
>
> 08-sabaton the valley of death

Try Convert\>Tag-Tag for \_FILENAME  
Format string: `$replace($regexp(%_filename%,(.*?) (.*),$1-$2), ,_)`

But as @LyricsLover has said: this has nothing to do with tagging.  
It is fiddling with the filename which is no tag.

---

<div class="post-metadata">

### Author: ![charlesbarkley](https://community.mp3tag.de/user_avatar/community.mp3tag.de/charlesbarkley/32/18595_2.png) [@charlesbarkley](https://community.mp3tag.de/u/charlesbarkley)
#### Post date: [January 7, 2025, 8:03pm UTC](https://community.mp3tag.de/t/tagging-releases-replacing-spaces-with-hyphen-and-underscore-in-filename/67079/6 "2025-01-07T20:03:05Z")

</div>

ohrenkino, big thanks 🙂 🍺

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 6, 2025, 8:03pm UTC](https://community.mp3tag.de/t/tagging-releases-replacing-spaces-with-hyphen-and-underscore-in-filename/67079/7 "2025-02-06T20:03:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
