# Derive Artist tag from file path... how?

**URL:** https://community.mp3tag.de/t/derive-artist-tag-from-file-path-how/16751
**Category:** General Discussion
**Created:** [March 26, 2015, 8:17am UTC](https://community.mp3tag.de/t/derive-artist-tag-from-file-path-how/16751 "2015-03-26T08:17:28Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Lestrad](https://community.mp3tag.de/user_avatar/community.mp3tag.de/lestrad/32/347_2.png) [@Lestrad](https://community.mp3tag.de/u/Lestrad)
#### Post date: [March 26, 2015, 8:17am UTC](https://community.mp3tag.de/t/derive-artist-tag-from-file-path-how/16751/1 "2015-03-26T08:17:28Z")

</div>

Hello. Most of my "classical" files are in a folder or a subfolder of a folder that is the composer's name. I'm looking for a way to write the Artist tag from that folder name (I use Artist for the composer and Album Artist for the performers). I tried using Tag - Tag conversion with %ALBUM% in the Field box and %\_directory% or %\_parent\_directory% in Format String. When I click OK the program says "Formatted tags in x of x files," but nothing is actually getting written to the tags. Is there another way to do this?

Thanks in advance

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [March 26, 2015, 8:42am UTC](https://community.mp3tag.de/t/derive-artist-tag-from-file-path-how/16751/2 "2015-03-26T08:42:09Z")

</div>

> [@Lestrad](#):
>
> ... I tried using Tag - Tag conversion with %ALBUM% in the Field box and %\_directory% or %\_parent\_directory% in Format String. When I click OK the program says "Formatted tags in x of x files," but nothing is actually getting written to the tags. Is there another way to do this? Thanks in advance

In the field box you have to write the name of the target tag-field,  
which is: **ALBUM**  
but not the content, ...  
which is: **%ALBUM%**

DD.20150326.1044.CET

---

<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: [March 26, 2015, 9:23am UTC](https://community.mp3tag.de/t/derive-artist-tag-from-file-path-how/16751/3 "2015-03-26T09:23:59Z")

</div>

> [@Lestrad](#):
>
> Hello. Most of my "classical" files are in a folder or a subfolder of a folder that is the composer's name. I'm looking for a way to write the Artist tag from that folder name (I use Artist for the composer and Album Artist for the performers). I tried using Tag - Tag conversion with %ALBUM% in the Field box and %\_directory% or %\_parent\_directory% in Format String. When I click OK the program says "Formatted tags in x of x files," but nothing is actually getting written to the tags. Is there another way to do this?
> 
> Thanks in advance

You could also try the function Convert\>Filename - Tag:  
%artist%\%albumartist%\%dummy%

Use the backslash to address a folder,  
use %dummy% for any data you do not want to consider.  
In this case the %dummy% causes to ignore the filename.

---

<div class="post-metadata">

### Author: ![Lestrad](https://community.mp3tag.de/user_avatar/community.mp3tag.de/lestrad/32/347_2.png) [@Lestrad](https://community.mp3tag.de/u/Lestrad)
#### Post date: [March 26, 2015, 12:03pm UTC](https://community.mp3tag.de/t/derive-artist-tag-from-file-path-how/16751/4 "2015-03-26T12:03:35Z")

</div>

> [@DetlevD](#):
>
> In the field box you have to write the name of the target tag-field,  
> which is: **ALBUM**  
> but not the content, ...  
> which is: **%ALBUM%**
> 
> DD.20150326.1044.CET

Brilliant! Thanks!

---

<div class="post-metadata">

### Author: ![Lestrad](https://community.mp3tag.de/user_avatar/community.mp3tag.de/lestrad/32/347_2.png) [@Lestrad](https://community.mp3tag.de/u/Lestrad)
#### Post date: [March 26, 2015, 12:08pm UTC](https://community.mp3tag.de/t/derive-artist-tag-from-file-path-how/16751/5 "2015-03-26T12:08:33Z")

</div>

> [@ohrenkino](#):
>
> You could also try the function Convert\>Filename - Tag:  
> %artist%\%albumartist%\%dummy%
> 
> Use the backslash to address a folder,  
> use %dummy% for any data you do not want to consider.  
> In this case the %dummy% causes to ignore the filename.

I'm sorry, but I don't see how to get the information from the file path when the name of the composer/artist is not in the filename...

---

<div class="post-metadata">

### Author: ![Lestrad](https://community.mp3tag.de/user_avatar/community.mp3tag.de/lestrad/32/347_2.png) [@Lestrad](https://community.mp3tag.de/u/Lestrad)
#### Post date: [March 26, 2015, 12:56pm UTC](https://community.mp3tag.de/t/derive-artist-tag-from-file-path-how/16751/6 "2015-03-26T12:56:30Z")

</div>

Detlev's solution works, but there are times - not just when converting that way, but also when converting Filenames to Tags - when the tags just don't get written. It just happened, and I looked at the Properties and I see: "APE version 2 tags." Could that have something to do with the tags not being written?

---

<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: [March 26, 2015, 1:45pm UTC](https://community.mp3tag.de/t/derive-artist-tag-from-file-path-how/16751/7 "2015-03-26T13:45:24Z")

</div>

APE tags overwrite ID3V2 and V1 tags. so if you read APE tags but do not write them, you still see the unaltered APE tags.  
See File\>Options\>Tags\>Mpeg  
Set read and delete for all tag versions.  
Set write at least for V2.3 and possibly for V1 (does not really harm, depends on personal preferences)
