For multiple disc albums, such as box sets, I usually name the individual discs, as an album sub-folder, this way -- but only when each disc does not have its own specific subtitle:
CD1
CD2
CD3
..etc.
Sometimes, when the name/title of the disc, as sub-folder, is known, I will add it so that the sub-folder title looks like this:
CD1. Title
CD2. Title
CD3. Title
...etc.
Mostly, the first example applies.
I wish to derive the Field: DISCNUMBER, from the folder/directory by means of a suitable script. No leading zeroes are required. However, it will be nice to see an optional script, which provides for leading zeroes in the disc number as well.
From what I have learned so far, I was able to construct a suitable Action Group, which were successful, but I am certain there is a much better, more efficient way to trim the two first two characters, "CD", so only the numerical character is displayed. Furthermore, I do not know how to construct a script to apply whenever I have to derive the disc number from the second set of examples given above.
Could you please advise me?
Format Value: DISCNUMBER
Format String: %_directory%
Then, Replace with Regular Expression in:
Field: DISCNUMBER
Regular Expression: right(%discnumber%,2)
Replace matches with: Blank
The aforementioned failed, so I tried this Action Group, which was successful:
Format Value: DISCNUMBER
Format String: %_directory%
Replace Field: DISCNUMBER
Original: CD
x with case sensitive comparison enabled