# How to get Tags from folder names and file names?

**URL:** https://community.mp3tag.de/t/how-to-get-tags-from-folder-names-and-file-names/65617
**Category:** Support
**Created:** [August 15, 2024, 2:54pm UTC](https://community.mp3tag.de/t/how-to-get-tags-from-folder-names-and-file-names/65617 "2024-08-15T14:54:44Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Sexycowboy32](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/35a633/32.png) [@Sexycowboy32](https://community.mp3tag.de/u/Sexycowboy32)
#### Post date: [August 15, 2024, 2:54pm UTC](https://community.mp3tag.de/t/how-to-get-tags-from-folder-names-and-file-names/65617/1 "2024-08-15T14:54:44Z")

</div>

Hi,

I'm new to mp3tag, but I have recently done a lot of digging on ID3v2 tags.

I have a large collection of audio files recorded from my vinyl collection.  
The files are located in folders named after a unique ID (e.g. "54321") pertaining to the release. In this folder, the files are named 0101, 0102, 0103, ..., 0201, 0202, 0203, etc.  
The first two digits are the disc number (side) and the last two are track number.  
The folder also contains a .txt file containing a link to the release on discogs.

First of all, I would like to write the folder name to a tag. Is there a way to make mp3tag do this automatically?

Second, I have tried to add the ORIGFILENAME tag, but nothing is written when I add files to mp3tag. How do I make this tag work? I suppose it should write this tag automatically.

In general, I wonder if there is anyway to macro some of the tags, although I'm inexperienced.

I hope someone can help a beginner out!

_Moderator intervention: The last part of this post has been moved to a new topic:_

> [@How to modify Tags from Discogs?](https://community.mp3tag.de/t/how-to-modify-tags-from-discogs/65620):
>
> Moderator intervention: This part of the questions from @Sexycowboy32 has been moved from [here](https://community.mp3tag.de/t/tags-from-discogs-tags-from-folder-names-and-file-names/65617): When importing tags from the discogs release ID, I find it somewhat lacking in many fields. Again, this might be me not understanding how to set up the tags properly in the first place. However, when importing tags the values in TRACK is A1, A2, B1, B2, etc, and the DISCNUMBER tag is empty. I would prefer that it wrote the A and B side values in DISCNUMBER, if it even takes letters as values. If it…

---

<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: [August 15, 2024, 2:59pm UTC](https://community.mp3tag.de/t/how-to-get-tags-from-folder-names-and-file-names/65617/2 "2024-08-15T14:59:42Z")

</div>

For future questions, I suggest to create different topics for your different questions.  
Otherwise it will quickly get a mess with all the various points.

Just as an overview:  
We can help you to solve most of your questions, some more easier then others 😉

---

<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: [August 15, 2024, 3:02pm UTC](https://community.mp3tag.de/t/how-to-get-tags-from-folder-names-and-file-names/65617/3 "2024-08-15T15:02:21Z")

</div>

> [@Sexycowboy32](#):
>
> First of all, I would like to write the folder name to a tag. Is there a way to make mp3tag do this automatically?

Please have a look here:

> **[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.

If you need specific help, please let us know real existing and complete examples from your collection, like  
`A\ABBA\Waterloo\1971\54321\0101 - King Kong Song.mp3`

---

<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: [August 15, 2024, 3:04pm UTC](https://community.mp3tag.de/t/how-to-get-tags-from-folder-names-and-file-names/65617/4 "2024-08-15T15:04:19Z")

</div>

> [@Sexycowboy32](#):
>
> Second, I have tried to add the ORIGFILENAME tag, but nothing is written when I add files to mp3tag

How exactly did you add `ORIGFILENAME`?  
Did you openend View -\> Extended Tags on one or multiple selected files and entered this ORIGFILENAME and its content?

**Unfortunately I can not write more then 3 consecutive separate answers:**

> [@Sexycowboy32](#):
>
> In general, I wonder if there is anyway to macro some of the tags, although I'm inexperienced.

"Macros" are called Actions in Mp3tag:

> **[Actions – Mp3tag Documentation](https://docs.mp3tag.de/actions/)**
>
> Documentation on Quick Actions and Action Groups that covers replace text, case conversion, tag to tag conversion, duplicate field handling, batch cover import/export, and more. Mp3tag is the universal Tag Editor.

---

<div class="post-metadata">

### Author: ![Sexycowboy32](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/35a633/32.png) [@Sexycowboy32](https://community.mp3tag.de/u/Sexycowboy32)
#### Post date: [August 18, 2024, 9:38am UTC](https://community.mp3tag.de/t/how-to-get-tags-from-folder-names-and-file-names/65617/5 "2024-08-18T09:38:28Z")

</div>

Alright, thank you very much! This was very helpful, and I already made a lot of progress.  
Regarding the multiple questions, I would also not want to flood your forum 😅  
But I see your point, so I will create different topics in the future. (there will probably be a few, I'm sorry!)

I had added a lot of tags in the tag panel, but I couldn't get them to write automatically. I then added all of them as columns instead, and they correctly show all of them (almost). I can't get them to write to the tag panel, though.

my file structure is simply:

```auto
54321\0101.wav
54321\0102.wav
54321\0201.wav
54321\0202.wav
54321\new_document.txt

```

I found out how to make my "ID\_tag" show `%_directory%` in the column, but the same field remains empty in the tag panel. It's the same problem with a lot of the other tags, but the most important right now is the ID for my personal collection.

---

<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: [August 18, 2024, 9:56am UTC](https://community.mp3tag.de/t/how-to-get-tags-from-folder-names-and-file-names/65617/6 "2024-08-18T09:56:31Z")

</div>

The tag panel allows only fields that can be edited by the user. This does not include fields with an underscore in front.

---

<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: [August 18, 2024, 10:11am UTC](https://community.mp3tag.de/t/how-to-get-tags-from-folder-names-and-file-names/65617/7 "2024-08-18T10:11:59Z")

</div>

> [@Sexycowboy32](#):
>
> but the same field remains empty in the tag panel.

From the documentation about customizing the [Tag Panel](https://docs.mp3tag.de/customization/tag-panel/#editing-fields):

> [Technical information](https://docs.mp3tag.de/format/#technical-information) cannot be added as field to the Tag Panel with the exception of the special fields `_DIRECTORY` which is used to add a directory field and `_SEPARATOR` to add a separator that creates a new row.

and

> **Technical information fields begin with an underscore `%_`** are read-only and may also be used in the [File List](https://docs.mp3tag.de/customization/file-list/), [format strings](https://docs.mp3tag.de/format/), [filters](https://docs.mp3tag.de/filter/), and [export configurations](https://docs.mp3tag.de/export/), **but not in the Tag Panel**.

---

<div class="post-metadata">

### Author: ![Sexycowboy32](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/35a633/32.png) [@Sexycowboy32](https://community.mp3tag.de/u/Sexycowboy32)
#### Post date: [August 18, 2024, 11:24am UTC](https://community.mp3tag.de/t/how-to-get-tags-from-folder-names-and-file-names/65617/8 "2024-08-18T11:24:20Z")

</div>

Ah, okay.  
So I suppose I will need to add that manually?

Then I suppose I'll have the same issue with `ORIGFILENAME` and `FILETYPE`?

It can't be added by making custom list values in some way?  
I'm sorry, I'm still figuring out how the tag panel works

---

<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: [August 18, 2024, 11:29am UTC](https://community.mp3tag.de/t/how-to-get-tags-from-folder-names-and-file-names/65617/9 "2024-08-18T11:29:30Z")

</div>

You can add whatever Tagnames you like or need in your files.  
Including your ORIGFILENAME or FILETYPE

There is only 1 exception:  
Tagnames starting with an underscore **`%_`** are not possible in the Tag Panel.  
They are read-only.  
Therefore you can not add a Tag like  
`%_extension%`

* * *

For your question:

> [@Sexycowboy32](#):
>
> It can't be added by making custom list values in some way?

please read here:

> [@Add custom user-defined Genres](https://community.mp3tag.de/t/add-custom-user-defined-genres/61122):
>
> Add and Edit user-defined Genres via Custom List Values Every field on the Tag Panel can have custom values added to its drop-down list. These can be customized via [Options → Tag Panel](https://docs.mp3tag.de/customization/tag-panel/) and the Genre field is no exception. You can use Options → Tag Panel → Genre → Custom list values → Manage... to edit the list of custom Genres and also hide the standard genres, if you prefer your own. The following screenshot exemplifies the process: Import and Export of Custom Lis…

---

<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: [September 17, 2024, 11:30am UTC](https://community.mp3tag.de/t/how-to-get-tags-from-folder-names-and-file-names/65617/10 "2024-09-17T11:30:08Z")

</div>

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