Begin Actionsgroup Set DISCNUMBER n.3
Action #1
Actiontype 5: Format tag field
Field: DISCNUMBER
Formatstring: $regexp(%_directory%,^.÷CD÷0(\d+).*$,$1)/3
Note: Replace one special character ÷ with one space character.
End Actionsgroup Set DISCNUMBER n.3 (1 Action)
Thats the one !- Searched for such a long time for this, it works a treat.
I am not aware of an automatic procedure how to detect upcoming CDn folders of unknown count.
You might be able to write an export script, which counts the folders and creates a text file, which in a following step can create via "text-file to tag" a DISCTOTAL tag field for each track file within an album. Then the DISTOTAL tag field can be used for all other automating purposes.
Read Mp3tag help manual, sections Export and Scripting functions and understand how the functions $loop() and $_counter() and $_max_counter() work.
Because I do not have a ready made export script, I do not know if this approach will work in such a manner to satisfy your needs.
There has been also reported a "half automatical way" to set the DISCTOTAL number.
At first set the filter to isolate the album to work on, which contains multiple CDs, then run an action "Format value" against the selected files to set the tag field DISCTOTAL to the value of the involved number of CDs.
You may prepare some actions, with each defined to set two, three or more CDs, to shorten the process when repeating.