# Add tags using file name

**URL:** <https://community.mp3tag.de/t/add-tags-using-file-name/44638>\
**Category:** Support\
**Created:** [February 23, 2019, 7:41pm UTC](https://community.mp3tag.de/t/add-tags-using-file-name/44638 "2019-02-23T19:41:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![YahumGelot](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/4da419/32.png) [@YahumGelot](https://community.mp3tag.de/u/YahumGelot)\
**Post date:** [February 23, 2019, 7:41pm UTC](https://community.mp3tag.de/t/add-tags-using-file-name/44638/1 "2019-02-23T19:41:13Z")

</div>

Hey guys  
let me introduce you the situation.

I'm downloading a lot of videos on YouTube using batch.  
Those appear as "video.mp4" in a folder named "20111212-Biloulette-la vidéo d'aujourd'hui", so as "Date-uploader-title". So i'd like to put tags in "video.mp4" using the name of the folder that way : %date%-%artist%-%title%.

How ? Because i can't find how to use the folder name instead of the file name.  
Thanks.  
Martin

---

<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:** [February 23, 2019, 7:44pm UTC](https://community.mp3tag.de/t/add-tags-using-file-name/44638/2 "2019-02-23T19:44:01Z")

</div>

You were on the right track. Use Convert\>Filename - Tag but instead of

> [@YahumGelot](#):
>
> `%date%-%artist%-%title%`

use  
`%date%-%artist%-%title%\%dummy%`  
Please note that %date% is no standard field. It should either be YEAR or RELEASETIME.

---

<div class="post-metadata">

**Author:** ![YahumGelot](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/4da419/32.png) [@YahumGelot](https://community.mp3tag.de/u/YahumGelot)\
**Post date:** [February 23, 2019, 7:47pm UTC](https://community.mp3tag.de/t/add-tags-using-file-name/44638/3 "2019-02-23T19:47:45Z")

</div>

Oh. My. God.  
Thank you so much.  
Another question, then.  
I'd like to do this in a .bat, how?

---

<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:** [February 23, 2019, 7:51pm UTC](https://community.mp3tag.de/t/add-tags-using-file-name/44638/4 "2019-02-23T19:51:03Z")

</div>

if you mean that ".bat" is an action then use an action of the type "Guess value"  
Source: %\_directory%  
Target: `%date%-%artist%-%title%`

---

<div class="post-metadata">

**Author:** ![YahumGelot](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/4da419/32.png) [@YahumGelot](https://community.mp3tag.de/u/YahumGelot)\
**Post date:** [February 23, 2019, 7:53pm UTC](https://community.mp3tag.de/t/add-tags-using-file-name/44638/5 "2019-02-23T19:53:15Z")

</div>

Actually, i'd like a command to say :  
Use mp3tag and put tags on video.mp4 using "Convert\>Filename - Tag" with %releasetime%-%artist%-%title%

Don't know if i'm correctly explaining.

---

<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:** [February 23, 2019, 7:54pm UTC](https://community.mp3tag.de/t/add-tags-using-file-name/44638/6 "2019-02-23T19:54:57Z")

</div>

There is no way to call any functions inside MP3tag by the means of command line parameters.  
So a traditional command shell batch file can (only) open a single file or a folder but cannot start any further functions.

---

<div class="post-metadata">

**Author:** ![YahumGelot](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/4da419/32.png) [@YahumGelot](https://community.mp3tag.de/u/YahumGelot)\
**Post date:** [February 23, 2019, 8:09pm UTC](https://community.mp3tag.de/t/add-tags-using-file-name/44638/7 "2019-02-23T20:09:28Z")

</div>

The idea is not to have to import the video in mp3tag, to write %year%-%artist%-%title%%dummy% and to do "save".

Since i'm downloading thousands of videos, i want it to be automatical !

---

<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:** [February 23, 2019, 8:14pm UTC](https://community.mp3tag.de/t/add-tags-using-file-name/44638/8 "2019-02-23T20:14:12Z")

</div>

I don't understand why you can't modify your workflow.  
You can download as many files as you want, load them all into MP3tag in one go and then extract the data from the folder name.  
If you insist on a workflow with a command line option then it is, as I said, not possible.

---

<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:27pm UTC](https://community.mp3tag.de/t/add-tags-using-file-name/44638/9 "2026-02-09T12:27:56Z")

</div>


