Do the tagger script allow iterating through the entire folder and compare tag content?

Let’s say I want to delete the disc number tag for single CD albums and only keep the disc number for multi-CD albums. Can I do that? Or are the foreach and while loops only executed on individual files and tags in those files individually?

1 Like

I would say, this will do that:
$if($lt(%totaldiscs%,2),$delete(discnumber),)

PS: $eq(%totaldiscs%,1) would be better - it does the same but is more self-explanatory

1 Like

Hi, I actually tried that but it will also delete all the tags from CD 1 in a multi CD set, while keeping the tags for CDs 2,3 etc. I need something that says “Don’t delete CD 1 if the is a CD 2”.

The above does that, it only deletes the disc number tag if there is only one disc. As soon as there is more than one disc the field is left alone.

Maybe you can show a specific example and the scripts you currently have.

2 Likes

Oh darn! I was doing
$if($lt(%discnumber%,2),$delete(discnumber)).
Of course totaldiscs works the way I want.
Thanks both of you!

2 Likes

Ah, yes. That of course cleared it then for the first disc. Glad you sorted it out :slight_smile: