An embarrassingly basic question on overwriting metadata, or not!

Started by AlanX, April 25, 2019, 11:21:54 AM

Previous topic - Next topic

AlanX

As an infrequent user, and being forgetful in my old age, I'd appreciate help on one simple question.
I want to write the contents of one metadata field to another (in the same image file). I can't find the option switches for "always overwrite what's there", "don't write if there's data already there", and "append my data to what's there". Can someone point me in the right direction? I'm lost in the mountain of support documentation and don't know where to look! Thanks.

StarGeek

* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

AlanX

Well, I think I've tried every combination of w, c, and g, without getting consistent results:

C:\ExifTool\exiftool -wm c "-Caption-Abstract< by $Creator" *.jpg
C:\ExifTool\exiftool -wm c "-XMP:Rights<&copy; $Creator" -E *.jpg -k

My first aim to write to these fields and overwrite anything that or may not be there already.

Phil Harvey

Quote from: AlanX on April 25, 2019, 12:53:37 PM
My first aim to write to these fields and overwrite anything that or may not be there already.

You mean create them if they don't exist, or overwrite previous values if they already existed?  If so, that is the default behaviour, and the -wm option isn't necessary.

The -wm c option that you used will only write them if they didn't exist previously, but only if other IPTC or XMP metadata already existed in the file (it won't create a new IPTC or XMP group without "g").

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