Write tag only if does'nt exist or if empty

Started by fstchr, January 03, 2025, 06:10:26 AM

Previous topic - Next topic

fstchr

Hi
Sorry for my bad english !
I have a lot of pictures and I want to add tags automatically (for a DIR for example). For example, the  TAG's are -XMP:Artist,XMP:OwnerName and XMP:CopyrightOwnerName. In my case, I have 14 tags to change
But I want not change a TAG when its exists and is not NULL.
How can I do with a single exiftool command ? (if many, it's means a long time to execute).
Thanks in advance !

Phil Harvey

The -wm option is for cases like this.  Add -wm cg to your command to only create new tags and not change existing ones.

However, this won't update a tag that exists but is empty.  If this is a problem then we may need another command to deal with these.

- 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 ($).

fstchr