Check track number for NNN/NNN, NN/NN and N/N and change to N

Could someone please help me produce a regex for this so I can be run as part of a combination of scripts rather than having to use the numbering wizard?

Use an action of the type "Format value" for TRACK
Format string: $num(%track%,1)

1 Like

Thanks

Also, if I want two digits:

Use an action of the type "Format value" for TRACK
Format string: $num(%track%,2)

True to a certain extent:
$num(%track%,1) means that no padding is applied. So if you have a track number "10", then this number remains "10" and is not cut to just 1 digit (be it 1 or 0). The same is true for 100 and following.

I've had problems in the past with playlists with only one digit, learned my lesson and now I prefer to go down this route. I can see from what you are saying that if I had a folder with more than 99 tracks, I am going to have problems?

No, I don't see any problems. The $num() function converts strings to numbers and adds zeros for padding, if set so. Nothing more.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.