Hello,
Long time user (and donator!) of MP3tag here.
I have been using the following to rename files based on tags for a number of years and I have noticed recently that some files this is no longer working. I use this for DJ compilations and various artist albums
"$ifgreater(%totaldiscs%,1,$num(%discnumber%,1)-,)$num(%track%,2) ~ %artist% ~ %title%"
This has always prefixed the disc number to the file name if there is more than one disc.
e.g.
1-01 ~ UnPlug ~ Time Unlimited (Ortus Airgap mix)
Can someone tell me if the syntax is correct?
Thanks!
The syntax is OK for files that have a field called TOTALDISCS.
You would have to check those files where it does not work whether the field is there.
Thanks for the info and quick reply, I will investigate for the files I have had issues with.
Is the method I am using to do this (prefixing disc number for multi-disc albums) the best way? Or is there a better method?
The "best way" is the one that gives you the result wanted.
If you are happy with
1-01 ~ UnPlug ~ Time Unlimited (Ortus Airgap mix)
then it is the best way for you. 
If you show us a filename which does not work as expected, we can help you find the reason. It could also be a missing DISCNUMBER. Just show us a screenshot after pressing Alt+T on such a "not working" song.
I would assume that any decent player does not rely on the filename but uses the tag data to sort, group and filter audio tracks.
The method will only become a good one if you stringently fill the field DISCNUMBER and (if appropriate) TOTALDISCS.
The implicit "no disc number means there is only 1" is not good enough as it does not help to distinguish the treated files from the yet untreated ones.
Ok, i have it all figured out!
I had set this up some years ago and I guess not really thought too much about it... I was unaware of the "TOTALDISCS" tag and I imagined that the rename schema was looking for a disc number greater than 1 for any given album.
I can see that of course is not what it is doing now I've had your help (and some coffee!). I have tested the problematic files and of course they were missing the TOTALDISCS tag data. 
I like to prefix the disc number just to help sorting/managing files in windows.
Thanks again for your help and Merry Christmas!