# Way to "automate" setting the artist and album from the file name?

**URL:** https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190
**Category:** Mac
**Created:** [March 1, 2021, 10:12pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190 "2021-03-01T22:12:49Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![pbgalvin](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pbgalvin/32/8971_2.png) [@pbgalvin](https://community.mp3tag.de/u/pbgalvin)
#### Post date: [March 1, 2021, 10:12pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/1 "2021-03-01T22:12:49Z")

</div>

Just started using mp3tag, seems wonderful.  
My metadata is a mess, and it confuses Roon.  
So trying to fix it up and make Roon happier.  
Almost all of my mess is files missing tags.  
And the tag info is available in the path name.  
So I've been selecting an album, then typing in the artist and album tags in the left panel based on the directory name.  
I looked at action etc to see if there is a way to automate this, but I don't spot it.  
Is it possible?  
Thanks.

 ![Screen Shot 2021-03-01 at 5.09.54 PM](https://community.mp3tag.de/uploads/default/original/2X/3/332bf34027d92780e97d8516535be1f2adb74eb6.png)

---

<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: [March 1, 2021, 11:10pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/2 "2021-03-01T23:10:57Z")

</div>

You could try to start with the Converter Filename -\> Tag:

> **[Import Tags from File and Folder Names – Mp3tag Documentation](https://docs.mp3tag.de/converters/import-tags-from-filenames/)**
>
> Documentation on Filename to Tag, a converter to import tags from file and folder names. Mp3tag is the universal Tag Editor.

---

<div class="post-metadata">

### Author: ![pbgalvin](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pbgalvin/32/8971_2.png) [@pbgalvin](https://community.mp3tag.de/u/pbgalvin)
#### Post date: [March 1, 2021, 11:37pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/3 "2021-03-01T23:37:24Z")

</div>

Hmm I don't see how to do it with the filename - tag converter - doesn't seem to let me include the path...

---

<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: [March 2, 2021, 5:43am UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/5 "2021-03-02T05:43:09Z")

</div>

Hi Peter and welcome to the forums!

The previous suggestions linked to posts and topics regarding the Windows version of Mp3tag. From the screenshot it looks like you're using Mp3tag for Mac and I've moved the topic to the #mac category of the forums 🙂

Regarding your question: to import metadata from the folder structure, you can use _Convert → Filename - Tag_ and denote folders using the `/` folder separator. I've written about that in [Documentation → Import Tags from Files](https://community.mp3tag.de/t/rename-files-and-import-tags-from-files/51720#import-tags-from-files).

---

<div class="post-metadata">

### Author: ![pbgalvin](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pbgalvin/32/8971_2.png) [@pbgalvin](https://community.mp3tag.de/u/pbgalvin)
#### Post date: [March 2, 2021, 2:47pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/6 "2021-03-02T14:47:17Z")

</div>

Ah, I'm getting there thanks.  
I can do convert-\> filename - tag  
with this string  
////%artist%/%abum%/  
But then separately I need to do  
%title%  
to get the track names in place  
Is there a way to do both of those in one convert step instead of two?

---

<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: [March 2, 2021, 3:10pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/7 "2021-03-02T15:10:30Z")

</div>

You can use `%artist%/%album%/%track% %title%` which should do the trick in your example.

It tries matching from right to left, so you don't need to specify a full-qualified path to import parts of the directory structure.

---

<div class="post-metadata">

### Author: ![pbgalvin](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pbgalvin/32/8971_2.png) [@pbgalvin](https://community.mp3tag.de/u/pbgalvin)
#### Post date: [March 2, 2021, 3:13pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/8 "2021-03-02T15:13:06Z")

</div>

Excellent.  
Now I need to figure out how to filter on blank artist, for example, and then with one cmd-2 I could fix almost all my metadata problems!

---

<div class="post-metadata">

### Author: ![pbgalvin](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pbgalvin/32/8971_2.png) [@pbgalvin](https://community.mp3tag.de/u/pbgalvin)
#### Post date: [March 2, 2021, 3:15pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/9 "2021-03-02T15:15:55Z")

</div>

Hmm  
Title isn't in the path name so I'd need to do something like  
////%artist%/%abum%/ %title%

Which doesn't work to pick up the title...

---

<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: [March 2, 2021, 3:17pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/10 "2021-03-02T15:17:21Z")

</div>

> [@Florian](#):
>
> You can use `%artist%/%album%/%track% %title%` which should do the trick in your example.

> [@pbgalvin](#):
>
> Title isn't in the path name

But it's in the filename, which is the last part in the example I've quoted above.

---

<div class="post-metadata">

### Author: ![pbgalvin](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pbgalvin/32/8971_2.png) [@pbgalvin](https://community.mp3tag.de/u/pbgalvin)
#### Post date: [March 2, 2021, 3:20pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/11 "2021-03-02T15:20:30Z")

</div>

Odd, retyped the convert phase and it seems to do what I want,  
But when applying it the album tag wasn't updated...  
 ![Screen Shot 2021-03-02 at 10.19.28 AM](https://community.mp3tag.de/uploads/default/original/2X/8/87ebf77727b09a2411bd10985c7e728efb05ea1f.png)

---

<div class="post-metadata">

### Author: ![pbgalvin](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pbgalvin/32/8971_2.png) [@pbgalvin](https://community.mp3tag.de/u/pbgalvin)
#### Post date: [March 2, 2021, 3:41pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/12 "2021-03-02T15:41:09Z")

</div>

Filter  
%album% MATCHES ""  
Doesn't seem to show only tracks with no album. Any thoughts on what the filter should look like to do that? Thanks.

---

<div class="post-metadata">

### Author: ![pbgalvin](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pbgalvin/32/8971_2.png) [@pbgalvin](https://community.mp3tag.de/u/pbgalvin)
#### Post date: [March 2, 2021, 3:43pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/13 "2021-03-02T15:43:03Z")

</div>

Looks like I can just sort by album and get all the blanks at the top...

---

<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: [March 2, 2021, 3:53pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/14 "2021-03-02T15:53:09Z")

</div>

> [@Filter Expressions not working?](https://community.mp3tag.de/t/filter-expressions-not-working/51714):
>
> Hi! Maybe I do sth wrong, but when I use any filter expression, nothing happens (no results). Filter only works with single words. (Version 1.0.0-beta.7 (29)). Having any idea what's the problem?

Complex Filter expressions are still in the makings 🙂

---

<div class="post-metadata">

### Author: ![pbgalvin](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pbgalvin/32/8971_2.png) [@pbgalvin](https://community.mp3tag.de/u/pbgalvin)
#### Post date: [March 2, 2021, 4:12pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/15 "2021-03-02T16:12:18Z")

</div>

Thanks. Any thoughts on why the above convert didn't set the album?

---

<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: [March 2, 2021, 4:52pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/16 "2021-03-02T16:52:48Z")

</div>

Yes, it's a typo in the placeholder. You've used `%abum%` instead of `%album%`. You can remove the superfluous `ABUM` fields via the extended tag dialog at Cmd+T.

---

<div class="post-metadata">

### Author: ![pbgalvin](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pbgalvin/32/8971_2.png) [@pbgalvin](https://community.mp3tag.de/u/pbgalvin)
#### Post date: [March 2, 2021, 5:49pm UTC](https://community.mp3tag.de/t/way-to-automate-setting-the-artist-and-album-from-the-file-name/52190/17 "2021-03-02T17:49:36Z")

</div>

Oops, that did it. Thanks!  
What a terrific tool - tagging thousands of tracks at the moment!
