# Get tag from filename

**URL:** https://community.mp3tag.de/t/get-tag-from-filename/45077
**Category:** Support
**Created:** [April 9, 2019, 12:35am UTC](https://community.mp3tag.de/t/get-tag-from-filename/45077 "2019-04-09T00:35:59Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![busby](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@busby](https://community.mp3tag.de/u/busby)
#### Post date: [April 9, 2019, 12:35am UTC](https://community.mp3tag.de/t/get-tag-from-filename/45077/1 "2019-04-09T00:35:59Z")

</div>

My radio station requires the correct tags to display on the listeners player. I can automate the correct file name, but not the correct tags. Sometimes the tags are filled in incorrectly so I need to overwrite them. At the moment I do this manually.

The file will be located typically at c:\radio/artist name\artist name - show name.mp3. This will need to be done on a show by show basis, but every show is contained in it's own folder.

Can you tell me what I need to do to make this work please.

Thanks in advance..

---

<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: [April 9, 2019, 6:44am UTC](https://community.mp3tag.de/t/get-tag-from-filename/45077/2 "2019-04-09T06:44:48Z")

</div>

> [@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: ![busby](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@busby](https://community.mp3tag.de/u/busby)
#### Post date: [April 9, 2019, 9:40am UTC](https://community.mp3tag.de/t/get-tag-from-filename/45077/3 "2019-04-09T09:40:40Z")

</div>

Many thanks for the prompt answer.

Can this be done from the command line as I have batch files to move files around folders and delete old files.

---

<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: [April 9, 2019, 9:57am UTC](https://community.mp3tag.de/t/get-tag-from-filename/45077/4 "2019-04-09T09:57:48Z")

</div>

> [@busby](#):
>
> Can this be done from the command line

No.  
But you can

> [@busby](#):
>
> move files around folders

with MP3tag.

---

<div class="post-metadata">

### Author: ![busby](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@busby](https://community.mp3tag.de/u/busby)
#### Post date: [April 9, 2019, 8:26pm UTC](https://community.mp3tag.de/t/get-tag-from-filename/45077/5 "2019-04-09T20:26:17Z")

</div>

Hmm - I was hoping that after much searching, there was a solution that could be automated; at [time]+ [day] write tags from filename.

As mp3tag seems not to be able to do that, I guess I will need to keep looking.

Thanks everyone for answering my questions.

---

<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: [April 9, 2019, 9:19pm UTC](https://community.mp3tag.de/t/get-tag-from-filename/45077/6 "2019-04-09T21:19:53Z")

</div>

If you really only need some very basic id3 tags like artist or title then you may have a look for a command line tool like [id3mtag](https://squell.github.io/id3/) or [id3v2](http://id3v2.sourceforge.net/). They should both work with your batch files.

---

<div class="post-metadata">

### Author: ![busby](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@busby](https://community.mp3tag.de/u/busby)
#### Post date: [April 10, 2019, 12:07am UTC](https://community.mp3tag.de/t/get-tag-from-filename/45077/7 "2019-04-10T00:07:47Z")

</div>

Many thanks, it looks like id3mtag might do what I need but it might be a silly question, but could anyone help me with getting it to work please.

I'm not a coder I'm afraid.

---

<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: [April 10, 2019, 6:42am UTC](https://community.mp3tag.de/t/get-tag-from-filename/45077/8 "2019-04-10T06:42:34Z")

</div>

> [@busby](#):
>
> I'm not a coder I'm afraid.

If you are not a "coder" then I do not understand why you refuse MP3tag with its functions offered by a graphical user interface.  
But if you want to get better help, you would have to be a lot less vague, though, about what you want to do.  
And less vague means: telling us the exact source data, and show us that you want to achieve.

---

<div class="post-metadata">

### Author: ![busby](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@busby](https://community.mp3tag.de/u/busby)
#### Post date: [April 10, 2019, 7:34pm UTC](https://community.mp3tag.de/t/get-tag-from-filename/45077/9 "2019-04-10T19:34:05Z")

</div>

> [@ohrenkino](#):
>
> > [@busby](#):
> >
> > I'm not a coder I'm afraid.
> 
> If you are not a "coder" then I do not understand why you refuse MP3tag with its functions offered by a graphical user interface.

I run a radio station which is highly automated and I want to further automate the tagging of the shows.

To explain further;  
My media consists of pre-recorded shows either uploaded by artists, or downloaded from ftp by a programme called 'BestSync'.

Most of the artists are great, they name and tag their shows fine, however some shows are supplied either by the artist management or by a syndication company, and it's impossible to get them to either properly name or tag theirs shows.

BestSync will rename the files but my playout system uses tags to display show information. At the present time I manually tag 'problem' shows, which is time consuming, and sometimes an un-edited show plays, which is not good.

I have batch files which move or delete old shows when new ones are uploaded or downloaded which also helps.

What I would like to do is when a show is downloaded, or moved folder, to add to my existing batch file a command which will insert the artist and title from the filename.

The convention for the file name is 'Artist Name @artisttwitter - Show Name Episode xxx' (.mp3)

Any help would be much appreciated..

---

<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: [April 10, 2019, 8:03pm UTC](https://community.mp3tag.de/t/get-tag-from-filename/45077/10 "2019-04-10T20:03:08Z")

</div>

> [@busby](#):
>
> The convention for the file name is 'Artist Name @artisttwitter - Show Name Episode xxx' (.mp3)

You can easily import the data parts from the filename using an action or the Convert\>Filename-Tag function:  
Source: %\_filename%  
Target: `%artist% @%dummy% - %title%`  
(%dummy% leaves out this part)  
or if the artist name should also include the twitter address:  
Target: `%artist% - %title%`

If you want to move the files to a "new" folder, then use an action of the type "Format value" for \_FILENAME or the function Convert\>Tag-Filename  
Format string: `k:\new\%_filename%`  
where `k:\new\` has to be replaced with the absolute target path in your environment.

The convert functions have the advantage that you have a preview there. But once you feel confident that it works, you can use the actions and group them to action groups so that you can run them as something similar to a batch job. The only difference: you have to load the files once into MP3tag and start the action there.

---

<div class="post-metadata">

### Author: ![busby](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@busby](https://community.mp3tag.de/u/busby)
#### Post date: [April 10, 2019, 11:41pm UTC](https://community.mp3tag.de/t/get-tag-from-filename/45077/11 "2019-04-10T23:41:01Z")

</div>

Many thanks for the explanation.

The only problem is that I need to automate the process so that it takes place without my intervention at the same time as it is processed by either a batch file or the actions of BestSync.

If I have to manually process the action there is little benefit to me I'm afraid, that's why id3mtag would seem to be more promising, if anyone could help me with that please.

---

<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: [February 9, 2026, 12:28pm UTC](https://community.mp3tag.de/t/get-tag-from-filename/45077/12 "2026-02-09T12:28:01Z")

</div>


