combine commands

Started by instigator, November 29, 2010, 09:54:49 AM

Previous topic - Next topic

instigator

How can I join this two commands into one single line?
exiftool -IPTC:keywords+={$keyword} -overwrite_original prueba.jpg  
exiftool "-Exif:copyright<${keywords}" -overwrite_original prueba.jpg
so exiftool don't run two times.

Phil Harvey

exiftool -IPTC:keywords+={$keyword} "-Exif:copyright<${keywords}, {$keyword}" -overwrite_original prueba.jpg

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

instigator

Thanks.
And other question
Can I add a keyword(example: "word") only if "word" is not already a keyword?

Phil Harvey

Quote from: instigator on November 29, 2010, 10:24:52 AM
Can I add a keyword(example: "word") only if "word" is not already a keyword?

Yes.  There is a not-very-intuitive yet obvious-by-hindsight technique for doing this which is mentioned in FAQ number 17.

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