Disc Number not a Number

Am more than likely over thinking this which is why I am unable to sort it out on my own...

I am able to create Multi Disc folders without issue and Format Disc Numbers to 2 digits as required however here is the issue I now face.

I have a number of Box sets where secondary discs are in a word format or are numbered and worded...Examples:

CD1: Main Album
CD2: Remix Album
Bonus Disc
XXL Download

and

5'' Vinyl
Download Cascade 1 (Wüterich Beatel)
Download Cascade 2 (Wüterich Floating)
Download Cascade 3 (Wüterich Instrumental)

I would like to be able to create/maintain these folders and their respective names but how do I do this? Am I needing to use a user defined field and than do something like:

Format Value: _Filename>Disc %discnumber%%USERDEFINED FIELD%\%_filename_ext%

or is there a way to check to see:

if %discnumber% is a only a number than format $num(%discnumber%,2) or
if it is a number and a word than do the same formatting whilst maintaining the word value
if it is simply a word maintain that as the field

Then create subsequent disc folders?

I recall seeing something similar to this on the forum recently but do not remember what the Topic Title was and am unable to locate it now...

Any assistance would be appreciated.

If I see this correctly, then there is either a number or a string in the field DISCNUMBER.
(IMHO it does not make sense to add padding zeros to a string like "Download Cascade 1").

So what you can do: check if DISCNUMBER produces a value greater than 0 which means, it is actually a number or you get the zero, when it starts with a string.

$ifgreater($num(%discnumber%,),0,$num(%discnumber%,2),%discnumber%)
the fancy bits like "CD" can be entered in the part of $num(%discnumber%,2)

Thank you for your insight...I do not pad strings with numbers...I simply prefer things like Disc 01,02,03 Etc...same with track numbers ...will try out your suggestion and see if I get the desired result...

Sorry this seems to solve the sorting out of the number / name issue but how do I use it to create folders ...am I using it with Format Value: _Filename>$ifgreater($num(%discnumber%,),0,$num(%discnumber%,2),Disc %discnumber%)\%_filename_ext%

or simply Format Value:DiscNumber>$ifgreater($num(%discnumber%,),0,$num(%discnumber%,2),%discnumber%) than using the Format Value: _Filename>Disc %discnumber%\%_filename_ext%

Could be that I just woke up and am having a brain hernia...but...

As I said:
The original statement (of mine)
$ifgreater($num(%discnumber%,),0,$num(%discnumber%,2),%discnumber%)
appended with something like "CD" like this:
$ifgreater($num(%discnumber%,),0,CD $num(%discnumber%,2),%discnumber%)

The simple %discnumber% at the end will always be used if you have a string instead of a number in DISCNUMBER.

Perhaps you have to check first if the DISCNUMBER is actually present. Either with a filter (easiest way) or with a more complicated, stacked $ifgreater() statement:
$ifgreater($len(%discnumber%),0,$ifgreater($num(%discnumber%,),0,CD $num(%discnumber%,2),%discnumber%),)

Thank you so much for this, I was able to manipulate it slightly to get the almost desired result....
So what I have done now is:

Check to see if Discnumber is actually a number or a word than create sub directories \ Disc numbers folders from there...

Format value: Filename>
$ifgreater(%discnumber%,0,Disc $num(%discnumber%,2)\%_filename_ext%,%discnumber%\%_filename_ext%)

Still trying to get the following to work though...

Disc 1 : Main Album
Disc 2 : Remix Album

Was able to work this one step further and now it will check it the Disc Number field has a value at all (in my case it does not for single albums) and if it does than does its routine above creating the sub folders (including any that are named not numbered) and if it is blank simply renames the files the track number - track name.

Format value: Filename>
$ifgreater($len(%discnumber%),0,$ifgreater(%discnumber%,0,Disc $num(%discnumber%,2)\%_filename_ext%,%discnumber%\%_filename_ext%),$num(%track%,2) - %title%)

This is all after re-reading your earlier comments that I couldn't seem to grasp the 1st time...pays to go back and re-evaluate past conversations obviously.

Thanks again...

I have been able to manipulate some ideas further but would appreciate any assistance....with regards to a similar issue looking at https://www.discogs.com/wumpscut-Wreath-Of-...release/5533104 as an example.... where I already have this set up the way I want it and simply want to move the whole directory over to the new one whilst maintaining the structure so:

If _directory is number and word for disc than user defined filed is word
move directory to new location and format again multidisc as required however put back in the user defined field

something like

Disc $num(%discnumber%,2)\%_filename_ext%,%discnumber%%userdefined%\%_filename_ext%

So I have come up with the following work around using the above idea...and it works somewhat..
Format Value LABEL>%_directory%
Replace with regular expression
%label%
^(CD|DISC|DISK)\s*[0-9]+\s+
replaced with " "

Disc $num(%discnumber%,2)\%_filename_ext%,%discnumber%%label%\%_filename_ext%

I would like it to not process anything if the folder does not have any words following the (CD|DISC|DISK)\s*[0-9]+\s+ however this pulls any folder information such in this case it pulls any wording in the Folder...which isn't quite what I had in mind...looking to pull only whatever follows (CD|DISC|DISK)\s*[0-9]+\s+ and if nothing than do nothing..

Or if there is a way to simply move the whole folder pulling the existing structure with it to the new folder (which I can't seem to get just right) was thinking something like:

$validate($replace(G:\Music'['$left(%albumartist%,1)']'\%albumartist%\%album% $num(%year%,4), , ), %mediatype%,'_')%_directory%

So after looking at the above for a while seperate from the program itself, I have concluded that I had it more or less correct for movement whilst maintaining structure...just missed a "" and it s/b

$validate($replace(G:\Music'['$left(%albumartist%,1)']'\%albumartist%\%album% $num(%year%,4), , ), %mediatype%,'_')</b>%_directory%

Maybe I should start pulling my ones that I am trying to sort out into notepad or something so that I can look at it separate from the data set and I might be able to better figure it out...