# Author/book/\*.mp3 - autor as tag: artist

**URL:** https://community.mp3tag.de/t/author-book-mp3-autor-as-tag-artist/54710
**Category:** General Discussion
**Created:** [October 11, 2021, 9:47am UTC](https://community.mp3tag.de/t/author-book-mp3-autor-as-tag-artist/54710 "2021-10-11T09:47:11Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![baboo](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@baboo](https://community.mp3tag.de/u/baboo)
#### Post date: [October 11, 2021, 9:47am UTC](https://community.mp3tag.de/t/author-book-mp3-autor-as-tag-artist/54710/1 "2021-10-11T09:47:11Z")

</div>

hello.  
I have audiobooks arranged in folders: author/book/\*.mp3  
I would like to use the folder name "author" as the tag: artist.  
Is there a way to do this?  
Does the program have any tool to automate this process?

thx for help

---

<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: [October 11, 2021, 9:55am UTC](https://community.mp3tag.de/t/author-book-mp3-autor-as-tag-artist/54710/2 "2021-10-11T09:55:34Z")

</div>

> [@baboo](#):
>
> Is there a way to do this?

Yes. Use the Convert Filename -\> Tag (ALT + 2)  
with the format string  
`\%artist%\%dummy%\%dummy%`

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

If you want to use the other parts in your folder name, just replace `%dummy%` with your target fields, like `%album%` or `%title%` or whatever tag you wish.

---

<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: [October 11, 2021, 9:56am UTC](https://community.mp3tag.de/t/author-book-mp3-autor-as-tag-artist/54710/3 "2021-10-11T09:56:28Z")

</div>

Use Converter\>Filename-Tag  
Mask: `%artist%\%dummy%\%dummy%`

Should work for all selected files.

---

<div class="post-metadata">

### Author: ![baboo](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@baboo](https://community.mp3tag.de/u/baboo)
#### Post date: [October 11, 2021, 10:02am UTC](https://community.mp3tag.de/t/author-book-mp3-autor-as-tag-artist/54710/4 "2021-10-11T10:02:10Z")

</div>

Works!!!  
can this be done using actions?

---

<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: [October 11, 2021, 10:35am UTC](https://community.mp3tag.de/t/author-book-mp3-autor-as-tag-artist/54710/5 "2021-10-11T10:35:36Z")

</div>

Yes, but only without preview. So be careful and double check if the content for your artist is really always to find in the parent directory of your selected song.

Actions -\> Action Type "Guess Values":  
**Wait, I have to check it again...**  
~~Source format: `ARTIST`~~  
~~Guessing pattern: `%_parent_directory%`~~

Hmm, unfortunately this doesn't seem to work...

---

<div class="post-metadata">

### Author: ![baboo](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@baboo](https://community.mp3tag.de/u/baboo)
#### Post date: [October 11, 2021, 11:03am UTC](https://community.mp3tag.de/t/author-book-mp3-autor-as-tag-artist/54710/6 "2021-10-11T11:03:25Z")

</div>

If you find a solution let me know.  
The previous solution is sufficient for now.  
Certainly, the program will make fewer mistakes than I write from the hand.  
"The most unreliable component of a computer is the organic connector between the chair and the keyboard."  
Thank you all very much.  
Best regards

---

<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: [October 11, 2021, 12:00pm UTC](https://community.mp3tag.de/t/author-book-mp3-autor-as-tag-artist/54710/7 "2021-10-11T12:00:38Z")

</div>

I think I found a solution in 3 steps:

**1.)** Split your existing path into a temporary tag field, like MY\_SPLITTED\_FOLDERPATH with an  
Action Type "Format value"  
Field:  
`MY_SPLITTED_FOLDERPATH`  
Format string:  
`$replace(%_FOLDERPATH%,'\','\\')`  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/c/cc353537cfe5f99a9d4c5f654bf1f4f0ab05d4c2.png)  
this would look like this if you press ALT + T:

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

**2.)** Get the needed item from the newly created MY\_SPLITTED\_FOLDERPATH tag into the ARTIST tag with a second action:  
Action Type "Format value"  
Field:  
`ARTIST`  
Format string:  
`$meta(MY_SPLITTED_FOLDERPATH,3)`  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/0/0e348f28266fc38628f22c2683227053612de470.png)  
The number after the comma indicates the item number. In our example  
`C:` would be item number 0  
`Temp` would be item number 1  
`mp3-Test` would be item number 2  
`author` would be item number 3  
`book` would be item number 4

**3.)** Clean up all the no more used MY\_SPLITTED\_FOLDERPATH tag fields with an action  
Action Type "Remove fields"  
Fields to remove:  
`MY_SPLITTED_FOLDERPATH`  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/a/a0e6ed9b22f53963de6f2ee927bb543e217fd80d.png)

[Thanks go to DetlevD](https://community.mp3tag.de/t/easy-way-to-get-directory-names-above-parent/9324/5) for his idea.

---

<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: [October 11, 2021, 3:02pm UTC](https://community.mp3tag.de/t/author-book-mp3-autor-as-tag-artist/54710/8 "2021-10-11T15:02:55Z")

</div>

You could use "Guess value"  
Source: %\_path%  
Target: `M:\MyMusic\Artists\%artist%\%dummy%`  
Please note the case sensitivity of the target.  
Describe in the path all the parts that are the same for all files with text constants and then add a %dummy% for each variable but unwanted part.
