# Extract Date from filename and create tag

**URL:** <https://community.mp3tag.de/t/extract-date-from-filename-and-create-tag/47048>\
**Category:** Support\
**Created:** [November 15, 2019, 12:07am UTC](https://community.mp3tag.de/t/extract-date-from-filename-and-create-tag/47048 "2019-11-15T00:07:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wtmac](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/54ee81/32.png) [@wtmac](https://community.mp3tag.de/u/wtmac)\
**Post date:** [November 15, 2019, 12:07am UTC](https://community.mp3tag.de/t/extract-date-from-filename-and-create-tag/47048/1 "2019-11-15T00:07:51Z")

</div>

I am trying to convert the filename for OTR radio programs to something I can better sort.

I have files for example with the name 19450521 157 28m55s Man Who Bought Death and I want the track name to be 1945-05-21 - Man Who Bought Death.

I have been playing with the actions but have yet to get this to work. I would prefer to do this in a batch as I have 1000's of files in this format and the media I just received has it as in the example.

Can someone point out if this can be done or not in a batch?

Thank you

---

<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:** [November 15, 2019, 5:47am UTC](https://community.mp3tag.de/t/extract-date-from-filename-and-create-tag/47048/2 "2019-11-15T05:47:32Z")

</div>

You could try an action of the type "Format tag field" or use the function Convert\>Tag-Tag for whatever target field you need  
Format string: `$regexp(%your_fieldname_here%,(\d{4})(\d\d)(\d\d) \d+.*s (.*),$1-$2-$3 - $4)`

---

<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/extract-date-from-filename-and-create-tag/47048/3 "2026-02-09T12:28:19Z")

</div>


