# Album Tag to Folder Name

**URL:** https://community.mp3tag.de/t/album-tag-to-folder-name/18340
**Category:** Support
**Created:** [October 16, 2016, 7:01pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340 "2016-10-16T19:01:03Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![hypersucker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/ac8455/32.png) [@hypersucker](https://community.mp3tag.de/u/hypersucker)
#### Post date: [October 16, 2016, 7:01pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/1 "2016-10-16T19:01:03Z")

</div>

I've done this hundreds of times. Seriously. But I've been away for a long while and now trying to clean up my files, I cant remember for the life of me, how I did this.

I got loads of files in a download directory. Those are already all properly tagged, e.g. contain the right Album tag.

I want to create folders based on the Album Tag and move those corresponding files to that folder.

I created an Action like this:

Field: \_DIRECTORY  
Format String: %album%\%\_filename%

I want to keep the original File Name, just create the Folders and move those files into it.

Where am I going wrong?

---

<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 17, 2016, 3:19am UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/2 "2016-10-17T03:19:05Z")

</div>

> [@hypa](#):
>
> ...  
> I created an Action like this:
> 
> Field: \_DIRECTORY  
> Format String: %album%\%\_filename%
> 
> I want to keep the original File Name, just create the Folders and move those files into it.
> 
> Where am I going wrong?

I assume it is an action of the type "Format value"?!  
If that is so, use the field \_FILENAME instead of \_DIRECTORY for the purpose you described.

---

<div class="post-metadata">

### Author: ![hypersucker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/ac8455/32.png) [@hypersucker](https://community.mp3tag.de/u/hypersucker)
#### Post date: [October 17, 2016, 8:02pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/3 "2016-10-17T20:02:59Z")

</div>

> [@ohrenkino](#):
>
> I assume it is an action of the type "Format value"?!  
> If that is so, use the field \_FILENAME instead of \_DIRECTORY for the purpose you described.

Yay that worked! Dankeschön 🙂

---

<div class="post-metadata">

### Author: ![hypersucker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/ac8455/32.png) [@hypersucker](https://community.mp3tag.de/u/hypersucker)
#### Post date: [October 25, 2020, 7:33pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/4 "2020-10-25T19:33:06Z")

</div>

4 years later and none the wiser. I could cry.

I want to do the opposite now. Extract tag information from the folder structure.

Folder Name: Artist [Year] Album (then bunch of files in that folder

I tried creating an Action with the Format Value "\_DIRECTORY" and Format String "%artist% [%year%] %album%%\_filename%"

Also tried "\_FILENAME" instead of "\_DIRECTORY".

Y'all probably laugh now cause you see where the error lies but I dont get it. All it does is creating a new Subfolder with the wrong name and none of the tagging action ☹

---

<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 25, 2020, 7:35pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/5 "2020-10-25T19:35:41Z")

</div>

This is a topic from the FAQs, see the import of data from the folder structure:

> [@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: ![hypersucker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/ac8455/32.png) [@hypersucker](https://community.mp3tag.de/u/hypersucker)
#### Post date: [October 25, 2020, 7:45pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/6 "2020-10-25T19:45:20Z")

</div>

of course I read through that FAQ and I can get it to work just fine using Florians example for the Filename-Tag Converter.

I cant get it to work as an Action.

---

<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 25, 2020, 7:46pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/7 "2020-10-25T19:46:17Z")

</div>

the corresponding action is an action of the type "Guess value" with the source %\_directory%

---

<div class="post-metadata">

### Author: ![hypersucker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/ac8455/32.png) [@hypersucker](https://community.mp3tag.de/u/hypersucker)
#### Post date: [October 25, 2020, 7:57pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/8 "2020-10-25T19:57:50Z")

</div>

action type: guess values  
source format: %\_directory%  
guessing pattern: %artist% [%year%] %album%%title%

nothing good happens....

---

<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 25, 2020, 7:58pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/9 "2020-10-25T19:58:37Z")

</div>

you probably have to enclose the brackets in apostrophes  
It may be an idea to test the import string in the convert function first (including a trailing `\%dummy%`)

---

<div class="post-metadata">

### Author: ![hypersucker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/ac8455/32.png) [@hypersucker](https://community.mp3tag.de/u/hypersucker)
#### Post date: [October 25, 2020, 8:01pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/10 "2020-10-25T20:01:52Z")

</div>

%artist% '['%year%']' %album%%title%

does not work.

---

<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 25, 2020, 8:07pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/11 "2020-10-25T20:07:56Z")

</div>

If the pattern that you enter in target does not match the source, then you will not succeed.  
It seems to me that you changed the source somehow as suddenly I see a

> [@hypersucker](#):
>
> %title%

in the string that was not part of this

> [@hypersucker](#):
>
> Folder Name: Artist [Year] Album (then bunch of files in that folder

if you want to get data from only the folder then use %\_directory% as source, if you treat the filename, use %\_FILENAME%.  
The \_filename may also contain path information if you include the `\`

---

<div class="post-metadata">

### Author: ![hypersucker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/ac8455/32.png) [@hypersucker](https://community.mp3tag.de/u/hypersucker)
#### Post date: [October 25, 2020, 8:13pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/12 "2020-10-25T20:13:35Z")

</div>

I dont know what I'm doing since logic is not my thing. So it's trial and error and mostly copy things I find from what other users tired.

I'll try again.

I really only want the 3 variables (Artist [Year] Album) extracted from the folder name (containing only those 3) and put them into tags.

---

<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 25, 2020, 8:15pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/13 "2020-10-25T20:15:50Z")

</div>

You could easily try your pattern in Convert\>Filename- Tag first.  
As soon as that seems to yield the correct results, copy the string and insert it in the action definition for the action of the type "Guess value" for the source %\_filename%.

---

<div class="post-metadata">

### Author: ![hypersucker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/ac8455/32.png) [@hypersucker](https://community.mp3tag.de/u/hypersucker)
#### Post date: [October 25, 2020, 10:17pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/14 "2020-10-25T22:17:39Z")

</div>

I dont know where I go wrong.

Using the Filename-Tag converter works fine.

Format string: %artist% [%year%] %album%%title%

yields the expected result and copies the proper variables from the Foldername (which is formatted ARTIST [YEAR] ALBUM) to the corresponding tag fields. Although I dont need or want the %title% part I dont know how to drop it. If I leave it off how do I tell mp3tag to use the folder and not the filename to process?

Using the above string does not work in actions however.

Action type: Guess values  
Source format: %\_filename%  
Guessing pattern: %artist% [%year%] %album%%title%

Nothing happens when I run that action.

---

<div class="post-metadata">

### Author: ![hypersucker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/ac8455/32.png) [@hypersucker](https://community.mp3tag.de/u/hypersucker)
#### Post date: [October 25, 2020, 10:20pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/15 "2020-10-25T22:20:52Z")

</div>

figured out the first part. %dummy% right?

---

<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 26, 2020, 5:34am UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/16 "2020-10-26T05:34:08Z")

</div>

yes, %dummy% is correct for each part that can be ignored.

> [@hypersucker](#):
>
> Guessing pattern: `%artist% [%year%] %album%%title%`

What about this one:  
Guessing pattern: `%artist% '['%year%']' %album%\%dummy%`

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [October 26, 2020, 5:45am UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/17 "2020-10-26T05:45:33Z")

</div>

> [@hypersucker](#):
>
> Using the Filename-Tag converter works fine.
> 
> Format string: %artist% [%year%] %album%%title%

I wonder how this string can work because there obviously is no unique separator between %album% and %title% in your string. There is even no separator at all. How are ALBUM and TITLE separated in your filename? A white space would not work because you probable have white spaces also in most album names.

Best thing: Show us examples of the real filenames or real directory-names.

If a format-string in the converter Filename-\>Tag does work and does not work in an action of the type "Guess-Values" you possibly have mixed %\_filename% with \_FILENAME as a source.  
Or you have a typo in the format string.

---

<div class="post-metadata">

### Author: ![hypersucker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/ac8455/32.png) [@hypersucker](https://community.mp3tag.de/u/hypersucker)
#### Post date: [October 26, 2020, 8:17pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/18 "2020-10-26T20:17:35Z")

</div>

Tried that, does not work. Nothing happens at all.

---

<div class="post-metadata">

### Author: ![hypersucker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/ac8455/32.png) [@hypersucker](https://community.mp3tag.de/u/hypersucker)
#### Post date: [October 26, 2020, 8:24pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/19 "2020-10-26T20:24:00Z")

</div>

Sorry, I thought it was clear that there is a \ between %album% and %title%. this seems to get lost during copy/paste.

So, here it goes  
Y:\_\_INCOMING\_TEST\Héroes Del Silencio [1987] Héroe De Leyenda\Héroe de leyenda (Versión maxi).flac

Artist: Héroes Del Silencio  
Year: 1987  
Album: Héroe De Leyenda

When I run the following, nothing happens:  
Action type: Guess values  
Source format: %\_filename%  
Guessing pattern: %artist% [%year%] %album%%title% (there is a \ between album and title but the forum software kills it)

---

<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 26, 2020, 8:41pm UTC](https://community.mp3tag.de/t/album-tag-to-folder-name/18340/20 "2020-10-26T20:41:16Z")

</div>

> [@hypersucker](#):
>
> Héroes Del Silencio [1987] Héroe De Leyenda\Héroe de leyenda (Versión maxi)

I tried the following:  
Source: %\_directory%  
Target: `%artist% '['%year%']' %album%`  
and that worked over here.

[Next page](https://community.mp3tag.de/t/album-tag-to-folder-name/18340.md?page=2)
