I have several thousand MP3 files of various radio shows in which the broadcast date is part of the filename. I would like include this date in the DATE field of the ID3v2.3 tag. The dates are all in in different positions of the filename - some are at the beginning, some in the end and others in the middle of the name. Is it possible to extrapolate those dates and copy them to the DATE field?
Also, how can I accurately change the format from dd.mm.yyyy to yyyy mm dd?
I found a previous topic (Format Date in File Name) from 2008 which discussed this, but I am unable to receive the desired results.
For instance, I created an Action to convert the date using the following regular expression:
Based on the information provided in the thread mention above, I was under the impression it would change the date format from 08.24.1995 to 1995.08.24. However, nothing at all happens when I use that action.
I was using field %date%. All the files that currently have any date entered in that field display the entire date - month, day, year. Not just 4 digits.
Nonetheless, I added dates to the %releasetime% field in a few different files and changed the action/reg exp accordingly to match that field, but the results are just the same. It doesn’t change the format of the date. Would like to at least get that working before moving on to the “Guess values” issue.
The Convert>Tag-Tag works to show the reformatted date in the preview.
However, the other regexp to actually change the dates in the files in question does nothing for me. Regardless if I attempt to use %date% or %releasetime%. The dates in both fields in my test file are precisely 08.24.1995, but they are not reformatted to the desired date format when running the action.
That is good as it shows that there is no syntax error in your local implementation.
You have not yet showed us what kind of action you use for which field.
A “Format value” action assigns a value that is determined by the format string to a named field.
So e.g. to swap the date around in the field DATE, you have to create the action for that field (DATE).
Enter the format string that supplies the correct data, e.g. the one that you have seen that is working.
So an example would be:
Format string: $regexp(%date%,(\d\d).(\d\d).(\d\d\d\d),$3.$1.$2)
Apparently I’m not explaining clearly what I’m trying to do and what I would like to happen.
I have a date field in a particular MP3 file. In this case, it is RELEASETIME and the date is entered in that field as 08.24.1995. I wish to reformat that date to: 1995.08.24.
I have tried using the Action command in a few different ways to make that happen. The first attempt was creating an Action type of “Replace with regular expression”. The two different methods I tried were:
I have now also tried an Action type of “Format value” as per your last reply. The two different methods I have tried for this are:
All of the above did nothing to change the actual format of the date shown in the RELEASETIME field.
And now I’m getting a bit confused myself. I had originally been trying to use the DATE field, but earlier you said it’s limited to 4 digits (even though the version I’m using of MP3TAG allows me to enter the full date of month, day and year and I have 8 digits in my dates: 2 for month, 2 for day and 4 for year. However, in your replies you refer to DATE. So now I’m not sure if I’m supposed to be using DATE or RELEASETIME.
I hope I have explained more clearly now. I just wish there would be something that will actually work to change the formats in the date fields of these files from mm.dd.yyyy to yyyy.mm.dd.
RELEASETIME in its full beauty has the format yyyy.mm.ddTHH:MM:SS
A DATE field really has only four digits like 3112 for the last day in a year.
If you say that
you leave out the dots which makes up for 10 characters in all. But perhaps you meant that.
If you use an action of the type “Replace with regular expression” then you can’t use a format string but you have to enter a regular expression. The function $regexp() is a scripting function that emulates the action. So you had an evaluated regular expression in an action to replace with a regular expression. This will never lead to a reasonable result. I wonder where you entered the $regexp() in that action.
Please show us the contents and name of the field that you want to manipulate,
show us the exact action that you use with all its parameters.
After using that particular Action, a window appears stating:
Formatted tags in 1 of 1 files.
0 of 1 files renamed.
The end result is the RELEASETIME date which remains at: 08.24.1995. So, I don’t know what tag the program is referring to when it states that 1 of 1 tags has been formatted because the only tag I am interested in being formatted stays exactly the same.