# Convert Filename with YYYY-MM-DD to DD-MMM-YYYY

**URL:** <https://community.mp3tag.de/t/convert-filename-with-yyyy-mm-dd-to-dd-mmm-yyyy/16915>\
**Category:** Support\
**Created:** [May 23, 2015, 6:27am UTC](https://community.mp3tag.de/t/convert-filename-with-yyyy-mm-dd-to-dd-mmm-yyyy/16915 "2015-05-23T06:27:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![waterfall](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/53a042/32.png) [@waterfall](https://community.mp3tag.de/u/waterfall)\
**Post date:** [May 23, 2015, 6:27am UTC](https://community.mp3tag.de/t/convert-filename-with-yyyy-mm-dd-to-dd-mmm-yyyy/16915/1 "2015-05-23T06:27:48Z")

</div>

Hi all,

I regularly download podcasts and for filing purposes (to keep them all in order - sorted by name) always name the files with the following format: YYYY-MM-DD-[Episode name/title or number goes here]

For example:

- 2015-03-23-302
- 2015-03-30-304
- 2015-05-13-Technology Road Show

They will always be in this format and after the DD part of the filename is a dash which will always be followed by either an episode title or episode series number.

What I'd like to do is convert "filename" from YYYY-MM-DD-[Episode Title] to the following mp3tag "title" field: DD-MMM-YYYY: [Episode name/title or number goes here]

So, taking the some examples from the list above:

- Original File = 2015-03-23-302 , Convert to 23-Mar-2015-302
- Original File = 2015-03-30-304 , Convert to 30-Mar-2015-304
- 2015-05-13-Technology Road Show , Convert to 13-May-2015-Technology Road Show

MMM I want to short month form, for example if it's month "03", show "Mar" for March. The dash (-) in the last part of the filename is to be replaced by a colon ( : )

Help warmly welcomed and especially appreciated - thank you 🙂

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [May 23, 2015, 7:19am UTC](https://community.mp3tag.de/t/convert-filename-with-yyyy-mm-dd-to-dd-mmm-yyyy/16915/2 "2015-05-23T07:19:28Z")

</div>

> [@waterfall](#):
>
> ... The dash (-) in the last part of the filename is to be replaced by a colon ( : ) ...

This is not possible because the colon is not allowed within a filename, ...  
but if you want to write the colon into a tag-field, that's ok.

> [@waterfall](#):
>
> ... I regularly ... name the files with the following format: YYYY-MM-DD-[Episode name/title or number goes here] ... What I'd like to do is convert "filename" from YYYY-MM-DD-[Episode Title] to the following mp3tag "title" field: DD-MMM-YYYY: [Episode name/title or number goes here]  
> So, taking the some examples from the list above:
> 
> - Original File = 2015-03-23-302 , Convert to 23-Mar-2015-302
> - Original File = 2015-03-30-304 , Convert to 30-Mar-2015-304
> - 2015-05-13-Technology Road Show , Convert to 13-May-2015-Technology Road Show  
> MMM I want to short month form, for example if it's month "03", show "Mar" for March. ...

In Mp3tag there are different ways to reach the goal, here is one ...

**Action: Format Value Field: TITLE Formatstring: $regexp(%\_filename%,'^(\d\d\d\d)-(\d\d)-(\d\d)(.\*)$','$3')'-'$regexp('01Jan02Feb03Mar04Apr05May06Jun07Jul08Aug09Sep10Oct11Nov12Dec','^.\*'$regexp(%\_filename%,'^(\d\d\d\d)-(\d\d)-(\d\d)(.\*)$','$2')'(\w\w\w).\*$','$1')'-'$regexp(%\_filename%,'^(\d\d\d\d)-(\d\d)-(\d\d)-(.\*)$','$1:$4') From: 2015-03-23-302 To : 23-Mar-2015:302**

Here is another example ...

Begin Action Group **Test2015#20150523.waterfall** 

Action #1  
_Actiontype 5:_ **Format value**  
_Field \_\_\_\_\_\_:_ **TMP\_FN1**  
_Formatstring:_ **$regexp(%\_filename%,'^(\d\d\d\d)-(\d\d)-(\d\d)-(.+?)$','$1')**

 

Action #2  
_Actiontype 5:_ **Format value**  
_Field \_\_\_\_\_\_:_ **TMP\_FN2**  
_Formatstring:_ **$regexp(%\_filename%,'^(\d\d\d\d)-(\d\d)-(\d\d)-(.+?)$','$2')**

 

Action #3  
_Actiontype 5:_ **Format value**  
_Field \_\_\_\_\_\_:_ **TMP\_FN3**  
_Formatstring:_ **$regexp(%\_filename%,'^(\d\d\d\d)-(\d\d)-(\d\d)-(.+?)$','$3')**

 

Action #4  
_Actiontype 5:_ **Format value**  
_Field \_\_\_\_\_\_:_ **TMP\_FN4**  
_Formatstring:_ **$regexp(%\_filename%,'^(\d\d\d\d)-(\d\d)-(\d\d)-(.+?)$','$4')**

 

Action #5  
_Actiontype 5:_ **Format value**  
_Field \_\_\_\_\_\_:_ **TMP\_FN2**  
_Formatstring:_ **$replace(%TMP\_FN2%,'01','Jan','02','Feb','03','Mar','04','Apr','05','May',  
'06','Jun','07','Jul','08','Aug','09','Sep','10','Oct','11','Nov','12','Dec')**

 

Action #6  
_Actiontype 5:_ **Format value**  
_Field \_\_\_\_\_\_:_ **TITLE**  
_Formatstring:_ **%TMP\_FN3%'-'%TMP\_FN2%'-'%TMP\_FN1%':'%TMP\_FN4%**

 

Action #7  
_Actiontype 9:_ **Remove fields**  
_Fields to remove (semicolon separated):_ **TMP\_FN1;TMP\_FN2;TMP\_FN3;TMP\_FN4**

 

End Action Group **Test2015#20150523.waterfall** (7 Actions)

 

Here is another example ...

 Begin Action Group **Test2015#20150523.waterfall.2** 

Action #1  
_Actiontype 7:_ **Import tag fields (guess values)**  
_Source format \_\_:_ **%\_FILENAME%**  
_Guessing pattern:_ **%TMP\_FN1%-%TMP\_FN2%-%TMP\_FN3%-%TMP\_FN4%**

 

Action #2  
_Actiontype 5:_ **Format value**  
_Field \_\_\_\_\_\_:_ **TMP\_FN2**  
_Formatstring:_ **$replace(%TMP\_FN2%,'01','Jan','02','Feb','03','Mar','04','Apr','05','May',  
'06','Jun','07','Jul','08','Aug','09','Sep','10','Oct','11','Nov','12','Dec')**

 

Action #3  
_Actiontype 5:_ **Format value**  
_Field \_\_\_\_\_\_:_ **TITLE**  
_Formatstring:_ **%TMP\_FN3%'-'%TMP\_FN2%'-'%TMP\_FN1%':'%TMP\_FN4%**

 

Action #4  
_Actiontype 9:_ **Remove fields**  
_Fields to remove (semicolon separated):_ **TMP\_FN1;TMP\_FN2;TMP\_FN3;TMP\_FN4**

 

End Action Group **Test2015#20150523.waterfall.2** (4 Actions)

 

DD.20150523.1217.CEST

 

With reference to post #3 ...  
the target field has been changed to TITLE ...  
and the last separator character has been changed from hyphen minus '-' to colon ':'.

 

DD.20150523.1801.CEST

---

<div class="post-metadata">

**Author:** ![waterfall](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/53a042/32.png) [@waterfall](https://community.mp3tag.de/u/waterfall)\
**Post date:** [May 23, 2015, 1:35pm UTC](https://community.mp3tag.de/t/convert-filename-with-yyyy-mm-dd-to-dd-mmm-yyyy/16915/3 "2015-05-23T13:35:39Z")

</div>

DetlevD, firstly thanks so much for taking the time to reply and also for the fantasticly and expertly provided info!

Where you mention the colon ( : ), I'm talking about this character being withing the "title" field of the tag. In fact, I want all this to take place in the tag itself and leave the filename in tact; the filename is just used as the source to generate the value of the tag "title" field.

I've tried your first suggestion and it works _almost_ perfectly, it does the job but I want that dash ( - ) replaced to a colon, and, all of the conversion to take place in the tag itself?

Much gratitude 🙂

* * *

Edit: If I change the "Field: \_FILENAME" in your code firstly provided to "title" it works exactly as I want it to! Just need to replace the dash in that part to a colon if at all possible?

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [May 23, 2015, 1:53pm UTC](https://community.mp3tag.de/t/convert-filename-with-yyyy-mm-dd-to-dd-mmm-yyyy/16915/4 "2015-05-23T13:53:09Z")

</div>

> [@waterfall](#):
>
> ... Just need to replace the dash in that part to a colon if at all possible?

Changes are made, see post #2.

DD.20150523.1753.CEST

---

<div class="post-metadata">

**Author:** ![waterfall](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/53a042/32.png) [@waterfall](https://community.mp3tag.de/u/waterfall)\
**Post date:** [May 23, 2015, 2:03pm UTC](https://community.mp3tag.de/t/convert-filename-with-yyyy-mm-dd-to-dd-mmm-yyyy/16915/5 "2015-05-23T14:03:03Z")

</div>

> [@DetlevD](#):
>
> Changes are made, see post #2.
> 
> DD.20150523.1753.CEST

Edit:  
I do apologise, I've got the intended string the wrong way around, how to modify the code to the following format: [Episode Title]: [Date] e.g. 301: 07-Apr-2015 ??

I'm trying to figure using the code but not having no joy - and apologies again, I've just realised my oversight after testing on more files :s

Original Response:  
Absolutely beautiful, perfect - thanks so much!

A v.speedy reply and also perfectly understood and solution offered 100% sublime. Can I donate PayPal to you to buy a beer or coffee?

* * *

Summary - your solution is spot and bang on, perfect. I apologise again, I get the intended output the wrong way around.

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [May 23, 2015, 2:18pm UTC](https://community.mp3tag.de/t/convert-filename-with-yyyy-mm-dd-to-dd-mmm-yyyy/16915/6 "2015-05-23T14:18:37Z")

</div>

> [@waterfall](#):
>
> Absolutely beautiful, perfect - thanks so much! A v.speedy reply and also perfectly understood and solution offered 100% sublime. Can I donate PayPal to you to buy a beer or coffee?

Ho, waterfall, thank you very much!  
Too bad for me, I have no online account to collect gifts, but I should probably set up one.  
For now I will take your words as reality.  
But you are also free to send my earning to Florian's depot.

DD.20150523.1818.CEST

---

<div class="post-metadata">

**Author:** ![waterfall](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/53a042/32.png) [@waterfall](https://community.mp3tag.de/u/waterfall)\
**Post date:** [May 23, 2015, 2:28pm UTC](https://community.mp3tag.de/t/convert-filename-with-yyyy-mm-dd-to-dd-mmm-yyyy/16915/7 "2015-05-23T14:28:06Z")

</div>

Will do, of course - and with pleasure!

Did you see request to switch around the output format please?

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [May 23, 2015, 2:35pm UTC](https://community.mp3tag.de/t/convert-filename-with-yyyy-mm-dd-to-dd-mmm-yyyy/16915/8 "2015-05-23T14:35:25Z")

</div>

> [@waterfall](#):
>
> Edit: I do apologise, I've got the intended string the wrong way around, how to modify the code to the following format: [Episode Title]: [Date] e.g. 301: 07-Apr-2015 ?? ...

**Action: Format Value Field: TITLE Formatstring: $regexp(%\_filename%,'^(\d\d\d\d)-(\d\d)-(\d\d)-(.+?)$','$4: $3')'-'$regexp('01Jan02Feb03Mar04Apr05May06Jun07Jul08Aug09Sep10Oct11Nov12Dec','^.\*'$regexp(%\_filename%,'^(\d\d\d\d)-(\d\d)-(\d\d)(.\*)$','$2')'(\w\w\w).\*$','$1')'-'$regexp(%\_filename%,'^(\d\d\d\d)-(\d\d)-(\d\d)-(.+?)$','$1') From: 2015-03-23-302 To : 302: 23-Mar-2015 ... or ... Begin Action Group Test2015#20150523.waterfall.3 Action #1 Actiontype 5: Format value Field \_\_\_\_\_\_: TMP\_FN1 Formatstring: $regexp(%\_filename%,'^(\d\d\d\d)-(\d\d)-(\d\d)-(.+?)$','$1') Action #2 Actiontype 5: Format value Field \_\_\_\_\_\_: TMP\_FN2 Formatstring: $regexp(%\_filename%,'^(\d\d\d\d)-(\d\d)-(\d\d)-(.+?)$','$2') Action #3 Actiontype 5: Format value Field \_\_\_\_\_\_: TMP\_FN3 Formatstring: $regexp(%\_filename%,'^(\d\d\d\d)-(\d\d)-(\d\d)-(.+?)$','$3') Action #4 Actiontype 5: Format value Field \_\_\_\_\_\_: TMP\_FN4 Formatstring: $regexp(%\_filename%,'^(\d\d\d\d)-(\d\d)-(\d\d)-(.+?)$','$4') Action #5 Actiontype 5: Format value Field \_\_\_\_\_\_: TMP\_FN2 Formatstring: $replace(%TMP\_FN2%,'01','Jan','02','Feb','03','Mar','04','Apr','05','May', '06','Jun','07','Jul','08','Aug','09','Sep','10','Oct','11','Nov','12','Dec') Action #6 Actiontype 5: Format value Field \_\_\_\_\_\_: TITLE Formatstring: %TMP\_FN4%': '%TMP\_FN3%'-'%TMP\_FN2%'-'%TMP\_FN1% Action #7 Actiontype 9: Remove fields Fields to remove (semicolon separated): TMP\_FN1;TMP\_FN2;TMP\_FN3;TMP\_FN4 End Action Group Test2015#20150523.waterfall.3 (7 Actions) ... or ... Begin Action Group Test2015#20150523.waterfall.4 Action #1 Actiontype 7: Import tag fields (guess values) Source format \_\_: %\_FILENAME% Guessing pattern: %TMP\_FN1%-%TMP\_FN2%-%TMP\_FN3%-%TMP\_FN4% Action #2 Actiontype 5: Format value Field \_\_\_\_\_\_: TMP\_FN2 Formatstring: $replace(%TMP\_FN2%,'01','Jan','02','Feb','03','Mar','04','Apr','05','May', '06','Jun','07','Jul','08','Aug','09','Sep','10','Oct','11','Nov','12','Dec') Action #3 Actiontype 5: Format value Field \_\_\_\_\_\_: TITLE Formatstring: %TMP\_FN4%': '%TMP\_FN3%'-'%TMP\_FN2%'-'%TMP\_FN1% Action #4 Actiontype 9: Remove fields Fields to remove (semicolon separated): TMP\_FN1;TMP\_FN2;TMP\_FN3;TMP\_FN4 End Action Group Test2015#20150523.waterfall.4 (4 Actions)**

DD.20150523.1837.CEST

---

<div class="post-metadata">

**Author:** ![waterfall](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/53a042/32.png) [@waterfall](https://community.mp3tag.de/u/waterfall)\
**Post date:** [May 23, 2015, 2:52pm UTC](https://community.mp3tag.de/t/convert-filename-with-yyyy-mm-dd-to-dd-mmm-yyyy/16915/9 "2015-05-23T14:52:52Z")

</div>

Fine british beer or coffee donated to Florian depot. Again, much obliged and flawless work - thank you 🙂

---

<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:25pm UTC](https://community.mp3tag.de/t/convert-filename-with-yyyy-mm-dd-to-dd-mmm-yyyy/16915/10 "2026-02-09T12:25:41Z")

</div>

Closed on February 9, 2026, 12:25pm UTC


