# Filename -\> Tag, based on RegEx manipulation on the existing filename (without renaming)

**URL:** <https://community.mp3tag.de/t/filename-tag-based-on-regex-manipulation-on-the-existing-filename-without-renaming/42819>\
**Category:** Support\
**Created:** [August 31, 2018, 11:52am UTC](https://community.mp3tag.de/t/filename-tag-based-on-regex-manipulation-on-the-existing-filename-without-renaming/42819 "2018-08-31T11:52:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![olspookishmagus](https://community.mp3tag.de/user_avatar/community.mp3tag.de/olspookishmagus/32/5660_2.png) [@olspookishmagus](https://community.mp3tag.de/u/olspookishmagus)\
**Post date:** [August 31, 2018, 11:52am UTC](https://community.mp3tag.de/t/filename-tag-based-on-regex-manipulation-on-the-existing-filename-without-renaming/42819/1 "2018-08-31T11:52:23Z")

</div>

Hello and a special hello to Mp3tag community regulars.

I would like to know if there is a way to update tags based on a regex manipulation on a filename without resulting in a renamed file (or more).

For example suppose you have this file:  
foo - bar [qux].mp3  
where: foo is %title% and bar is %artist%  
but also you have no use for the part in the brackets and still you want it to stay in the filename.

So, how to update accordingly from: Convert -\> Filename - Tag?

Well you can't since you can't use scripting functions there and that's not even implemented.  
Maybe something like this would suffice to the scenario:  
($regexp(%\_FILENAME%,'(._)\ -\ (._)\ [.\*',\1 - \2)%title - %artist)

But anyway, I'm doing it with a bunch of intermediate steps, namely:

- I copy the entire %\_FILENAME% to the %comment% tag  
(which I rarely use or have it NON empty)
- I rename my files somehow  
(for example: using sed in cygwin or with [ReNamer](https://www.den4b.com/products/renamer))
- I do all my Convert -\> Filename - Tag manipulations
- I rename the file to be equal to %comment%
- empty the %comment% tag.

Any ideas/suggestions, please?

---

<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:** [August 31, 2018, 11:57am UTC](https://community.mp3tag.de/t/filename-tag-based-on-regex-manipulation-on-the-existing-filename-without-renaming/42819/2 "2018-08-31T11:57:43Z")

</div>

> [@olspookishmagus](#):
>
> foo - bar [qux].mp3

What about Convert\>Filename-Tag  
Format string: %artist% - %title% [%dummy%]

---

<div class="post-metadata">

**Author:** ![olspookishmagus](https://community.mp3tag.de/user_avatar/community.mp3tag.de/olspookishmagus/32/5660_2.png) [@olspookishmagus](https://community.mp3tag.de/u/olspookishmagus)\
**Post date:** [August 31, 2018, 12:02pm UTC](https://community.mp3tag.de/t/filename-tag-based-on-regex-manipulation-on-the-existing-filename-without-renaming/42819/3 "2018-08-31T12:02:13Z")

</div>

> [@ohrenkino](#):
>
> What about Convert\>Filename-Tag  
> Format string: %artist% - %title% [%dummy%]

What about yes?  
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 9, 2026, 12:27pm UTC](https://community.mp3tag.de/t/filename-tag-based-on-regex-manipulation-on-the-existing-filename-without-renaming/42819/4 "2026-02-09T12:27:38Z")

</div>


