Delimit a Date Field in File Name

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

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

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?