Simple Filename to Tag Problem

Hello everyone,

Here is my filename:
101 - Sonata No. 1 in F minor, Op. 6, I. Allegro con fuocoso.mp3

I'm trying to get the following into the tag:
Disc number: 1
Track: 01
Title: Sonata No. 1 in F minor, Op. 6, I. Allegro con fuocoso

But none of the following format strings work:
%discnumber%$num(%track%,2) - %title%
$num(%discnumber%,1)$num(%track%,2) - %title%

What am I doing wrong? Please advise.

-Nathan

Try to do it in some more steps.
First, use the converter filename - tag and put the complete first number into the tag TRACK, so that it contains e.g. 101
The create 2 actions of the type "format tag field", one to format DISCNUMBER with the formatstring:
$div(%track%,100)
This gives you the result of the division as an integer, in this case "1".
Then the same type for TRACK:
$mod(%track%,100)
This gives you the remainder of the division of 101 by 100.
These two actions in one action group work for all joint disc/tracknumbers up to 999, that is 9 discs with 99 tracks each.

Thanks for your suggestion, ohrenkino. Since it seems like one has to resort to roundabout methods, I ended up using regex to solve the problem:

Parse out disc number with the following _FILENAME action:
(\d)(\d+) - (.+) --> $1 - $2 - $3

Filename to tag:
%discnumber% - %track% - %title%

Revert filename changes with the following action:
(\d) - (\d+) - (.+) --> $1$2 - $3

Please check this statement again, it should be possible to address more than 9 discs.

DD.20110727.0837.CEST

You can use this ....

Begin Action Group Test_2011#20110727.TagFieldImport

Action #1
Actiontype 7: Import tag fields (guess values)
Source format:

$div($num(%_filename%,1),100)' - '$num($mod($num(%_filename%,1),100),2)$trimLeft(%_filename%,'0123456789')

Guessing pattern: %DISCNUMBER%÷-÷%TRACK%÷-÷%TITLE%

Note: Replace each special ÷ character with one space character.
End Action Group Test_2011#20110727.TagFieldImport (1 Action)

From:
_FILENAME = 101 - Sonata No. 1 in F minor, Op. 6, I. Allegro con fuocoso.mp3
To:
DISCNUMBER = 1
TRACK = 01
TITLE = Sonata No. 1 in F minor, Op. 6, I. Allegro con fuocoso

DD.20110727.0900.CEST