How to get Tags from folder names and file names?

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:

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 :wink:

Please have a look here:

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

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:

"Macros" are called Actions in Mp3tag:

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 :sweat_smile:
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:

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.

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

From the documentation about customizing the Tag Panel:

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, format strings, filters, and export configurations, but not in the Tag Panel.

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

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:

please read here: