# Convert filename \> tag, what am i doing wrong?

**URL:** https://community.mp3tag.de/t/convert-filename-tag-what-am-i-doing-wrong/52749
**Category:** Support
**Created:** [April 8, 2021, 8:23pm UTC](https://community.mp3tag.de/t/convert-filename-tag-what-am-i-doing-wrong/52749 "2021-04-08T20:23:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Oursoul](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/o/87869e/32.png) [@Oursoul](https://community.mp3tag.de/u/Oursoul)
#### Post date: [April 8, 2021, 8:23pm UTC](https://community.mp3tag.de/t/convert-filename-tag-what-am-i-doing-wrong/52749/1 "2021-04-08T20:23:37Z")

</div>

Hi, lately I've been having a problem when converting filenames to tags. In the past, i'm sure it used to take everything before the hyphen and treat that as %artist%, then everything after would be %title%.

It seems every time I try to convert now, it just takes the first word as the artist, then everything else as the title

e.g. if the filename is The Beatles - Yesterday, it would convert to  
Artist: The  
Title: Beatles - Yesterday

The expression it's using is **%artist% %title%**

![image](https://community.mp3tag.de/uploads/default/original/2X/c/cfeabf9d40e7b07e4659de3ae313ae733d0d5864.png)

---

<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 8, 2021, 8:41pm UTC](https://community.mp3tag.de/t/convert-filename-tag-what-am-i-doing-wrong/52749/2 "2021-04-08T20:41:39Z")

</div>

Hi and welcome!

The format string you're using is missing the hyphen to be able to separate artist and title from each other. As it's now, Mp3tag looks for the first blank (the separator used in the format string between %artist% and %title%), takes anything before as artist and the rest as title.

So a version that matches your intention would be `%artist% - %title%`

More on that here:

> [@Converters to rename files or to import tags](https://community.mp3tag.de/t/converters-to-rename-files-or-to-import-tags/8016/3):
>
> How to import parts of the filename into the tag? Importing tags from filenames and directory names can be done by using the [Converter \> Filename - Tag] Converter \> Filename - Tag. The basic concept is the notion of a format string which describes the structure of the name to import from. The format string is built of either standard text (e.g., Music), placeholders (such as %artist%, %title%, ...), or backslash characters \ that denote directory structures. Here is an example that imports t…

---

<div class="post-metadata">

### Author: ![Oursoul](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/o/87869e/32.png) [@Oursoul](https://community.mp3tag.de/u/Oursoul)
#### Post date: [April 8, 2021, 8:47pm UTC](https://community.mp3tag.de/t/convert-filename-tag-what-am-i-doing-wrong/52749/3 "2021-04-08T20:47:20Z")

</div>

Thanks for the quick reply! Your solution worked:

![image](https://community.mp3tag.de/uploads/default/original/2X/3/3f6de4d68b255341851675e1205f4f8fca9e8aab.png)

Great software by the way, i've been using it for years but only just came across this issue (and i did look around but didn't think to look in the FAQ 🤦‍♂️)

---

<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: [May 8, 2021, 8:48pm UTC](https://community.mp3tag.de/t/convert-filename-tag-what-am-i-doing-wrong/52749/4 "2021-05-08T20:48:15Z")

</div>

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