Conditional tag to file name depending on disctotal

Hi, I would like the tag to file name button to do different things depending on if the album has more than one disc.

if disctotal>1 use:
%discnumber%-$num(%track%,2). %title%

else use:
$num(%track%,2). %title%

I just don't know how to put it in code.

For Mp3 files I think such an expression could work as a replacement for

$ifgreater($regexp(%discnumber%,'^\d+\/',),1,$num(%discnumber%,1)-,)

I think the first %discnumber% should be %disctotal%

e.g.
$ifgreater($regexp(%disctotal%,'^\d+\/',),1,$num(%discnumber%,1)-,)

So putting both together:
$ifgreater($regexp(%disctotal%,'^\d+\/',),1,$num(%discnumber%,1)-,)$num(%track%,2). %title%

That seems to work great with the quick tests I did, thank you!

I'm using FLACs but I don't think it makes a difference?

I think it does because mp3s have the disc number and the totals in just one field that gets addressed the way I wrote it.