Clearing total disk and total track number

Greetings,

I’m a new user and I’m still trying to learn about scripting, tagging, and file naming.

I’ve got my file naming script working pretty well so far, I just want to accomplish a couple more things.

Do any of you know how can I make it so that the total track and total disk number fields are cleared and left empty? I want to keep the track numbers of course, and I only want the disk number field filled if there is more than 1 disk.

Try:

$set(discnumber,$if($gt(%totaldiscs%,1),%discnumber%,))
$unset(totaltracks)
$unset(totaldiscs)
1 Like

Thanks for your help outsidecontext. Now I want to have the track numbers for music files from multiple disk albums tagged according to disc number-tracknumber, without separate folders for each disk. For example:

2-01 Boards of Canada - An Eagle in Your Mind.mp3

Do you know how to accomplish this?

Use something like this in your naming script where you want to have the disc and track number displayed:

$if($gt(%totaldiscs%,1),%discnumber%-,)$num(%tracknumber%,2)

This will format the track number to have 2 digits (so it will be 01, 02, …, 10, 11, …) and display the discnumber only if there is more than one disc. If you want to always display the discnumber it’s simpler:

%discnumber%-$num(%tracknumber%,2)
1 Like

That’s perfect. Thanks again.

Hello again, so I’m still having difficulty accomplishing this. Here is the script I’m working with at the moment. What do I need to add or change to accomplish the disc and track naming in my audio files?

$set(discnumber,$if($gt(%totaldiscs%,1),%discnumber%,))

%albumartist%/$if(%date%,$left(%date%,4)) - %album%/$if($gt(%totaldiscs%,1),%discnumber%-,)$num(%tracknumber%,2) - %title%

The $set(discnumber,$if($gt(%totaldiscs%,1),%discnumber%,)) must be set in Options > Scripting and not in the file naming.

If I get this right your only problem right now is the tags themselves, the file naming is ok, right?

1 Like

Actually, it appears the opposite. Tags are correct, I just can’t seem to get the file names to show the disk number and track numbers the way I want, as such 1-11 - … This should be for albums with two or more only. I’m not getting the disk numbers in the file names at all.