Setting tags from JSON file - null for remove

Started by sebutzu, January 03, 2025, 04:38:22 PM

Previous topic - Next topic

sebutzu

Is it possible to treat a null value for a TAG in a JSON file (using -j=JSONFILE) as remove tag? From JSON point of view it would make sense to do this. Otherwise if we need to remove tags, we need to set the value to "-" (using -f), which is a bit strange to do for tags that are numbers...to set a string as a value.
If it is not possible, could we have a flag in the future to treat JSON null as a remove?
Thanks a lot!

Phil Harvey

You can delete a tag with a value of an empty string in the JSON file by using the -f option and setting -api missingtagvalue^=

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).