I want to copy tag information between files.
The command I use is:
"C:\Program Files\Exiftool\exiftool.exe" -m -@ "D:\Temp\Exiftool\Exif_terugzetten.args" -TagsFromFile "D:\Temp\Exiftool\DIV_20030720_002-LR-na GPS copy.jpg" "D:\Temp\Exiftool\DIV_20030720_002-org.jpg" >"copylog.txt"
The arg file contains:
-EXIF:DateTimeOriginal < EXIF:DateTimeOriginal
-EXIF:CreateDate < EXIF:CreateDate
-EXIF:ModifyDate < EXIF:ModifyDate
-EXIF:TimeZoneOffset < EXIF:TimeZoneOffset
-EXIF:GPSLatitude < EXIF:GPSLatitude
-EXIF:GPSLongitude < EXIF:GPSLongitude
-EXIF:GPSLatitudeRef < EXIF:GPSLatitudeRef
-EXIF:GPSLongitudeRef < EXIF:GPSLongitudeRef
-EXIF:GPSMapDatum < EXIF:GPSMapDatum
-EXIF:GPSVersionID < EXIF:GPSVersionID
-EXIF:GPSAltitude < EXIF:GPSAltitude
-EXIF:GPSAltitudeRef < EXIF:GPSAltitudeRef
-EXIF:GPSDateStamp < EXIF:GPSDateStamp
-EXIF:GPSTimeStamp < EXIF:GPSTimeStamp
-IPTC:CodedCharacterSet < IPTC:CodedCharacterSet
-IPTC:Country-PrimaryLocationCode < IPTC:Country-PrimaryLocationCode
-IPTC:Country-PrimaryLocationName < IPTC:Country-PrimaryLocationName
-IPTC:Province-State < IPTC:Province-State
-IPTC:City < IPTC:City
-IPTC:Sub-Location < IPTC:Sub-Location
#-HierarchicalSubject < HierarchicalSubject
This works fine, but I also get XMP tags, see the listing I made with ExifTool Gui.
Question: why do I get also the XMP section?
---- XMP ----
XMPToolkit : Image::ExifTool 8.45
CountryCode : DEU
Location : Dörfl
Subject : <<Waar - Plaatsen, <<Wanneer - Gebeurtenis, Konigssee, Meren, Oostenrijk, Vakantie
ComponentsConfiguration : Y, Cb, Cr, -
CompressedBitsPerPixel : 2
DateTimeDigitized : 2003:07:20 10:40:38+02:00
FlashFired : False
FlashFunction : False
FlashMode : Unknown
FlashRedEyeMode : False
FlashReturn : No return detection
GPSDateTime : 2003:07:20 08:40:38Z
HierarchicalSubject : <<Waar - Plaatsen|Oostenrijk|Meren|Konigssee, <<Wanneer - Gebeurtenis|Vakantie
Country : Germany
LegacyIPTCDigest : AD6F17F81E12D11CA2685F266536BB77
State : Bayern
BitsPerSample : 8
Compression : JPEG (old-style)
ImageHeight : 960
ImageWidth : 1280
YCbCrPositioning : Co-sited
YCbCrSubSampling : YCbCr4:2:2 (2 1)
MetadataDate : 2011:03:13 15:23:25.718-01:00
Marked : True
RawFileName : DIV_20030720_002.jpg
The problem is that you are copying tags from 2 files. The tag names must come after the corresponding -tagsfromfile option on the command line. Since there is no -tagsfromfile before your -@ option, the -DSTTAG<SRCTAG syntax will copy all your tags from the target file. Then since there are no tags after the -tagsfromfile option, all tags are copied from this file.
The solution is simply to put the -@ after -tagsfromfile.
Also, you can simplify your -@ argfile because you don't need to specify the destination tag if the source tag is the same. This will do the same thing:
-EXIF:DateTimeOriginal
-EXIF:CreateDate
-EXIF:ModifyDate
-EXIF:TimeZoneOffset
-EXIF:GPSLatitude
-EXIF:GPSLongitude
-EXIF:GPSLatitudeRef
-EXIF:GPSLongitudeRef
-EXIF:GPSMapDatum
-EXIF:GPSVersionID
-EXIF:GPSAltitude
-EXIF:GPSAltitudeRef
-EXIF:GPSDateStamp
-EXIF:GPSTimeStamp
-IPTC:CodedCharacterSet
-IPTC:Country-PrimaryLocationCode
-IPTC:Country-PrimaryLocationName
-IPTC:Province-State
-IPTC:City
-IPTC:Sub-Location
- Phil