News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Trouble with command syntax when copying tags

Started by 3design, December 06, 2014, 01:10:07 PM

Previous topic - Next topic

3design

I'm trying to copy a specific set of tags from a list of source images to a list of destination images in Win7. I've used regex to create a batch file to run the entire sequence, but am getting an error when it runs. This is a sample line from the batch file:

exiftool -P -tagsfromfile "E:\src.tif" 'EXIF:Artist>EXIF:Artist' 'EXIF:ImageDescription>EXIF:ImageDescription' 'IPTC:Caption-Abstract>IPTC:Caption-Abstract' 'IPTC:CodedCharacterSet>IPTC:CodedCharacterSet' 'IPTC:CopyrightNotice>IPTC:CopyrightNotice' 'IPTC:Headline>IPTC:Headline' 'IPTC:Keywords>IPTC:Keywords' 'IPTC:ObjectName>IPTC:ObjectName' 'IPTC:Prefs>IPTC:Prefs' 'IPTC:SpecialInstructions>IPTC:SpecialInstructions' 'XMP:CaptionWriter>XMP:CaptionWriter' 'XMP:Creator>XMP:Creator' 'XMP:CreatorWorkEmail>XMP:CreatorWorkEmail' 'XMP:CreatorWorkURL>XMP:CreatorWorkURL' 'XMP:Credit>XMP:Credit' 'XMP:Description>XMP:Description' 'XMP:EditStatus>XMP:EditStatus' 'XMP:Headline>XMP:Headline' 'XMP:Instructions>XMP:Instructions' 'XMP:Marked>XMP:Marked' 'XMP:Prefs>XMP:Prefs' 'XMP:Rating>XMP:Rating' 'XMP:Rights>XMP:Rights' 'XMP:Source>XMP:Source' 'XMP:Subject>XMP:Subject' 'XMP:Title>XMP:Title' 'XMP:UsageTerms>XMP:UsageTerms' 'XMP:WebStatement>XMP:WebStatement' "E:\dest.tif"

When it runs, it gives me the following error:

Error: File not found - 'EXIF:Artist
Error: File not found - 'EXIF:ImageDescription
Error: File not found - 'IPTC:Caption-Abstract
and so on.. listing each of the tags in my batch. I'm not sure what specific portion of my command line is faulty...

StarGeek

You are using single quotes where you need to use double quotes on windows.  You're also missing the minus sign at the beginning of the tags.  So, instead of 'EXIF:Artist>EXIF:Artist', you should be using "-EXIF:Artist>EXIF:Artist"

Also, not something wrong, but it looks like most, if not all, of those tags you can just use the name, you don't need to specifically redirect them.  Instead of "-EXIF:Artist>EXIF:Artist" you could use -EXIF:Artist or even just -Artist. This command should do just as well for you. 
exiftool -P -tagsfromfile "E:\src.tif" -Artist -ImageDescription -Caption-Abstract -CodedCharacterSet -CopyrightNotice -IPTC:Headline -Keywords -ObjectName -IPTC:Prefs -SpecialInstructions -CaptionWriter -Creator -CreatorWorkEmail -CreatorWorkURL -Credit -Description -EditStatus -XMP:Headline -Instructions -Marked -XMP:Prefs -Rating -Rights -Source -Subject -Title -UsageTerms -WebStatement "E:\dest.tif"

The only cases I saw in that command where you would want to explicitly say where the tags go were the Prefs and Headline tags, since they would both only go into IPTC (preferred location) unless there already was an XMP group in the destination file.   
* 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).