copy DDSI Number in title to comment field

I have a certain collection of songs :ph34r: where many of the tracks have a 3-7 digit character code (referred to as its DDSI Number) at the end of the Title field.

I would like to copy this code to the comment field of these 2,000+ tracks.

Here is the format of the DDSI Number:
It is always at the end of the title. It has a decimal point with 1 or 2 digits to the left, and typically 1 or 2 characters to the right. However 3 character are not totally uncommon, and very rarely, 4 or more. The smallest value is 2.1 and I think the largest is 24.101b.
The only decimal in the Title field will be in the DDSI number.

Advanced Action request #1:
Could the format of the code have leading place-holder zeroes so that 2.1 = 02.001 in the comment field?

Title = I'm a Tiger 3.97

Comment = DDSI: 03.097

(In the rare instances of more than 3 characters to the right of the decimal, I'd like to just include everything to the right of it.)

Advanced Action request #2:
Some of the tracks have no DDSI code in the Title, would it be possible to find the most recent DDSI number for the comment field + the title in parenthesis.

Title = Dialogue

Result (assuming this track follows "I'm a Tiger 3.97")
Comment = DDSI: 03.097 (Dialogue)

But, unfortunately, the previous track might not have a DDSI number either! There could be 8 or more tracks in a row without the code. All of those tracks would have the same Comment value.

BTW, I would be happy to do action request #1 & #2 separately so they do not need to be combined into one insane action.

Maybe these are just too crazy to request, but I know there are some pretty hard core genious guys out there! :w00t:

Soooooooo grateful for any help!!!!!!!!! Thank you thank you thank you!!!!!


Please, at first describe in detail what is the "DDSI number", because there are several things out there in the world with the name "DDSI".
Then it would be helpful if you could offer a link to a reference web page, where the DDSI code system is layed out, because I am not sure, whether your 'leading zero' attempt would be standard conform or not.
Then I would propose to write this DDSI code string into a separate user-defined tag-field, to make it available for any recombinations, if necessary append it to the tag-field COMMENT too.

Mp3tag does work with tracks, that means on a per file basis.
It cannot look into the tag-fields within a file, what resides in backward or forward direction in the file list.
There might be possibilities to handle such looking back behaviour by tricky usage of the Mp3tag Export language.

And ... here comes the main question ... what did you have tried so far to solve the task by yourself?


I've Got A Feeling that maybe this is just too complex to undertake. But anyway,

It's a unique code given by a book that is a way of cataloging this particular collection of songs & performances.

This code sits at the end of the title and the format of it is: x.y
x = a day of the month (between 2 and 31)
y = a sequential value for each performance during that day. It always starts at 1 for each new day (x), increments by 1 for each file that has music.

Again, I'm looking to append this value into the Comment field with the format xx.yyy (Because the x is a date value, I would like it to have a leading zero so it sorts correctly.)

Well... the main things I have done is to clean up the tags and get them as clean as possible to perform the actions. Then reading thru many posts on this page trying to find something close. But I have not seen the ability to locate a specific character in the %TITLE%.

Ok, to sum it all up. How about if I first sort & break down the steps into multiple actions instead of trying to program some crazy if/then statement:

Song Group 1: Has only one character in the x value (left of the decimal):
Easy step: In the %COMMENT% field, I'll simply add the text to "DDSI: 0"

Song Group 2: Has 2 characters in the x value:
Easy step: In the %COMMENT% field, I'll simply add the text to "DDSI: " (no 0)

Action 1: Finds the decimal in the %TITLE% field for Both Song Groups and appends the 2 characters and a decimal to the end of the %COMMENT% filed.

New sort order --
Song Group A: Has only 1 character in the y value
Action 2: (reuse Action 1) but instead Append a "0" to the end of the %COMMENT% field.

Song Group B: Has 1 or 2 characters in the y value
Run Action 2 again.

Song Group C: All of the tracks that contain a DDSI number.
Run Action 2 again, Appending everything to the right of the decimal point.

Song Group D: all tracks in this collection that do not have the DDSI number in the %TITLE%
Action 3: Append the complete Title to the %COMMENT% field

I wish the MP3 Tag online help file was more detailed. This forum is such a beast to try and find exact answers.

Thanks again for your help. I really, really appreciate it.

The $num function does just that:
$num(3,2) outputs 03
a fairly common use-case is adding leading zeros to TRACK:
$num(%track%,2) creates a list of 01, 02 ..., 09, 10.
Does this solve one part of your problem?

I'm grateful to see that spelled out. I've used the $num function a few times in actions I've seen posted here, but never quite knew what it was doing.

It's probably not going to help here since I've found a workaround to the leading zero issue (simply sorting my collection into groups and adding the 0 in the Comment field).

Bottom line. I'm looking for:

  1. The ability to locate a specific character in the %TITLE% field (i.e. '.')
    Find the 2 characters to the left of it and append those 2 characters with a '.' to the end of the %COMMENT% field.

  2. copy all the characters to the right of the '.' and append to the end of the %COMMENT%.

  3. and for a separate group of tracks, copy the entire $%TITLE% and append to the end of the %COMMENT%.

Sound possible???

I have again to ask because I do not know that book, where collections of songs and performances are writtten down in the format "".
Why does the day number start with the number 2, shouldn't it be the number 1?
What meaning has the letter "b" in this string expression "24.101b"?
What does the abbreviation "DDSI" mean in full text?
What's the point of "DDSI", for what it is worth?


Starts with a 2 because recording started on the 2nd day of January.
The "b" is very rare. It's when the book gives one take number but the audio was split into 2 tracks.

DDSI is short for the book title "Drugs, Divorce, and a Slipping Image" by Doug Sulpy.
Here is a link to the book on Amazon:

Here's another page that explains the DDSI number:

Thank you for the explanation.

To create a tag-field with the name DDSI from the value at the end of the tag-field TITLE use this ...
Action: Format value
Field: DDSI
Format string:

$regexp($regexp(%TITLE%,'^.+?(\d{1,2})\.(\d{1,3})(\D?)$','00$1 000$2 $3'),'0*(\d{2})\s0*(\d{3})\s(\D?)','$1.$2$3')

Title 2.1

Title 24.101b

To append descripting text and the content from the tag-field DDSI to the tag-field COMMENT use this ...
Action: Format value
Format string: %COMMENT%' DDSI: '%DDSI%

To set the tag-field COMMENT with descripting text and with the content from the tag-field DDSI use this ...
Action: Format value
Format string: 'DDSI: '%DDSI%

To remove the DDSI string from the tag-field TITLE use this ...
Action: Format value
Field: TITLE
Format string: $regexp(%TITLE%,'^(.+?)\s*\d{1,2}.\d{1,3}\D?$','$1')

To display files with DDSI number in the tag-field TITLE use this ...
Filter: TITLE MATCHES "^.+?\s*\d{1,2}.\d{1,3}\D?$"


OMG! YES!!! You did it!!!! This is exactly PERFECT! HOLY COW!!!!

I didn't think it could be done in one statement, but you did it. THANK YOU THANK YOU THANK YOU!
And thank you MP3TAG! Brilliant program!!!