# Inserting tag into filename exluding characters

**URL:** <https://community.mp3tag.de/t/inserting-tag-into-filename-exluding-characters/52141>\
**Category:** Support\
**Created:** [February 26, 2021, 12:17pm UTC](https://community.mp3tag.de/t/inserting-tag-into-filename-exluding-characters/52141 "2021-02-26T12:17:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toiletglasses](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/a9a28c/32.png) [@Toiletglasses](https://community.mp3tag.de/u/Toiletglasses)\
**Post date:** [February 26, 2021, 12:17pm UTC](https://community.mp3tag.de/t/inserting-tag-into-filename-exluding-characters/52141/1 "2021-02-26T12:17:01Z")

</div>

Say there are 5 files, numbered "001 %title%.mp3/m4a", "002 %title%.mp3/m4a, etc.... Could someone explain how to insert " - %artist% - " in-between the existing number and %title%, or conversely, how to increment a prefix 3-digit counter into a filename, following the file list? Rename utilities can do an incrementing counter at any point easily, but can't currently read tags out of audio. Thanks.

---

<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:** [February 26, 2021, 12:36pm UTC](https://community.mp3tag.de/t/inserting-tag-into-filename-exluding-characters/52141/2 "2021-02-26T12:36:55Z")

</div>

You can rebuild the entire filename from scratch - assuming, you have all the necessary informations in your tags. One way to do that is the Converter and Tag -\> Filename ALT + 1 For more help please have a look at [Rename Files – Mp3tag Documentation](https://docs.mp3tag.de/converters/rename-files/) .

One way to renumber your files is the Auto-numbering wizard CTRL + K.

---

<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:** [February 26, 2021, 4:21pm UTC](https://community.mp3tag.de/t/inserting-tag-into-filename-exluding-characters/52141/3 "2021-02-26T16:21:12Z")

</div>

> [@Toiletglasses](#):
>
> 001 %title%.mp3

You could try to rename the filename with Convert\>tag-Tag for \_FILENAME  
Format string: `$regexp(%_filename%,(\d+) (.*),$1 %artist% - $2)`  
If you do not want to use the Numbering assistant which writes to TRACK, you could use %\_counter% as incremental number in the format string.

---

<div class="post-metadata">

**Author:** ![Toiletglasses](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/a9a28c/32.png) [@Toiletglasses](https://community.mp3tag.de/u/Toiletglasses)\
**Post date:** [February 26, 2021, 8:59pm UTC](https://community.mp3tag.de/t/inserting-tag-into-filename-exluding-characters/52141/4 "2021-02-26T20:59:33Z")

</div>

I've marked your response as solution, since it satisfied my request. I didn't know how to integrate regex with tags. I'm a regex newbie, obviously. Thank you very 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:** [March 28, 2021, 8:59pm UTC](https://community.mp3tag.de/t/inserting-tag-into-filename-exluding-characters/52141/5 "2021-03-28T20:59:41Z")

</div>

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