# Delimit a Date Field in File Name

**URL:** https://community.mp3tag.de/t/delimit-a-date-field-in-file-name/68840
**Category:** Support
**Created:** [June 12, 2025, 7:53pm UTC](https://community.mp3tag.de/t/delimit-a-date-field-in-file-name/68840 "2025-06-12T19:53:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cmsylvester](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/e480ec/32.png) [@cmsylvester](https://community.mp3tag.de/u/cmsylvester)
#### Post date: [June 12, 2025, 7:53pm UTC](https://community.mp3tag.de/t/delimit-a-date-field-in-file-name/68840/1 "2025-06-12T19:53:04Z")

</div>

I have a collection of more than 50,000 Old Time Radio Shows that are wildly inconsistent with file names. The only convention seems to be that most collectors have file names that are ordered as follows Artist – Date – Title. The challenge is the files name can vary wildly as in the following examples:

**INITIAL FILENAMES**

The Adventures Of Sam Spade, Detective7-11-48The Wheel Of Life Caper

The Screen Guild Players 1945-01-01Mr. And Mrs. Smith W Preston Foster & Louise Allbritton

The-Abbott-and-Costello-Show-19470227-Teaching-Marilyn-Maxwell-to-Drive

Whistler 19480310 Return Engagement

X Minus One 1956 10 24 Pictures Don’t Lie

**VALUES I WANT DELIMITED FROM ABOVE FILE NAMES:**

7-11-48

1945-01-01

19470227

19480310

1956 10 24

**DESIRED END RESULT**

The Adventures Of Sam Spade, Detective\_7-11-48\_The Wheel Of Life Caper

The Screen Guild Players \_1945-01-01\_Mr. And Mrs. Smith

The-Abbott-and-Costello-Show-_19470227_-Teaching-Marilyn-Maxwell-to-Drive

Whistler _19480310_ Return Engagement

X Minus One _1956 10 24_ Pictures Don’t Lie

Considering all of the variables I might encounter, the only way I can see doing this is if I can parse the filename and delimit the date so I can import the FILENAME to the appropriate fields

So far I have been manually delimiting the date with \_ before and after. I would like to automate this due to the large file count. I can manipulate the variety of date formats with actions, so the issue is separating the date in the file name, then re-writing it when all the fields are correct (there are multiple actions I created to account for other inconsistencies in the file name).

What I think I will need is to parse the file name:

- Find the first numeric value
- Continue to parse until I find the last numeric value (there may be spaces or “-“ between the numeric values.
- Delimit the date data in the file name.

Is it possible to do this? I know there may be possible anomalies to consider including the TITLE beginning with a numeric value as well, but I can live with that and manually make needed corrections.

I am extremely impressed with the knowledge in this community and the power of MP3Tag.

Thank you for any help I can get.

Chuck Sylvester

---

<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: [June 12, 2025, 8:01pm UTC](https://community.mp3tag.de/t/delimit-a-date-field-in-file-name/68840/2 "2025-06-12T20:01:10Z")

</div>

Try Convert\>Tag-Filename  
Format string: `$regexp(%_filename%,(.*?)(\d+.*\d+)(.*),$1_$2_$3)`

---

<div class="post-metadata">

### Author: ![cmsylvester](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/e480ec/32.png) [@cmsylvester](https://community.mp3tag.de/u/cmsylvester)
#### Post date: [June 12, 2025, 9:06pm UTC](https://community.mp3tag.de/t/delimit-a-date-field-in-file-name/68840/3 "2025-06-12T21:06:55Z")

</div>

THANK YOU! THANK YOU! THANK YOU!  
I am testing this on a few files and it's working well. You have just saved me tons of hours of effort. did I say 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: [July 12, 2025, 9:07pm UTC](https://community.mp3tag.de/t/delimit-a-date-field-in-file-name/68840/4 "2025-07-12T21:07:19Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
