# Filename to releasetime - a little help?

**URL:** <https://community.mp3tag.de/t/filename-to-releasetime-a-little-help/19677>\
**Category:** Support\
**Created:** [January 9, 2018, 4:53pm UTC](https://community.mp3tag.de/t/filename-to-releasetime-a-little-help/19677 "2018-01-09T16:53:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![earbox](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/a9a28c/32.png) [@earbox](https://community.mp3tag.de/u/earbox)\
**Post date:** [January 9, 2018, 4:53pm UTC](https://community.mp3tag.de/t/filename-to-releasetime-a-little-help/19677/1 "2018-01-09T16:53:36Z")

</div>

Hi, folks--forgive me my naivete, since I barely speak regex.

I have a lot of files--NPR stories, to be specific--where the filename begins with a 8-character string that is the release date in YYYYMMDD form. I'd like to create an action to insert this string into the releasetime field as MM/DD/YYYY so that I don't have to adjust each day's worth of files manually.

The filenames all look like this: 20171201\_atc\_the\_disaster\_artist\_is\_the\_best\_movie\_about\_a\_bad\_movie

Is this something that can be done? Thanks.

---

<div class="post-metadata">

**Author:** ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)\
**Post date:** [January 9, 2018, 4:59pm UTC](https://community.mp3tag.de/t/filename-to-releasetime-a-little-help/19677/2 "2018-01-09T16:59:57Z")

</div>

Try  
( **Format action** )  
Format : RELEASETIME

$regexp(%\_filename%,^([19|20]\d{2})(\d{2})(\d{2}).\*,$2/$3/$1)

Or you could add this to a new column for easy sorting using (in the sort part of the new column ui)

$regexp(%\_filename%,^([19|20]\d{2})(\d{2})(\d{2}).\*,$2/$3/$1)

---

<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:** [January 9, 2018, 5:07pm UTC](https://community.mp3tag.de/t/filename-to-releasetime-a-little-help/19677/3 "2018-01-09T17:07:31Z")

</div>

> [@earbox](#):
>
> Hi, folks--forgive me my naivete, since I barely speak regex.
> 
> I have a lot of files--NPR stories, to be specific--where the filename begins with a 8-character string that is the release date in YYYYMMDD form. I'd like to create an action to insert this string into the releasetime field as MM/DD/YYYY so that I don't have to adjust each day's worth of files manually.
> 
> The filenames all look like this: 20171201\_atc\_the\_disaster\_artist\_is\_the\_best\_movie\_about\_a\_bad\_movie
> 
> Is this something that can be done? Thanks.

Actually, the field RELEASETIME has the format  
yyyy-mm-ddThh:mm:ssZ  
So a transformation into MM/DD/YYYY would create an invalid releasetime.  
If you want to get it right, then proceed as follows:  
Create an action group with several actions as follows:

Format value for RELEASETIME  
Format string: $regexp(%\_filename%,^(\d+).\*,$1)  
This imports the leading number from the filename into RELEASETIME

Then insert the separators and a dummy time at the end:  
Format value for RELEASETIME  
Format string: $regexp(%releasetime%,(\d\d\d\d)(\d\d)(\d\d),$1-$2-$3T00:00:00Z)

---

<div class="post-metadata">

**Author:** ![earbox](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/a9a28c/32.png) [@earbox](https://community.mp3tag.de/u/earbox)\
**Post date:** [January 10, 2018, 3:05pm UTC](https://community.mp3tag.de/t/filename-to-releasetime-a-little-help/19677/4 "2018-01-10T15:05:24Z")

</div>

Thank you both--I'll give those a try!

---

<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/filename-to-releasetime-a-little-help/19677/5 "2026-02-09T12:27:11Z")

</div>


