Author Topic: An embarrassingly basic question on overwriting metadata, or not!  (Read 293 times)

AlanX

  • Jr. Member
  • **
  • Posts: 13
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

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2516
Re: An embarrassingly basic question on overwriting metadata, or not!
« Reply #1 on: April 25, 2019, 11:39:45 AM »
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

AlanX

  • Jr. Member
  • **
  • Posts: 13
Re: An embarrassingly basic question on overwriting metadata, or not!
« Reply #2 on: April 25, 2019, 12:53:37 PM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14748
    • ExifTool Home Page
Re: An embarrassingly basic question on overwriting metadata, or not!
« Reply #3 on: April 25, 2019, 12:58:20 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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).