Help with tag -> filename scripting

I want the following:

  1. 1 leading 0 if total tracks for album/folder < 100

2: 2 leading 0s if total tracks for album/foilder >= 100

how can I do it? Thank you.

Try the auto-numbering wizard Ctrl-K and tick "Leading zeros".

For more detailed help you would have to show us the tag data and the format string that you use in Convert>Tag-Filename.