# replacing spaces with underscores in filename

**URL:** https://community.mp3tag.de/t/replacing-spaces-with-underscores-in-filename/4889
**Category:** Support
**Created:** [May 17, 2007, 2:40am UTC](https://community.mp3tag.de/t/replacing-spaces-with-underscores-in-filename/4889 "2007-05-17T02:40:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Velveeta00](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/d6d6ee/32.png) [@Velveeta00](https://community.mp3tag.de/u/Velveeta00)
#### Post date: [May 17, 2007, 2:40am UTC](https://community.mp3tag.de/t/replacing-spaces-with-underscores-in-filename/4889/1 "2007-05-17T02:40:07Z")

</div>

I'm pretty sure mp3tag is capable of this but I don't know how or haven't figured it out yet.

currently, my tag command goes like this:

```
$num(%track%,2)-%artist%-%title%

```

this makes the filename look like this:  
01-artist name-song title.mp3  
01-wierd al-white and nerdy.mp3

I would like it to be:  
01-wierd\_al-white\_and\_nerdy.mp3

can anyone help me out?

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: [May 17, 2007, 5:24am UTC](https://community.mp3tag.de/t/replacing-spaces-with-underscores-in-filename/4889/2 "2007-05-17T05:24:41Z")

</div>

Please have a look at the help next time. You can use $replace(%title%, ,\_).

---

<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 9, 2026, 12:20pm UTC](https://community.mp3tag.de/t/replacing-spaces-with-underscores-in-filename/4889/3 "2026-02-09T12:20:18Z")

</div>


