Add "Cd #" to "%ALBUM%" for albums with multiple CDs

I asked about this before and it worked but now for some reason this doesnt return the CD # to add to the ALBUM tag...

Filter: "%_filename%" MATCHES "^(.+?) - (.+?) - (.+?)$" AND "%_directory%" MATCHES "^CD\s*\d+$"

Converter: Filename - Tag
... or...
Action: Guess values
Source format: %_parent_directory%''%_directory%''%_filename%
Guessing pattern: %ALBUM%\CD %DISCNUMBER%\%TRACK% - %ARTIST% - %TITLE%

Action: Format value
Field: ALBUM
Formatstring: %ALBUM%' CD '%DISCNUMBER%

i would like to add "CD 1" or "CD 2" to the album name in the mp3 ID3 tag so itunes treats them as CD1 and CD2 instead of one big album... the album is in a folder name "(YEAR) ALBUM NAME" with sub directory "(YEAR) ALBUM NAME\Cd 1" how can i add the CD # to the album name any help thanks ive racked my brain trying to figure this out nothing i try works...

Where are all of the single quotes coming from in the first action's Source Format and in the second action's Format String?

These are format strings, following the basically correct syntax of the Mp3tag scripting language!


I have no idea what any of that stuff does I asked a question before and that's what DD told me to do I copy and pasted exactly what he told me to do cept it doesn't work...? any ideas I'm
sorry if I'm not explaining it well enough

is there a way to just add the text "CD 1" or 2 to the end of the album tag?? I can use the filter to find only the cd 1s and 2s then Just apply to all them?

I could possibly see how it might be necessary in the Source Format of the Guess Value action, although I would think that Mp3tag treats the backslash to be a directory delimiter, so I'm doubtful.

I see no reason to use the quotes in the Format String of the second action.

Relating to your topic ...

Because you have already learned to use the converter, you have tagged the tag-field DISCNUMBER with the CD number and the tag-field ALBUM with the album name, from data given by the folderpath and the file name, now you only need some knowledge about concatenating the discnumber to the existing album name.
See FAQ area:
Write the tag-field ...
... using the format string ...


what I don't understand is how i can get this....

ALBUM = "album name" cd 1 or 2
YEAR = 2012
TRACK = 01
ARTIST = led zep
SONG = over the hills


example path c:\music\led zeppelin(2012) greatest hits\cd 1\01 - led zeppelin - over the hills.mp3

I understand how to get the track, title, and song all from the filename that's easy but how can I get the year just from inside the () brackets in the albums folder name also if there is a sub directory of cd 1 or cd 2 how can I add that to the end of the album tag in the mp3???

so the songs id3 tag for album is ALBUM = "Greatest Hits Cd 1" instead of just "Greatest Hits" for both cd 1 and cd 2???

The "backslash ... a directory delimiter" ??? Huhh?
Yes, the backslash is a text character, often used as the delimiter between the parts of a path string, just as un/-important as a dot or a comma.
Mp3tag has a badly loose syntax, and someone can write format strings and export scripts without respecting of rules.
This freedom in coding is Mp3tag's big problem, because nobody knows for sure what is right and what is wrong at this place or at the other place in Mp3tag.
Most of the uncertainties of Mp3tag users are due to not knowing exactly what is right and what works in what case.

JJ Johnson, you should not put into question what is common practice for many years, at least to me.
Where strings are allowed, so write error free correct string syntax.
Enclose literals in single apostrophes, where applicable.
Use an editor with syntax coloring, and you see what is right and what will probably lead to problems.