How to unset a literal tag

My first script attempt was $set(%artist%,Barbie & the Kens), which resulted in the files each having a field named the value of %artist% with an actual value of Barbie & the Kens for every artist. So a Pretenders song has a tag Pretenders with a value Barbie & the Kens. I tried $unset(%artist%) but that doesn’t remove the value. How do I specify the field I want for several files? Thanks

If you just want to replace the value you set with the value in the database, you should be able to get rid of the script and it will fix itself.

The files now each have a unique tag with a value of Barbie & the Kens.
song - Changes
artist - Bowie

now has
song - Changes
artist - Bowie
Bowie - Barbie & the Kens

Oh, I see. I guess I would have tried the same thing you did. If you could set the tag that way, you ought to be able to unset it. Odd.

I guess your issue is that $unset won’t delete tags. It just unsets the values you want to write to it. To actually delete the tags from the files use $delete. So to fix your case and get rid of the tag which are named after the artist try $delete(%artist%).

In general the first parameter to $get, $set, $unset and $delete is the name of the variable. So use $set(artist,something) and $unset(artist) to modify the artist tag.

The %...% notation is short for $get. If you write $set(%artist%,something) this is the same as $set($get(artist),something).


Thanks! That works perfectly.