# How to remove commas when converting files to tag names?

**URL:** https://community.mp3tag.de/t/how-to-remove-commas-when-converting-files-to-tag-names/71519
**Category:** Support
**Created:** [June 27, 2026, 4:24pm UTC](https://community.mp3tag.de/t/how-to-remove-commas-when-converting-files-to-tag-names/71519 "2026-06-27T16:24:40Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Stealth](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@Stealth](https://community.mp3tag.de/u/Stealth)
#### Post date: [June 27, 2026, 4:24pm UTC](https://community.mp3tag.de/t/how-to-remove-commas-when-converting-files-to-tag-names/71519/1 "2026-06-27T16:24:40Z")

</div>

I am using:

%discnumber%$replace($lower($replace($num(%track%,2)-%artist%-%title%, ,\_)),'',)

It's been so long since I created it I am not sure how to remove commas also when converting, what would I add to remove commas in the file name. Thank you!

---

<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: [June 27, 2026, 5:27pm UTC](https://community.mp3tag.de/t/how-to-remove-commas-when-converting-files-to-tag-names/71519/2 "2026-06-27T17:27:06Z")

</div>

`$replace($num(%track%,2)-%artist%-%title%, ,_,',',#)`  
would replace the comma with a `#`.

Pleased note that this works for Convert\>Tag-Filename but not for Convert\>Filename -Tag.  
(It is not quite clear to me which direction you want to take)

---

<div class="post-metadata">

### Author: ![Stealth](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@Stealth](https://community.mp3tag.de/u/Stealth)
#### Post date: [June 27, 2026, 9:46pm UTC](https://community.mp3tag.de/t/how-to-remove-commas-when-converting-files-to-tag-names/71519/3 "2026-06-27T21:46:41Z")

</div>

I am converting tag to file name sorry I said it wrong. I am trying to just remove the commas, currently it makes the file name people,\_places,\_things.mp3 I want it to make the file name people\_places\_things.mp3

---

<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: [June 27, 2026, 9:50pm UTC](https://community.mp3tag.de/t/how-to-remove-commas-when-converting-files-to-tag-names/71519/4 "2026-06-27T21:50:38Z")

</div>

> [@ohrenkino](#):
>
> $replace($num(%track%,2)-%artist%-%title%, ,\_,',',#)

Try:  
`$replace($num(%track%,2)-%artist%-%title%, ,_,',',)`

---

<div class="post-metadata">

### Author: ![Stealth](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@Stealth](https://community.mp3tag.de/u/Stealth)
#### Post date: [June 27, 2026, 11:02pm UTC](https://community.mp3tag.de/t/how-to-remove-commas-when-converting-files-to-tag-names/71519/5 "2026-06-27T23:02:10Z")

</div>

%discnumber%$replace($lower($replace($num(%track%,2)-%artist%-%title%, ,\_,',',)

says syntax error, I just tried replacing my current string with what you had though.

I think I have it already removing apostrophes I also wanted to add commas

---

<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: [June 28, 2026, 6:24am UTC](https://community.mp3tag.de/t/how-to-remove-commas-when-converting-files-to-tag-names/71519/6 "2026-06-28T06:24:25Z")

</div>

> [@Stealth](#):
>
> says syntax error

You have not closed the outer $replace() brackets ...  
`%discnumber%$lower($replace($num(%track%,2)-%artist%-%title%, ,_,'',,',',))`  
I am not sure about the benefit of the double $replace() - so I removed that.

> [@Stealth](#):
>
> I think I have it already removing apostrophes I also wanted to add commas

In my first post I did not change anything about that. The apostrophes in my suggestion escaped the commas which otherwise would separate parameters.

---

<div class="post-metadata">

### Author: ![Stealth](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@Stealth](https://community.mp3tag.de/u/Stealth)
#### Post date: [June 28, 2026, 2:21pm UTC](https://community.mp3tag.de/t/how-to-remove-commas-when-converting-files-to-tag-names/71519/7 "2026-06-28T14:21:14Z")

</div>

Thanks, I believe this works! I am not sure why I had a double $replace either, I made this like 10 years ago and haven't touched it since haha I probably just added things until it worked and left it alone. Thank you so much!

---

<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: [July 5, 2026, 2:21pm UTC](https://community.mp3tag.de/t/how-to-remove-commas-when-converting-files-to-tag-names/71519/8 "2026-07-05T14:21:38Z")

</div>

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