More complicated action questions


FileName: Gunsmoke 52-04-26 (001) Billy the Kid

The file name has the track number embed inside always ...three numbers surrounded by (xxx)

I want to extract out the track number and put it in the track field

So this is the Action Steps

(1) Format the Track value with the File Name Value

field: track
format string: %_FILENAME%

(2) I would assume this step is a "Replace with regular expression"

Field: TRACK
Regular Expression: ??
Replace matches with: ??


One will do using the format action:

Action type: Format value
Field: TRACK
Formatstring: $num($regexp(%_filename%,.+?((\d\d\d)).+,$1),2)

You can replace 2 with 1 to have track 1 or if you prefer padding use 2 to have 02 as TRACK


Or you could employ an action of the type "Import value" for %_filename%
Enter as import string: