# tag-\>filename, is there a wildcard?

**URL:** https://community.mp3tag.de/t/tag-filename-is-there-a-wildcard/1903
**Category:** Support
**Created:** [April 21, 2005, 3:06pm UTC](https://community.mp3tag.de/t/tag-filename-is-there-a-wildcard/1903 "2005-04-21T15:06:35Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![krux](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/e68b1a/32.png) [@krux](https://community.mp3tag.de/u/krux)
#### Post date: [April 21, 2005, 3:06pm UTC](https://community.mp3tag.de/t/tag-filename-is-there-a-wildcard/1903/1 "2005-04-21T15:06:35Z")

</div>

Hello-  
I would like to switch first/last names of artist on the tag, which I have done (thank you areve) and replace them on the filename. The problem is that I have lots of filenames formatted slightly different (30,000+) due to varying degrees of info. So my question is can I convert:  
tag-\>filename %artist%(everything else the same as it is)  
it would save a bunch of time-otherwise I have to change the ones that are  
%artist%-%title%  
%artist%-%track%-%title%  
%artist%-%album%-%track%-%title%, etc separately  
and  
Thank You for this great program

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [April 21, 2005, 4:29pm UTC](https://community.mp3tag.de/t/tag-filename-is-there-a-wildcard/1903/2 "2005-04-21T16:29:51Z")

</div>

Hello!

If you want to import the artist from filenames all starting with Artist-... you can use the converter Filename - Tag with a formatstring like %artist%-%dummy%  
Best regards,  
~ Florian

---

<div class="post-metadata">

### Author: ![krux](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/e68b1a/32.png) [@krux](https://community.mp3tag.de/u/krux)
#### Post date: [April 21, 2005, 5:00pm UTC](https://community.mp3tag.de/t/tag-filename-is-there-a-wildcard/1903/3 "2005-04-21T17:00:41Z")

</div>

What about the other way, I have changed tags:  
Louis Armstrong (to)  
Armstrong, Louis  
I would like to send that tag -\> filename w/o messing with the rest of the filename becuase I may have  
Louis Armstrong - Blueberry Hill  
Louis Armstrong - Louis Armstrong Plays W.C. Han - Blueberry Hill  
Louis Armstrong - Louis Armstrong Plays W.C. Han -04  
Louis Armstrong -Louis Armstrong Plays W.C. Han -04- Blueberry Hill (change to)

Armstrong, Louis - Blueberry Hill  
Armstrong, Louis - Louis Armstrong Plays W.C. Han -04  
Armstrong, Louis - Louis Armstrong Plays W.C. Han -04- Blueberry Hill  
etc.

---

<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: [April 21, 2005, 5:16pm UTC](https://community.mp3tag.de/t/tag-filename-is-there-a-wildcard/1903/4 "2005-04-21T17:16:54Z")

</div>

> [@](#):
>
> What about the other way, I have changed tags:  
> Louis Armstrong (to)  
> Armstrong, Louis  
> I would like to send that tag -\> filename w/o messing with the rest of the filename becuase I may have  
> Louis Armstrong - Blueberry Hill  
> Louis Armstrong - Louis Armstrong Plays W.C. Han - Blueberry Hill  
> Louis Armstrong - Louis Armstrong Plays W.C. Han -04  
> Louis Armstrong -Louis Armstrong Plays W.C. Han -04- Blueberry Hill (change to)
> 
> Armstrong, Louis - Blueberry Hill  
> Armstrong, Louis - Louis Armstrong Plays W.C. Han -04  
> Armstrong, Louis - Louis Armstrong Plays W.C. Han -04- Blueberry Hill  
> etc.
> 
> \<{POST\_SNAPBACK}\>

I guess you can do that with a RegEx action...

Replace: (._) (._) - (.\*)  
With: $2, $1 - $3

---

<div class="post-metadata">

### Author: ![krux](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/e68b1a/32.png) [@krux](https://community.mp3tag.de/u/krux)
#### Post date: [April 21, 2005, 5:53pm UTC](https://community.mp3tag.de/t/tag-filename-is-there-a-wildcard/1903/5 "2005-04-21T17:53:00Z")

</div>

> [@](#):
>
> I guess you can do that with a RegEx action...
> 
> Replace: (._) (._) - (.\*)  
> With: $2, $1 - $3
> 
> \<{POST\_SNAPBACK}\>

That works if the filename is formatted that particular way, then you have to make a few different RegEx actions for different filename formats and apply them separately. I think maybe the best way for me is to:  
change the tags  
go filename -\> tag %artist% - %album% - %track% - %title%  
then just remove any ' - -' or '- - -' with a new action so I can do 1000's at once  
I guess-I just started using this thing yesterday  
thanks for y'alls help

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [April 21, 2005, 5:55pm UTC](https://community.mp3tag.de/t/tag-filename-is-there-a-wildcard/1903/6 "2005-04-21T17:55:25Z")

</div>

try ALT+1 with  
%artist%$right(%\_filename%,$add($sub($len(%\_filename%),$len(%artist%)),1))

---

<div class="post-metadata">

### Author: ![krux](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/e68b1a/32.png) [@krux](https://community.mp3tag.de/u/krux)
#### Post date: [April 21, 2005, 7:20pm UTC](https://community.mp3tag.de/t/tag-filename-is-there-a-wildcard/1903/7 "2005-04-21T19:20:06Z")

</div>

> [@](#):
>
> try ALT+1 with  
> %artist%$right(%\_filename%,$add($sub($len(%\_filename%),$len(%artist%)),1))
> 
> \<{POST\_SNAPBACK}\>

YES-that is what I needed, thank you very much!  
I wonder if you could walk me through that string format in english  
so I can see how it's formed, if it's not to much trouble...

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [April 22, 2005, 5:47am UTC](https://community.mp3tag.de/t/tag-filename-is-there-a-wildcard/1903/8 "2005-04-22T05:47:17Z")

</div>

The functions are explained in the help file.  
It just builds the new filename from your %artist% in the tag and from the old filename without the artist.

---

<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: [November 12, 2025, 3:05pm UTC](https://community.mp3tag.de/t/tag-filename-is-there-a-wildcard/1903/9 "2025-11-12T15:05:21Z")

</div>

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