Discnumber padding and export

Hi ,

I am using this script

Begin Actionsgroup Set DISCNUMBER n.3
Action #1
Actiontype 5: Format tag field
Formatstring: $regexp(%_directory%,^.÷CD÷0(\d+).*$,$1)/42
Note: Replace one special character ÷ with one space character.
End Actionsgroup Set DISCNUMBER n.42 (1 Action)


in my discnumber field i have 10/42 to 42/42 which are fine. However how can i pad out 1/42 to 9/42 so that they read 01/42 to 09/42?

When i export file files and rename folder the discnumber appears without the / so that 1/42 is 142 and 42/42 is 4242. Is there any way show a hypen "-" as a separator?
%albumartist% - [%year% - ]%album% (%discnumber%) '['%_total% $upper(%_extension%)$if($eql(%_extension%,'flac'),, %_bitrate%)$if($grtr(%_covers%,0),, No Cover) %genre%']'



  1. $regexp(%discnumber%,^(\d)/,0$1/)

  2. $replace(%discnumber%,/,-)

Thank you