Is there an "update only" mode (do not create new tags)?

Started by busywait, January 13, 2017, 05:14:02 PM

Previous topic - Next topic

busywait

Hello,

I'd like to find a command that updates existing tag values only - that is, I want values to be written only if the tag already exists.

For example
exiftool -FNumber=5.6 -FocalLength=200mm file.xmp

I only want the either FNumber or FocalLength to be written if these attributes were already in the .xmp file.

Is this possible?

Thanks in advance for any help you can give,
Steven

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

busywait

It looks perfect, thank you :)

Unfortunately it's not working for me right away - "Ignored superfluous tag name or invalid option"

I have
-wm w
inside an argument file called _interactiveOptions.txt
and I see error
Ignored superfluous tag name or invalid option: -wm w


exiftool.exe -execute -if "-e $filepath" -srcfile "%d%f.xmp" -@ "_sidecarFormats.txt" -common_args -@ "_interactiveOptions.txt" -@ "Lens.txt" "img.ORF"

Ignored superfluous tag name or invalid option: -wm w
======== C:/pics/img.ORF [1/1]
    1 image files updated
Ignored superfluous tag name or invalid option: -wm w
======== C:/pics.xmp [1/1]
    1 image files updated


This is with exiftool 10.36 on Windows 10.

I'll try and simplify my command...

busywait

Although -wm w is ignored in my command file, it worked right away as I wanted it to in the command line.

Thanks for your help!
Steven

StarGeek

In the arg file it should be two lines
-wm
w


One argument per line, not one option per line.
* 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).