exiftool-vendored.exe 12.89.0 → 12.96.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2831 @@
1
+ NAME
2
+ exiftool - Read and write meta information in files
3
+
4
+ RUNNING IN WINDOWS
5
+ Drag and drop files or folders onto the exiftool executable to display
6
+ meta information, or rename to "exiftool.exe" and run from the command
7
+ line to access all exiftool features.
8
+
9
+ This stand-alone Windows version allows simple command-line options to
10
+ be added to the name of the executable (in brackets and separated by
11
+ spaces at the end of the name), providing a mechanism to use options
12
+ when launched via the mouse. For example, changing the executable name
13
+ to "exiftool(-a -u -g1 -w txt).exe" gives a drag-and-drop utility which
14
+ generates sidecar ".txt" files with detailed meta information. As
15
+ shipped, the -k option is added to cause exiftool to pause before
16
+ terminating (keeping the command window open). Options may also be added
17
+ to the "Target" property of a Windows shortcut to the executable.
18
+
19
+ SYNOPSIS
20
+ Reading
21
+ exiftool [*OPTIONS*] [-*TAG*...] [--*TAG*...] *FILE*...
22
+
23
+ Writing
24
+ exiftool [*OPTIONS*] -*TAG*[+-<]=[*VALUE*]... *FILE*...
25
+
26
+ Copying
27
+ exiftool [*OPTIONS*] -tagsFromFile *SRCFILE* [-[*DSTTAG*<]*SRCTAG*...]
28
+ *FILE*...
29
+
30
+ Other
31
+ exiftool [ -ver | -list[w|f|r|wf|g[*NUM*]|d|x|geo] ]
32
+
33
+ For specific examples, see the EXAMPLES sections below.
34
+
35
+ This documentation is displayed if exiftool is run without an input
36
+ *FILE* when one is expected.
37
+
38
+ DESCRIPTION
39
+ A command-line interface to Image::ExifTool, used for reading and
40
+ writing meta information in a variety of file types. *FILE* is one or
41
+ more source file names, directory names, or "-" for the standard input.
42
+ Metadata is read from source files and printed in readable form to the
43
+ console (or written to output text files with -w).
44
+
45
+ To write or delete metadata, tag values are assigned using
46
+ -*TAG*=[*VALUE*], and/or the -geotag, -csv= or -json= options. To copy
47
+ or move metadata, the -tagsFromFile feature is used. By default the
48
+ original files are preserved with "_original" appended to their names --
49
+ be sure to verify that the new files are OK before erasing the
50
+ originals. Once in write mode, exiftool will ignore any read-specific
51
+ options.
52
+
53
+ Note: If *FILE* is a directory name then only supported file types in
54
+ the directory are processed (in write mode only writable types are
55
+ processed). However, files may be specified by name, or the -ext option
56
+ may be used to force processing of files with any extension. Hidden
57
+ files in the directory are also processed. Adding the -r option causes
58
+ subdirectories to be processed recursively, but subdirectories with
59
+ names beginning with "." are skipped unless -r. is used.
60
+
61
+ Below is a list of file types and meta information formats currently
62
+ supported by ExifTool (r = read, w = write, c = create):
63
+
64
+ File Types
65
+ ------------+-------------+-------------+-------------+------------
66
+ 360 r/w | DOCX r | ITC r | NUMBERS r | RAW r/w
67
+ 3FR r | DPX r | J2C r | NXD r | RIFF r
68
+ 3G2 r/w | DR4 r/w/c | JNG r/w | O r | RSRC r
69
+ 3GP r/w | DSS r | JP2 r/w | ODP r | RTF r
70
+ 7Z r | DV r | JPEG r/w | ODS r | RW2 r/w
71
+ A r | DVB r/w | JSON r | ODT r | RWL r/w
72
+ AA r | DVR-MS r | JXL r/w | OFR r | RWZ r
73
+ AAC r | DYLIB r | K25 r | OGG r | RM r
74
+ AAE r | EIP r | KDC r | OGV r | SEQ r
75
+ AAX r/w | EPS r/w | KEY r | ONP r | SKETCH r
76
+ ACR r | EPUB r | LA r | OPUS r | SO r
77
+ AFM r | ERF r/w | LFP r | ORF r/w | SR2 r/w
78
+ AI r/w | EXE r | LIF r | ORI r/w | SRF r
79
+ AIFF r | EXIF r/w/c | LNK r | OTF r | SRW r/w
80
+ APE r | EXR r | LRV r/w | PAC r | SVG r
81
+ ARQ r/w | EXV r/w/c | M2TS r | PAGES r | SWF r
82
+ ARW r/w | F4A/V r/w | M4A/V r/w | PBM r/w | THM r/w
83
+ ASF r | FFF r/w | MACOS r | PCD r | TIFF r/w
84
+ AVI r | FITS r | MAX r | PCX r | TORRENT r
85
+ AVIF r/w | FLA r | MEF r/w | PDB r | TTC r
86
+ AZW r | FLAC r | MIE r/w/c | PDF r/w | TTF r
87
+ BMP r | FLIF r/w | MIFF r | PEF r/w | TXT r
88
+ BPG r | FLV r | MKA r | PFA r | VCF r
89
+ BTF r | FPF r | MKS r | PFB r | VNT r
90
+ C2PA r | FPX r | MKV r | PFM r | VRD r/w/c
91
+ CHM r | GIF r/w | MNG r/w | PGF r | VSD r
92
+ COS r | GLV r/w | MOBI r | PGM r/w | WAV r
93
+ CR2 r/w | GPR r/w | MODD r | PLIST r | WDP r/w
94
+ CR3 r/w | GZ r | MOI r | PICT r | WEBP r/w
95
+ CRM r/w | HDP r/w | MOS r/w | PMP r | WEBM r
96
+ CRW r/w | HDR r | MOV r/w | PNG r/w | WMA r
97
+ CS1 r/w | HEIC r/w | MP3 r | PPM r/w | WMV r
98
+ CSV r | HEIF r/w | MP4 r/w | PPT r | WPG r
99
+ CUR r | HTML r | MPC r | PPTX r | WTV r
100
+ CZI r | ICC r/w/c | MPG r | PS r/w | WV r
101
+ DCM r | ICO r | MPO r/w | PSB r/w | X3F r/w
102
+ DCP r/w | ICS r | MQV r/w | PSD r/w | XCF r
103
+ DCR r | IDML r | MRC r | PSP r | XISF r
104
+ DFONT r | IIQ r/w | MRW r/w | QTIF r/w | XLS r
105
+ DIVX r | IND r/w | MXF r | R3D r | XLSX r
106
+ DJVU r | INSP r/w | NEF r/w | RA r | XMP r/w/c
107
+ DLL r | INSV r | NKA r | RAF r/w | ZIP r
108
+ DNG r/w | INX r | NKSC r/w | RAM r |
109
+ DOC r | ISO r | NRW r/w | RAR r |
110
+
111
+ Meta Information
112
+ ----------------------+----------------------+---------------------
113
+ EXIF r/w/c | CIFF r/w | Ricoh RMETA r
114
+ GPS r/w/c | AFCP r/w | Picture Info r
115
+ IPTC r/w/c | Kodak Meta r/w | Adobe APP14 r
116
+ XMP r/w/c | FotoStation r/w | MPF r
117
+ MakerNotes r/w/c | PhotoMechanic r/w | Stim r
118
+ Photoshop IRB r/w/c | JPEG 2000 r | DPX r
119
+ ICC Profile r/w/c | DICOM r | APE r
120
+ MIE r/w/c | Flash r | Vorbis r
121
+ JFIF r/w/c | FlashPix r | SPIFF r
122
+ Ducky APP12 r/w/c | QuickTime r | DjVu r
123
+ PDF r/w/c | Matroska r | M2TS r
124
+ PNG r/w/c | MXF r | PE/COFF r
125
+ Canon VRD r/w/c | PrintIM r | AVCHD r
126
+ Nikon Capture r/w/c | FLAC r | ZIP r
127
+ GeoTIFF r/w/c | ID3 r | (and more)
128
+
129
+ OPTIONS
130
+ Case is not significant for any command-line option (including tag and
131
+ group names), except for single-character options when the corresponding
132
+ upper-case option exists. Many single-character options have equivalent
133
+ long-name versions (shown in brackets), and some options have inverses
134
+ which are invoked with a leading double-dash. Unrecognized options are
135
+ interpreted as tag names (for this reason, multiple single-character
136
+ options may NOT be combined into one argument). Contrary to standard
137
+ practice, options may appear after source file names on the exiftool
138
+ command line.
139
+
140
+ Option Overview
141
+ Tag operations
142
+
143
+ -TAG or --TAG Extract or exclude specified tag
144
+ -TAG[+-^]=[VALUE] Write new value for tag
145
+ -TAG[+-]<=DATFILE Write tag value from contents of file
146
+ -[+]TAG[+-]<SRCTAG Copy tag value (see -tagsFromFile)
147
+
148
+ -tagsFromFile SRCFILE Copy tag values from file
149
+ -x TAG (-exclude) Exclude specified tag
150
+
151
+ Input-output text formatting
152
+
153
+ -args (-argFormat) Format metadata as exiftool arguments
154
+ -b (-binary) Output metadata in binary format
155
+ -c FMT (-coordFormat) Set format for GPS coordinates
156
+ -charset [[TYPE=]CHARSET] Specify encoding for special characters
157
+ -csv[[+]=CSVFILE] Export/import tags in CSV format
158
+ -csvDelim STR Set delimiter for CSV file
159
+ -d FMT (-dateFormat) Set format for date/time values
160
+ -D (-decimal) Show tag ID numbers in decimal
161
+ -E,-ex,-ec (-escape(HTML|XML|C))Escape tag values for HTML, XML or C
162
+ -f (-forcePrint) Force printing of all specified tags
163
+ -g[NUM...] (-groupHeadings) Organize output by tag group
164
+ -G[NUM...] (-groupNames) Print group name for each tag
165
+ -h (-htmlFormat) Use HTML formatting for output
166
+ -H (-hex) Show tag ID numbers in hexadecimal
167
+ -htmlDump[OFFSET] Generate HTML-format binary dump
168
+ -j[[+]=JSONFILE] (-json) Export/import tags in JSON format
169
+ -l (-long) Use long 2-line output format
170
+ -L (-latin) Use Windows Latin1 encoding
171
+ -lang [LANG] Set current language
172
+ -listItem INDEX Extract specific item from a list
173
+ -n (--printConv) No print conversion
174
+ -p[-] STR (-printFormat) Print output in specified format
175
+ -php Export tags as a PHP Array
176
+ -s[NUM] (-short) Short output format (-s for tag names)
177
+ -S (-veryShort) Very short output format
178
+ -sep STR (-separator) Set separator string for list items
179
+ -sort Sort output alphabetically
180
+ -struct Enable output of structured information
181
+ -t (-tab) Output in tab-delimited list format
182
+ -T (-table) Output in tabular format
183
+ -v[NUM] (-verbose) Print verbose messages
184
+ -w[+|!] EXT (-textOut) Write (or overwrite!) output text files
185
+ -W[+|!] FMT (-tagOut) Write output text file for each tag
186
+ -Wext EXT (-tagOutExt) Write only specified file types with -W
187
+ -X (-xmlFormat) Use RDF/XML output format
188
+
189
+ Processing control
190
+
191
+ -a (-duplicates) Allow duplicate tags to be extracted
192
+ -e (--composite) Do not generate composite tags
193
+ -ee[NUM] (-extractEmbedded) Extract information from embedded files
194
+ -ext[+] EXT (-extension) Process files with specified extension
195
+ -F[OFFSET] (-fixBase) Fix the base for maker notes offsets
196
+ -fast[NUM] Increase speed when extracting metadata
197
+ -fileOrder[NUM] [-]TAG Set file processing order
198
+ -i DIR (-ignore) Ignore specified directory name
199
+ -if[NUM] EXPR Conditionally process files
200
+ -m (-ignoreMinorErrors) Ignore minor errors and warnings
201
+ -o OUTFILE (-out) Set output file or directory name
202
+ -overwrite_original Overwrite original by renaming tmp file
203
+ -overwrite_original_in_place Overwrite original by copying tmp file
204
+ -P (-preserve) Preserve file modification date/time
205
+ -password PASSWD Password for processing protected files
206
+ -progress[NUM][:[TITLE]] Show file progress count
207
+ -q (-quiet) Quiet processing
208
+ -r[.] (-recurse) Recursively process subdirectories
209
+ -scanForXMP Brute force XMP scan
210
+ -u (-unknown) Extract unknown tags
211
+ -U (-unknown2) Extract unknown binary tags too
212
+ -wm MODE (-writeMode) Set mode for writing/creating tags
213
+ -z (-zip) Read/write compressed information
214
+
215
+ Other options
216
+
217
+ -@ ARGFILE Read command-line arguments from file
218
+ -k (-pause) Pause before terminating
219
+ -list[w|f|wf|g[NUM]|d|x] List various exiftool capabilities
220
+ -ver Print exiftool version number
221
+ -- End of options
222
+
223
+ Special features
224
+
225
+ -geotag TRKFILE Geotag images from specified GPS log
226
+ -globalTimeShift SHIFT Shift all formatted date/time values
227
+ -use MODULE Add features from plug-in module
228
+
229
+ Utilities
230
+
231
+ -delete_original[!] Delete "_original" backups
232
+ -restore_original Restore from "_original" backups
233
+
234
+ Advanced options
235
+
236
+ -api OPT[[^]=[VAL]] Set ExifTool API option
237
+ -common_args Define common arguments
238
+ -config CFGFILE Specify configuration file name
239
+ -echo[NUM] TEXT Echo text to stdout or stderr
240
+ -efile[NUM][!] TXTFILE Save names of files with errors
241
+ -execute[NUM] Execute multiple commands on one line
242
+ -fileNUM ALTFILE Load tags from alternate file
243
+ -list_dir List directories, not their contents
244
+ -srcfile FMT Process a different source file
245
+ -stay_open FLAG Keep reading -@ argfile even after EOF
246
+ -userParam PARAM[[^]=[VAL]] Set user parameter (API UserParam opt)
247
+
248
+ Option Details
249
+ Tag operations
250
+ -*TAG*
251
+ Extract information for the specified tag (eg. "-CreateDate").
252
+ Multiple tags may be specified in a single command. A tag name is
253
+ the handle by which a piece of information is referenced. See
254
+ Image::ExifTool::TagNames for documentation on available tag names.
255
+ A tag name may include leading group names separated by colons (eg.
256
+ "-EXIF:CreateDate", or "-Doc1:XMP:Creator"), and each group name
257
+ may be prefixed by a digit to specify family number (eg.
258
+ "-1IPTC:City"). (Note that the API SavePath and SaveFormat options
259
+ must be used for the family 5 and 6 groups respectively to be
260
+ available.) Use the -listg option to list available group names by
261
+ family.
262
+
263
+ A special tag name of "All" may be used to indicate all meta
264
+ information (ie. -All). This is particularly useful when a group
265
+ name is specified to extract all information in a group (but beware
266
+ that unless the -a option is also used, some tags in the group may
267
+ be suppressed by same-named tags in other groups). The wildcard
268
+ characters "?" and "*" may be used in a tag name to match any
269
+ single character and zero or more characters respectively. These
270
+ may not be used in a group name, with the exception that a group
271
+ name of "*" (or "All") may be used to extract all instances of a
272
+ tag (as if -a was used). Note that arguments containing wildcards
273
+ must be quoted on the command line of most systems to prevent shell
274
+ globbing.
275
+
276
+ A "#" may be appended to the tag name to disable the print
277
+ conversion on a per-tag basis (see the -n option). This may also be
278
+ used when writing or copying tags.
279
+
280
+ If no tags are specified, all available information is extracted
281
+ (as if "-All" had been specified).
282
+
283
+ Note: Descriptions, not tag names, are shown by default when
284
+ extracting information. Use the -s option to see the tag names
285
+ instead.
286
+
287
+ --*TAG*
288
+ Exclude specified tag from extracted information. Same as the -x
289
+ option. Group names and wildcards are permitted as described above
290
+ for -TAG. Once excluded from the output, a tag may not be
291
+ re-included by a subsequent option. May also be used following a
292
+ -tagsFromFile option to exclude tags from being copied (when
293
+ redirecting to another tag, it is the source tag that should be
294
+ excluded), or to exclude groups from being deleted when deleting
295
+ all information (eg. "-all= --exif:all" deletes all but EXIF
296
+ information). But note that this will not exclude individual tags
297
+ from a group delete (unless a family 2 group is specified, see note
298
+ 4 below). Instead, individual tags may be recovered using the
299
+ -tagsFromFile option (eg. "-all= -tagsfromfile @ -artist").
300
+
301
+ To speed processing when reading XMP, exclusions in XMP groups also
302
+ bypass processing of the corresponding XMP property and any
303
+ contained properties. For example, "--xmp-crs:all" may speed
304
+ processing significantly in cases where a large number of XMP-crs
305
+ tags exist. To use this feature to bypass processing of a specific
306
+ XMP property, the property name must be used instead of the
307
+ ExifTool tag name (eg. "--xmp-crs:dabs"). Also, "XMP-all" may be
308
+ used to to indicate any XMP namespace (eg. "--xmp-all:dabs").
309
+
310
+ -*TAG*[+-^]=[*VALUE*]
311
+ Write a new value for the specified tag (eg. "-comment=wow"), or
312
+ delete the tag if no *VALUE* is given (eg. "-comment="). "+=" and
313
+ "-=" are used to add or remove existing entries from a list, or to
314
+ shift date/time values (see Image::ExifTool::Shift.pl and note 6
315
+ below for more details). "+=" may also be used to increment
316
+ numerical values (or decrement if *VALUE* is negative), and "-="
317
+ may be used to conditionally delete or replace a tag (see "WRITING
318
+ EXAMPLES" for examples). "^=" is used to write an empty string
319
+ instead of deleting the tag when no *VALUE* is given, but otherwise
320
+ it is equivalent to "=". (Note that the caret must be quoted on the
321
+ Windows command line.)
322
+
323
+ *TAG* may contain one or more leading family 0, 1, 2 or 7 group
324
+ names, prefixed by optional family numbers, and separated colons.
325
+ If no group name is specified, the tag is created in the preferred
326
+ group, and updated in any other location where a same-named tag
327
+ already exists. The preferred group in JPEG and TIFF-format images
328
+ is the first group in the following list where *TAG* is valid: 1)
329
+ EXIF, 2) IPTC, 3) XMP.
330
+
331
+ The wildcards "*" and "?" may be used in tag names to assign the
332
+ same value to multiple tags. When specified with wildcards,
333
+ "Unsafe" tags are not written. A tag name of "All" is equivalent to
334
+ "*" (except that it doesn't require quoting, while arguments with
335
+ wildcards do on systems with shell globbing), and is often used
336
+ when deleting all metadata (ie. "-All=") or an entire group (eg.
337
+ "-XMP-dc:All=", see note 4 below). Note that not all groups are
338
+ deletable, and that the JPEG APP14 "Adobe" group is not removed by
339
+ default with "-All=" because it may affect the appearance of the
340
+ image. However, color space information is removed, so the colors
341
+ may be affected (but this may be avoided by copying back the tags
342
+ defined by the ColorSpaceTags shortcut). Use the -listd option for
343
+ a complete list of deletable groups, and see note 5 below regarding
344
+ the "APP" groups. Also, within an image some groups may be
345
+ contained within others, and these groups are removed if the
346
+ containing group is deleted:
347
+
348
+ JPEG Image:
349
+ - Deleting EXIF or IFD0 also deletes ExifIFD, GlobParamIFD,
350
+ GPS, IFD1, InteropIFD, MakerNotes, PrintIM and SubIFD.
351
+ - Deleting ExifIFD also deletes InteropIFD and MakerNotes.
352
+ - Deleting Photoshop also deletes IPTC.
353
+
354
+ TIFF Image:
355
+ - Deleting EXIF only removes ExifIFD which also deletes
356
+ InteropIFD and MakerNotes.
357
+
358
+ MOV/MP4 Video:
359
+ - Deleting ItemList also deletes Keys tags.
360
+
361
+ Notes:
362
+
363
+ 1) Many tag values may be assigned in a single command. If two
364
+ assignments affect the same tag, the latter takes precedence
365
+ (except for list-type tags, for which both values are written).
366
+
367
+ 2) In general, MakerNotes tags are considered "Permanent", and may
368
+ be edited but not created or deleted individually. This avoids many
369
+ potential problems, including the inevitable compatibility problems
370
+ with OEM software which may be very inflexible about the
371
+ information it expects to find in the maker notes.
372
+
373
+ 3) Changes to PDF files by ExifTool are reversible (by deleting the
374
+ update with "-PDF-update:all=") because the original information is
375
+ never actually deleted from the file. So ExifTool alone may not be
376
+ used to securely edit metadata in PDF files.
377
+
378
+ 4) Specifying "-GROUP:all=" deletes the entire group as a block
379
+ only if a single family 0 or 1 group is specified. Otherwise all
380
+ deletable tags in the specified group(s) are removed individually,
381
+ and in this case is it possible to exclude individual tags from a
382
+ mass delete. For example, "-time:all --Exif:Time:All" removes all
383
+ deletable Time tags except those in the EXIF. This difference also
384
+ applies if family 2 is specified when deleting all groups. For
385
+ example, "-2all:all=" deletes tags individually, while "-all:all="
386
+ deletes entire blocks.
387
+
388
+ 5) The "APP" group names ("APP0" through "APP15") are used to
389
+ delete JPEG application segments which are not associated with
390
+ another deletable group. For example, specifying "-APP14:All=" will
391
+ NOT delete the APP14 "Adobe" segment because this is accomplished
392
+ with "-Adobe:All". But note that these unnamed APP segments may not
393
+ be excluded with "--APPxx:all" when deleting all information.
394
+
395
+ 6) When shifting a value, the shift is applied to the original
396
+ value of the tag, overriding any other values previously assigned
397
+ to the tag on the same command line. To shift a date/time value and
398
+ copy it to another tag in the same operation, use the
399
+ -globalTimeShift option.
400
+
401
+ Special feature: Integer values may be specified in hexadecimal
402
+ with a leading "0x", and simple rational values may be specified as
403
+ fractions.
404
+
405
+ -*TAG*<=*DATFILE* or -*TAG*<=*FMT*
406
+ Set the value of a tag from the contents of file *DATFILE*. The
407
+ file name may also be given by a *FMT* string where %d, %f and %e
408
+ represent the directory, file name and extension of the original
409
+ *FILE* (see the -w option for more details). Note that quotes are
410
+ required around this argument to prevent shell redirection since it
411
+ contains a "<" symbol. If *DATFILE*/*FMT* is not provided, the
412
+ effect is the same as "-TAG=", and the tag is simply deleted. "+<="
413
+ or "-<=" may also be used to add or delete specific list entries,
414
+ or to shift date/time values.
415
+
416
+ -tagsFromFile *SRCFILE* or *FMT*
417
+ Copy tag values from *SRCFILE* to *FILE*. Tag names on the command
418
+ line after this option specify the tags to be copied, or excluded
419
+ from the copy. Wildcards are permitted in these tag names. If no
420
+ tags are specified, then all possible tags (see note 1 below) from
421
+ the source file are copied to same-named tags in the preferred
422
+ location of the output file (the same as specifying "-all"). More
423
+ than one -tagsFromFile option may be used to copy tags from
424
+ multiple files.
425
+
426
+ By default, this option will update any existing and writable
427
+ same-named tags in the output *FILE*, but will create new tags only
428
+ in their preferred groups. This allows some information to be
429
+ automatically transferred to the appropriate group when copying
430
+ between images of different formats. However, if a group name is
431
+ specified for a tag then the information is written only to this
432
+ group (unless redirected to another group, see below). If "All" is
433
+ used as a group name, then the specified tag(s) are written to the
434
+ same family 1 group they had in the source file (ie. the same
435
+ specific location, like ExifIFD or XMP-dc). For example, the common
436
+ operation of copying all writable tags to the same specific
437
+ locations in the output *FILE* is achieved by adding "-all:all". A
438
+ different family may be specified by adding a leading family number
439
+ to the group name (eg. "-0all:all" preserves the same general
440
+ location, like EXIF or XMP).
441
+
442
+ *SRCFILE* may be the same as *FILE* to move information around
443
+ within a single file. In this case, "@" may be used to represent
444
+ the source file (ie. "-tagsFromFile @"), permitting this feature to
445
+ be used for batch processing multiple files. Specified tags are
446
+ then copied from each file in turn as it is rewritten. For advanced
447
+ batch use, the source file name may also be specified using a *FMT*
448
+ string in which %d, %f and %e represent the directory, file name
449
+ and extension of *FILE*. (eg. the current *FILE* would be
450
+ represented by "%d%f.%e", with the same effect as "@"). See the -w
451
+ option for *FMT* string examples.
452
+
453
+ A powerful redirection feature allows a destination tag to be
454
+ specified for each copied tag. With this feature, information may
455
+ be written to a tag with a different name or group. This is done
456
+ using "-*DSTTAG*<*SRCTAG*" or "-*SRCTAG*>*DSTTAG*" on the command
457
+ line after -tagsFromFile, and causes the value of *SRCTAG* to be
458
+ copied from *SRCFILE* and written to *DSTTAG* in *FILE*. Has no
459
+ effect unless *SRCTAG* exists in *SRCFILE*. Note that this argument
460
+ must be quoted to prevent shell redirection, and there is no "="
461
+ sign as when assigning new values. Source and/or destination tags
462
+ may be prefixed by a group name and/or suffixed by "#". Wildcards
463
+ are allowed in both the source and destination tag names. A
464
+ destination group and/or tag name of "All" or "*" writes to the
465
+ same family 1 group and/or tag name as the source (but the family
466
+ may be specified by adding a leading number to the group name, eg.
467
+ "0All" writes to the same family 0 group as the source). If no
468
+ destination group is specified, the information is written to the
469
+ preferred group. Whitespace around the ">" or "<" is ignored. As a
470
+ convenience, "-tagsFromFile @" is assumed for any redirected tags
471
+ which are specified without a prior -tagsFromFile option. Copied
472
+ tags may also be added or deleted from a list with arguments of the
473
+ form "-*SRCTAG*+<*DSTTAG*" or "-*SRCTAG*-<*DSTTAG*" (but see Note 5
474
+ below).
475
+
476
+ An extension of the redirection feature allows strings involving
477
+ tag names to be used on the right hand side of the "<" symbol with
478
+ the syntax "-*DSTTAG*<*STR*", where tag names in *STR* are prefixed
479
+ with a "$" symbol. See the -p option and the "Advanced formatting
480
+ feature" section for more details about this syntax. Strings
481
+ starting with a "=" sign must insert a single space after the "<"
482
+ to avoid confusion with the "<=" operator which sets the tag value
483
+ from the contents of a file. A single space at the start of the
484
+ string is removed if it exists, but all other whitespace in the
485
+ string is preserved. See note 8 below about using the redirection
486
+ feature with list-type stags, shortcuts or when using wildcards in
487
+ tag names.
488
+
489
+ See "COPYING EXAMPLES" for examples using -tagsFromFile.
490
+
491
+ Notes:
492
+
493
+ 1) Some tags (generally tags which may affect the appearance of the
494
+ image) are considered "Unsafe" to write, and are only copied if
495
+ specified explicitly (ie. no wildcards). See the tag name
496
+ documentation for more details about "Unsafe" tags.
497
+
498
+ 2) Be aware of the difference between excluding a tag from being
499
+ copied (--*TAG*), and deleting a tag (-*TAG*=). Excluding a tag
500
+ prevents it from being copied to the destination image, but
501
+ deleting will remove a pre-existing tag from the image.
502
+
503
+ 3) The maker note information is copied as a block, so it isn't
504
+ affected like other information by subsequent tag assignments on
505
+ the command line, and individual makernote tags may not be excluded
506
+ from a block copy. Also, since the PreviewImage referenced from the
507
+ maker notes may be rather large, it is not copied, and must be
508
+ transferred separately if desired.
509
+
510
+ 4) The order of operations is to copy all specified tags at the
511
+ point of the -tagsFromFile option in the command line. Any tag
512
+ assignment to the right of the -tagsFromFile option is made after
513
+ all tags are copied. For example, new tag values are set in the
514
+ order One, Two, Three then Four with this command:
515
+
516
+ exiftool -One=1 -tagsFromFile s.jpg -Two -Four=4 -Three d.jpg
517
+
518
+ This is significant in the case where an overlap exists between the
519
+ copied and assigned tags because later operations may override
520
+ earlier ones.
521
+
522
+ 5) The normal behaviour of copied tags differs from that of
523
+ assigned tags for list-type tags and conditional replacements
524
+ because each copy operation on a tag overrides any previous
525
+ operations. While this avoids duplicate list items when copying
526
+ groups of tags from a file containing redundant information, it
527
+ also prevents values of different tags from being copied into the
528
+ same list when this is the intent. To accumulate values from
529
+ different operations into the same list, add a "+" after the
530
+ initial "-" of the argument. For example:
531
+
532
+ exiftool -tagsfromfile @ '-subject<make' '-+subject<model' ...
533
+
534
+ Similarly, "-+DSTTAG" must be used when conditionally replacing a
535
+ tag to prevent overriding earlier conditions.
536
+
537
+ 6) The -a option (allow duplicate tags) is always in effect when
538
+ copying tags from *SRCFILE*, but the highest priority tag is always
539
+ copied last so it takes precedence.
540
+
541
+ 7) Structured tags are copied by default when copying tags. See the
542
+ -struct option for details.
543
+
544
+ 8) With the redirection feature, copying a tag directly (ie.
545
+ "'-*DSTTAG*<*SRCTAG*'") is not the same as interpolating its value
546
+ inside a string (ie. "'-*DSTTAG*<$*SRCTAG*'") for source tags which
547
+ are list-type tags, shortcut tags, tag names containing wildcards,
548
+ or UserParam variables. When copying directly, the values of each
549
+ matching source tag are copied individually to the destination tag
550
+ (as if they were separate assignments). However, when interpolated
551
+ inside a string, list items and the values of shortcut tags are
552
+ concatenated (with a separator set by the -sep option), and
553
+ wildcards are not allowed. Also, UserParam variables are available
554
+ only when interpolated in a string. Another difference is that a
555
+ minor warning is generated if a tag doesn't exist when
556
+ interpolating its value in a string (with "$"), but isn't when
557
+ copying the tag directly.
558
+
559
+ Finally, the behaviour is different when a destination tag or group
560
+ of "All" is used. When copying directly, a destination group and/or
561
+ tag name of "All" writes to the same family 1 group and/or tag name
562
+ as the source. But when interpolated in a string, the identity of
563
+ the source tags are lost and the value is written to all possible
564
+ groups/tags. For example, the string form must be used in the
565
+ following command since the intent is to set the value of all
566
+ existing date/time tags from "CreateDate":
567
+
568
+ exiftool "-time:all<$createdate" -wm w FILE
569
+
570
+ -x *TAG* (-exclude)
571
+ Exclude the specified tag. There may be multiple -x options. This
572
+ has the same effect as --*TAG* on the command line. See the --*TAG*
573
+ documentation above for a complete description.
574
+
575
+ Input-output text formatting
576
+ Note that trailing spaces are removed from extracted values for most
577
+ output text formats. The exceptions are -b, -csv, -j and -X.
578
+
579
+ -args (-argFormat)
580
+ Output information in the form of exiftool arguments, suitable for
581
+ use with the -@ option when writing. May be combined with the -G
582
+ option to include group names. This feature may be used to
583
+ effectively copy tags between images, but allows the metadata to be
584
+ altered by editing the intermediate file ("out.args" in this
585
+ example):
586
+
587
+ exiftool -args -G1 --filename --directory src.jpg > out.args
588
+ exiftool -@ out.args -sep ", " dst.jpg
589
+
590
+ Note: Be careful when copying information with this technique since
591
+ it is easy to write tags which are normally considered "Unsafe".
592
+ For instance, the FileName and Directory tags are excluded in the
593
+ example above to avoid renaming and moving the destination file.
594
+ Also note that the second command above will produce warning
595
+ messages for any tags which are not writable.
596
+
597
+ As well, the -sep option should be used as in the second command
598
+ above to maintain separate list items when writing metadata back to
599
+ image files, and the -struct option may be used when extracting to
600
+ preserve structured XMP information.
601
+
602
+ -b, --b (-binary, --binary)
603
+ Output requested metadata in binary format without tag names or
604
+ descriptions (-b or -binary). This option is mainly used for
605
+ extracting embedded images or other binary data, but it may also be
606
+ useful for some text strings since control characters (such as
607
+ newlines) are not replaced by '.' as they are in the default
608
+ output. By default, list items are separated by a newline when
609
+ extracted with the -b option, but this may be changed (see the -sep
610
+ option for details). May be combined with -j, -php or -X to extract
611
+ binary data in JSON, PHP or XML format, but note that "Unsafe" tags
612
+ are not extracted as binary unless they are specified explicitly or
613
+ the API RequestAll option is set to 3 or higher.
614
+
615
+ With a leading double dash (--b or --binary), tags which contain
616
+ binary data are suppressed in the output when reading.
617
+
618
+ -c *FMT* (-coordFormat)
619
+ Set the print format for GPS coordinates. *FMT* uses the same
620
+ syntax as a "printf" format string. The specifiers correspond to
621
+ degrees, minutes and seconds in that order, but minutes and seconds
622
+ are optional. For example, the following table gives the output for
623
+ the same coordinate using various formats:
624
+
625
+ FMT Output
626
+ ------------------- ------------------
627
+ "%d deg %d' %.2f"\" 54 deg 59' 22.80" (default for reading)
628
+ "%d %d %.8f" 54 59 22.80000000 (default for copying)
629
+ "%d deg %.4f min" 54 deg 59.3800 min
630
+ "%.6f degrees" 54.989667 degrees
631
+
632
+ Notes:
633
+
634
+ 1) To avoid loss of precision, the default coordinate format is
635
+ different when copying tags using the -tagsFromFile option.
636
+
637
+ 2) If the hemisphere is known, a reference direction (N, S, E or W)
638
+ is appended to each printed coordinate, but adding a "+" or "-" to
639
+ the format specifier (eg. "%+.6f" or "%-.6f") prints a signed
640
+ coordinate instead. ("+" adds a leading "+" for positive
641
+ coordinates, but "-" does not.)
642
+
643
+ 3) This print formatting may be disabled with the -n option to
644
+ extract coordinates as signed decimal degrees.
645
+
646
+ -charset [[*TYPE*=]*CHARSET*]
647
+ If *TYPE* is "ExifTool" or not specified, this option sets the
648
+ ExifTool character encoding for output tag values when reading and
649
+ input values when writing, with a default of "UTF8". If no
650
+ *CHARSET* is given, a list of available character sets is returned.
651
+ Valid *CHARSET* values are:
652
+
653
+ CHARSET Alias(es) Description
654
+ ---------- --------------- ----------------------------------
655
+ UTF8 cp65001, UTF-8 UTF-8 characters (default)
656
+ Latin cp1252, Latin1 Windows Latin1 (West European)
657
+ Latin2 cp1250 Windows Latin2 (Central European)
658
+ Cyrillic cp1251, Russian Windows Cyrillic
659
+ Greek cp1253 Windows Greek
660
+ Turkish cp1254 Windows Turkish
661
+ Hebrew cp1255 Windows Hebrew
662
+ Arabic cp1256 Windows Arabic
663
+ Baltic cp1257 Windows Baltic
664
+ Vietnam cp1258 Windows Vietnamese
665
+ Thai cp874 Windows Thai
666
+ DOSLatinUS cp437 DOS Latin US
667
+ DOSLatin1 cp850 DOS Latin1
668
+ DOSCyrillic cp866 DOS Cyrillic
669
+ MacRoman cp10000, Roman Macintosh Roman
670
+ MacLatin2 cp10029 Macintosh Latin2 (Central Europe)
671
+ MacCyrillic cp10007 Macintosh Cyrillic
672
+ MacGreek cp10006 Macintosh Greek
673
+ MacTurkish cp10081 Macintosh Turkish
674
+ MacRomanian cp10010 Macintosh Romanian
675
+ MacIceland cp10079 Macintosh Icelandic
676
+ MacCroatian cp10082 Macintosh Croatian
677
+
678
+ *TYPE* may be "FileName" to specify the encoding of file names on
679
+ the command line (ie. *FILE* arguments). In Windows, this triggers
680
+ use of wide-character i/o routines, thus providing support for
681
+ Unicode file names. See the "WINDOWS UNICODE FILE NAMES" section
682
+ below for details.
683
+
684
+ Other values of *TYPE* listed below are used to specify the
685
+ internal encoding of various meta information formats.
686
+
687
+ TYPE Description Default
688
+ --------- ------------------------------------------- -------
689
+ EXIF Internal encoding of EXIF "ASCII" strings (none)
690
+ ID3 Internal encoding of ID3v1 information Latin
691
+ IPTC Internal IPTC encoding to assume when Latin
692
+ IPTC:CodedCharacterSet is not defined
693
+ Photoshop Internal encoding of Photoshop IRB strings Latin
694
+ QuickTime Internal encoding of QuickTime strings MacRoman
695
+ RIFF Internal encoding of RIFF strings 0
696
+
697
+ See <https://exiftool.org/faq.html#Q10> for more information about
698
+ coded character sets, and the Image::ExifTool Options for more
699
+ details about the -charset settings.
700
+
701
+ -csv[[+]=*CSVFILE*]
702
+ Export information in CSV format, or import information if
703
+ *CSVFILE* is specified. When importing, the CSV file must be in
704
+ exactly the same format as the exported file. The first row of the
705
+ *CSVFILE* must be the ExifTool tag names (with optional group
706
+ names) for each column of the file, and values must be separated by
707
+ commas. A special "SourceFile" column specifies the files
708
+ associated with each row of information (and a SourceFile of "*"
709
+ may be used to define default tags to be imported for all files
710
+ which are combined with any tags specified for the specific
711
+ SourceFile processed). The -csvDelim option may be used to change
712
+ the input/output field delimiter if something other than a comma is
713
+ required.
714
+
715
+ The following examples demonstrate basic use of the -csv option:
716
+
717
+ # generate CSV file with common tags from all images in a directory
718
+ exiftool -common -csv dir > out.csv
719
+
720
+ # update metadata for all images in a directory from CSV file
721
+ exiftool -csv=a.csv dir
722
+
723
+ When importing, empty values are ignored unless the -f option is
724
+ used and the API MissingTagValue is set to an empty string (in
725
+ which case the tag is deleted). Also, FileName and Directory
726
+ columns are ignored if they exist (ie. ExifTool will not attempt to
727
+ write these tags with a CSV import), but all other columns are
728
+ imported. To force a tag to be deleted, use the -f option and set
729
+ the value to "-" in the CSV file (or to the MissingTagValue if this
730
+ API option was used). Multiple databases may be imported in a
731
+ single command.
732
+
733
+ When exporting a CSV file, the -g or -G option adds group names to
734
+ the tag headings. If the -a option is used to allow duplicate tag
735
+ names, the duplicate tags are only included in the CSV output if
736
+ the column headings are unique. Adding the -G4 option ensures a
737
+ unique column heading for each tag. The -b option may be added to
738
+ output binary data, encoded in base64 if necessary (indicated by
739
+ ASCII "base64:" as the first 7 bytes of the value). Values may also
740
+ be encoded in base64 if the -charset option is used and the value
741
+ contains invalid characters.
742
+
743
+ When exporting specific tags, the CSV columns are arranged in the
744
+ same order as the specified tags provided the column headings
745
+ exactly match the specified tag names, otherwise the columns are
746
+ sorted in alphabetical order.
747
+
748
+ When importing from a CSV file, only files specified on the command
749
+ line are processed. Any extra entries in the CSV file are ignored.
750
+
751
+ List-type tags are stored as simple strings in a CSV file, but the
752
+ -sep option may be used to split them back into separate items when
753
+ importing.
754
+
755
+ Special feature: -csv+=*CSVFILE* may be used to add items to
756
+ existing lists. This affects only list-type tags. Also applies to
757
+ the -j option.
758
+
759
+ Note that this option is fundamentally different than all other
760
+ output format options because it requires information from all
761
+ input files to be buffered in memory before the output is written.
762
+ This may result in excessive memory usage when processing a very
763
+ large number of files with a single command. Also, it makes this
764
+ option incompatible with the -w and -W options. When processing a
765
+ large number of files, it is recommended to either use the JSON
766
+ (-j) or XML (-X) output format, or use -p to generate a
767
+ fixed-column CSV file instead of using the -csv option.
768
+
769
+ -csvDelim *STR*
770
+ Set the delimiter for separating CSV entries for CSV file
771
+ input/output via the -csv option. *STR* may contain "\t", "\n",
772
+ "\r" and "\\" to represent TAB, LF, CR and '\' respectively. A
773
+ double quote is not allowed in the delimiter. Default is ','.
774
+
775
+ -d *FMT* (-dateFormat)
776
+ Set the format for date/time tag values. The *FMT* string may
777
+ contain formatting codes beginning with a percent character ("%")
778
+ to represent the various components of a date/time value. The
779
+ specifics of the *FMT* syntax are system dependent -- consult the
780
+ "strftime" man page on your system for details. The default format
781
+ is equivalent to "%Y:%m:%d %H:%M:%S". This option has no effect on
782
+ date-only or time-only tags and ignores timezone information if
783
+ present. ExifTool adds a %f format code to represent fractional
784
+ seconds, and supports an optional width to specify the number of
785
+ digits after the decimal point (eg. %3f would give something like
786
+ .437), and a minus sign to drop the decimal point (eg. "%-3f" would
787
+ give 437). Only one -d option may be used per command. Requires
788
+ POSIX::strptime or Time::Piece for the inversion conversion when
789
+ writing.
790
+
791
+ -D (-decimal)
792
+ Show tag ID number in decimal when extracting information.
793
+
794
+ -E, -ex, -ec (-escapeHTML, -escapeXML, -escapeC)
795
+ Escape characters in output tag values for HTML (-E), XML (-ex) or
796
+ C (-ec). For HTML, all characters with Unicode code points above
797
+ U+007F are escaped as well as the following 5 characters: & (&amp;)
798
+ ' (&#39;) " (&quot;) > (&gt;) and < (&lt;). For XML, only these 5
799
+ characters are escaped. The -E option is implied with -h, and -ex
800
+ is implied with -X. For C, all control characters and the backslash
801
+ are escaped. The inverse conversion is applied when writing tags.
802
+
803
+ -f (-forcePrint)
804
+ Force printing of tags even if they don't exist. This option
805
+ applies to tags specified on the command line, or with the -p, -if
806
+ or -tagsFromFile options. When -f is used, the value of any missing
807
+ tag is set to a dash ("-") by default, but this may be configured
808
+ via the API MissingTagValue option. -f is also used to add a
809
+ 'flags' attribute to the -listx output, or to allow tags to be
810
+ deleted when writing with the -csv=*CSVFILE* feature.
811
+
812
+ -g[*NUM*][:*NUM*...] (-groupHeadings)
813
+ Organize output by tag group. *NUM* specifies a group family
814
+ number, and may be 0 (general location), 1 (specific location), 2
815
+ (category), 3 (document number), 4 (instance number), 5 (metadata
816
+ path), 6 (EXIF/TIFF format), 7 (tag ID) or 8 (file number). -g0 is
817
+ assumed if a family number is not specified. May be combined with
818
+ other options to add group names to the output. Multiple families
819
+ may be specified by separating them with colons. By default the
820
+ resulting group name is simplified by removing any leading "Main:"
821
+ and collapsing adjacent identical group names, but this can be
822
+ avoided by placing a colon before the first family number (eg.
823
+ -g:3:1). Use the -listg option to list group names for a specified
824
+ family. The API SavePath and SaveFormat options are automatically
825
+ enabled if the respective family 5 or 6 group names are requested.
826
+ See the API GetGroup documentation for more information.
827
+
828
+ -G[*NUM*][:*NUM*...] (-groupNames)
829
+ Same as -g but print group name for each tag. -G0 is assumed if
830
+ *NUM* is not specified. May be combined with a number of other
831
+ options to add group names to the output. Note that *NUM* may be
832
+ added wherever -G is mentioned in the documentation. See the -g
833
+ option above for details.
834
+
835
+ -h (-htmlFormat)
836
+ Use HTML table formatting for output. Implies the -E option. The
837
+ formatting options -D, -H, -g, -G, -l and -s may be used in
838
+ combination with -h to influence the HTML format.
839
+
840
+ -H (-hex)
841
+ Show tag ID number in hexadecimal when extracting information.
842
+
843
+ -htmlDump[*OFFSET*]
844
+ Generate a dynamic web page containing a hex dump of the EXIF
845
+ information. This can be a very powerful tool for low-level
846
+ analysis of EXIF information. The -htmlDump option is also invoked
847
+ if the -v and -h options are used together. The verbose level
848
+ controls the maximum length of the blocks dumped. An *OFFSET* may
849
+ be given to specify the base for displayed offsets. If not
850
+ provided, the EXIF/TIFF base offset is used. Use -htmlDump0 for
851
+ absolute offsets. Currently only EXIF/TIFF and JPEG information is
852
+ dumped, but the -u option can be used to give a raw hex dump of
853
+ other file formats.
854
+
855
+ -j[[+]=*JSONFILE*] (-json)
856
+ Use JSON (JavaScript Object Notation) formatting for console
857
+ output, or import JSON file if *JSONFILE* is specified. This option
858
+ may be combined with -g to organize the output into objects by
859
+ group, or -G to add group names to each tag. List-type tags with
860
+ multiple items are output as JSON arrays unless -sep is used. By
861
+ default XMP structures are flattened into individual tags in the
862
+ JSON output, but the original structure may be preserved with the
863
+ -struct option (this also causes all list-type XMP tags to be
864
+ output as JSON arrays, otherwise single-item lists would be output
865
+ as simple strings). The -a option is implied when -json is used,
866
+ but entries with identical JSON names are suppressed in the output.
867
+ (-G4 may be used to ensure that all tags have unique JSON names.)
868
+ Adding the -D or -H option changes tag values to JSON objects with
869
+ "val" and "id" fields, and adding -l adds a "desc" field, and a
870
+ "num" field if the numerical value is different from the converted
871
+ "val". The -b option may be added to output binary data, encoded in
872
+ base64 if necessary (indicated by ASCII "base64:" as the first 7
873
+ bytes of the value), and -t may be added to include tag table
874
+ information (see -t for details). The JSON output is UTF-8
875
+ regardless of any -L or -charset option setting, but the UTF-8
876
+ validation is disabled if a character set other than UTF-8 is
877
+ specified. Note that ExifTool quotes JSON values only if they don't
878
+ look like numbers (regardless of the original storage format or the
879
+ relevant metadata specification).
880
+
881
+ If *JSONFILE* is specified, the file is imported and the tag
882
+ definitions from the file are used to set tag values on a per-file
883
+ basis. The special "SourceFile" entry in each JSON object
884
+ associates the information with a specific target file. An object
885
+ with a missing SourceFile or a SourceFile of "*" defines default
886
+ tags for all target files which are combined with any tags
887
+ specified for the specific SourceFile processed. The imported JSON
888
+ file must have the same format as the exported JSON files with the
889
+ exception that options exporting JSON objects instead of simple
890
+ values are not compatible with the import file format (ie. export
891
+ with -D, -H, -l, or -T is not compatible, and use -G instead of
892
+ -g). Additionally, tag names in the input JSON file may be suffixed
893
+ with a "#" to disable print conversion.
894
+
895
+ Unlike CSV import, empty values are not ignored, and will cause an
896
+ empty value to be written if supported by the specific metadata
897
+ type. Tags are deleted by using the -f option and setting the tag
898
+ value to "-" (or to the MissingTagValue setting if this API option
899
+ was used). Importing with -j+=*JSONFILE* causes new values to be
900
+ added to existing lists.
901
+
902
+ -l (-long)
903
+ Use long 2-line Canon-style output format. Adds a description and
904
+ unconverted value (if it is different from the converted value) to
905
+ the XML, JSON or PHP output when -X, -j or -php is used. May also
906
+ be combined with -listf, -listr or -listwf to add descriptions of
907
+ the file types.
908
+
909
+ -L (-latin)
910
+ Use Windows Latin1 encoding (cp1252) for output tag values instead
911
+ of the default UTF-8. When writing, -L specifies that input text
912
+ values are Latin1 instead of UTF-8. Equivalent to "-charset latin".
913
+
914
+ -lang [*LANG*]
915
+ Set current language for tag descriptions and converted values.
916
+ *LANG* is "de", "fr", "ja", etc. Use -lang with no other arguments
917
+ to get a list of available languages. The default language is "en"
918
+ if -lang is not specified. Note that tag/group names are always
919
+ English, independent of the -lang setting, and translation of
920
+ warning/error messages has not yet been implemented. May also be
921
+ combined with -listx to output descriptions in one language only.
922
+
923
+ By default, ExifTool uses UTF-8 encoding for special characters,
924
+ but the -L or -charset option may be used to invoke other
925
+ encodings. Note that ExifTool uses Unicode::LineBreak if available
926
+ to help preserve the column alignment of the plain text output for
927
+ languages with a variable-width character set.
928
+
929
+ Currently, the language support is not complete, but users are
930
+ welcome to help improve this by submitting their own translations.
931
+ To submit a translation, follow these steps (you must have Perl
932
+ installed for this):
933
+
934
+ 1. Download and unpack the latest Image-ExifTool full distribution.
935
+
936
+ 2. "cd" into the Image-ExifTool directory.
937
+
938
+ 3. Run this command to make an XML file of the desired tags (eg.
939
+ EXIF):
940
+
941
+ ./exiftool -listx -exif:all > out.xml
942
+
943
+ 4. Copy this text into a file called "import.pl" in the exiftool
944
+ directory:
945
+
946
+ push @INC, 'lib';
947
+ require Image::ExifTool::TagInfoXML;
948
+ my $file = shift or die "Expected XML file name\n";
949
+ $Image::ExifTool::TagInfoXML::makeMissing = shift;
950
+ Image::ExifTool::TagInfoXML::BuildLangModules($file,8);
951
+
952
+ 5. Run the "import.pl" script to Import the XML file, generating
953
+ the "MISSING" entries for your language (eg. Russian):
954
+
955
+ perl import.pl out.xml ru
956
+
957
+ 6. Edit the generated language module
958
+ lib/Image/ExifTool/Lang/ru.pm, and search and replace all "MISSING"
959
+ strings in the file with your translations.
960
+
961
+ 7. Email the module ('ru.pm' in this example) to philharvey66 at
962
+ gmail.com
963
+
964
+ 8. Thank you!!
965
+
966
+ -listItem *INDEX*
967
+ For list-type tags, this causes only the item with the specified
968
+ index to be extracted. *INDEX* is 0 for the first item in the list.
969
+ Negative indices may also be used to reference items from the end
970
+ of the list. Has no effect on single-valued tags. Also applies to
971
+ tag values when copying from a tag, and in -if conditions.
972
+
973
+ -n (--printConv)
974
+ Disable print conversion for all tags. By default, extracted values
975
+ are converted to a more human-readable format, but the -n option
976
+ disables this conversion, revealing the machine-readable values.
977
+ For example:
978
+
979
+ > exiftool -Orientation -S a.jpg
980
+ Orientation: Rotate 90 CW
981
+ > exiftool -Orientation -S -n a.jpg
982
+ Orientation: 6
983
+
984
+ The print conversion may also be disabled on a per-tag basis by
985
+ suffixing the tag name with a "#" character:
986
+
987
+ > exiftool -Orientation# -Orientation -S a.jpg
988
+ Orientation: 6
989
+ Orientation: Rotate 90 CW
990
+
991
+ These techniques may also be used to disable the inverse print
992
+ conversion when writing. For example, the following commands all
993
+ have the same effect:
994
+
995
+ > exiftool -Orientation="Rotate 90 CW" a.jpg
996
+ > exiftool -Orientation=6 -n a.jpg
997
+ > exiftool -Orientation#=6 a.jpg
998
+
999
+ -p[-] *STR* or *FMTFILE* (-printFormat)
1000
+ Print output in the format specified by the given string or file.
1001
+ The argument is interpreted as a string unless a file of that name
1002
+ exists, in which case the string is loaded from the contents of the
1003
+ file. Tag names in the format string or file begin with a "$"
1004
+ symbol and may contain leading group names and/or a trailing "#"
1005
+ (to disable print conversion). Case is not significant. Braces "{}"
1006
+ may be used around the tag name to separate it from subsequent text
1007
+ (and must be used if subsequent text begins with an alphanumeric
1008
+ character, hyphen, underline, colon or number sign). Use $$ to
1009
+ represent a "$" symbol, and $/ for a newline. When the string
1010
+ argument is used (ie. *STR*), a newline is added to the end of the
1011
+ string unless -p- is specified or the -b option is used.
1012
+
1013
+ Multiple -p options may be used. Lines beginning with "#[HEAD]" and
1014
+ "#[TAIL]" are output before the first processed file and after the
1015
+ last processed file respectively. Lines beginning with "#[SECT]"
1016
+ and "#[ENDS]" are output before and after each section of files. A
1017
+ section is defined as a group of consecutive files with the same
1018
+ section header (eg. files are grouped by directory if "#[SECT]"
1019
+ contains $directory). Lines beginning with "#[BODY]" and lines not
1020
+ beginning with "#" are output for each processed file. Lines
1021
+ beginning with "#[IF]" are not output, but all BODY lines are
1022
+ skipped if any tag on an IF line doesn't exist. Other lines
1023
+ beginning with "#" are ignored. (To output a line beginning with
1024
+ "#", use "#[BODY]#".) For example, this format file:
1025
+
1026
+ # this is a comment line
1027
+ #[HEAD]-- Generated by ExifTool $exifToolVersion --
1028
+ File: $FileName - $DateTimeOriginal
1029
+ (f/$Aperture, ${ShutterSpeed}s, ISO $EXIF:ISO)
1030
+ #[TAIL]-- end --
1031
+
1032
+ with this command:
1033
+
1034
+ exiftool -p test.fmt a.jpg b.jpg
1035
+
1036
+ produces output like this:
1037
+
1038
+ -- Generated by ExifTool 12.96 --
1039
+ File: a.jpg - 2003:10:31 15:44:19
1040
+ (f/5.6, 1/60s, ISO 100)
1041
+ File: b.jpg - 2006:05:23 11:57:38
1042
+ (f/8.0, 1/13s, ISO 100)
1043
+ -- end --
1044
+
1045
+ The values of List-type tags with multiple items, Shortcut tags
1046
+ representing multiple tags, and matching tags when the "All" group
1047
+ is specified are joined according the -sep option setting when
1048
+ interpolated in the string. (Note that when "All" is used as a
1049
+ group name, dupicate tags are included regardless of the Duplicates
1050
+ option setting.) When "All" is used as a tag name, a value of 1 is
1051
+ returned if any tag exists in the specified group, or 0 otherwise
1052
+ (unless the "All" group is also specified, in which case the values
1053
+ of all matching tags are joined).
1054
+
1055
+ When -ee (-extractEmbedded) is combined with -p, embedded documents
1056
+ are effectively processed as separate input files.
1057
+
1058
+ If a specified tag does not exist, a minor warning is issued and
1059
+ the line with the missing tag is not printed. However, the -f
1060
+ option may be used to set the value of missing tags to '-' (but
1061
+ this may be configured via the API MissingTagValue option), or the
1062
+ -m option may be used to ignore minor warnings and leave the
1063
+ missing values empty. Alternatively, -q -q may be used to simply
1064
+ suppress the warning messages.
1065
+
1066
+ The "Advanced formatting feature" may be used to modify the values
1067
+ of individual tags within the -p option string.
1068
+
1069
+ Note that the API RequestTags option is automatically set for all
1070
+ tags used in the *FMTFILE* or *STR*. This allows all other tags to
1071
+ be ignored using -API IgnoreTags=all, resulting in reduced memory
1072
+ usage and increased speed.
1073
+
1074
+ -php Format output as a PHP Array. The -g, -G, -D, -H, -l, -sep and
1075
+ -struct options combine with -php, and duplicate tags are handled
1076
+ in the same way as with the -json option. As well, the -b option
1077
+ may be added to output binary data, and -t may be added to include
1078
+ tag table information (see -t for details). Here is a simple
1079
+ example showing how this could be used in a PHP script:
1080
+
1081
+ <?php
1082
+ eval('$array=' . `exiftool -php -q image.jpg`);
1083
+ print_r($array);
1084
+ ?>
1085
+
1086
+ -s[*NUM*] (-short)
1087
+ Short output format. Prints tag names instead of descriptions. Add
1088
+ *NUM* or up to 3 -s options for even shorter formats:
1089
+
1090
+ -s1 or -s - print tag names instead of descriptions
1091
+ -s2 or -s -s - no extra spaces to column-align values
1092
+ -s3 or -s -s -s - print values only (no tag names)
1093
+
1094
+ Also effective when combined with -t, -h, -X or -listx options.
1095
+
1096
+ -S (-veryShort)
1097
+ Very short format. The same as -s2 or two -s options. Tag names are
1098
+ printed instead of descriptions, and no extra spaces are added to
1099
+ column-align values.
1100
+
1101
+ -sep *STR* (-separator)
1102
+ Specify separator string for items in list-type tags. When reading,
1103
+ the default is to join list items with ", ". When writing, this
1104
+ option causes values assigned to list-type tags to be split into
1105
+ individual items at each substring matching *STR* (otherwise they
1106
+ are not split by default). Space characters in *STR* match zero or
1107
+ more whitespace characters in the value.
1108
+
1109
+ Note that an empty separator ("") is allowed, and will join items
1110
+ with no separator when reading, or split the value into individual
1111
+ characters when writing.
1112
+
1113
+ For pure binary output (-b used without -j, -php or -X), the first
1114
+ -sep option specifies a list-item separator, and a second -sep
1115
+ option specifies a terminator for the end of the list (or after
1116
+ each value if not a list). In these strings, "\n", "\r" and "\t"
1117
+ may be used to represent a newline, carriage return and tab
1118
+ respectively. By default, binary list items are separated by a
1119
+ newline, and no terminator is added.
1120
+
1121
+ -sort, --sort
1122
+ Sort output by tag description, or by tag name if the -s option is
1123
+ used. When sorting by description, the sort order will depend on
1124
+ the -lang option setting. Without the -sort option, tags appear in
1125
+ the order they were specified on the command line, or if not
1126
+ specified, the order they were extracted from the file. By default,
1127
+ tags are organized by groups when combined with the -g or -G
1128
+ option, but this grouping may be disabled with --sort.
1129
+
1130
+ -struct, --struct
1131
+ Output structured XMP information instead of flattening to
1132
+ individual tags. This option works well when combined with the XML
1133
+ (-X) and JSON (-j) output formats. For other output formats, XMP
1134
+ structures and lists are serialized into the same format as when
1135
+ writing structured information (see
1136
+ <https://exiftool.org/struct.html> for details). When copying,
1137
+ structured tags are copied by default unless --struct is used to
1138
+ disable this feature (although flattened tags may still be copied
1139
+ by specifying them individually unless -struct is used). These
1140
+ options have no effect when assigning new values since both
1141
+ flattened and structured tags may always be used when writing.
1142
+
1143
+ -t (-tab)
1144
+ Output a tab-delimited list of description/values (useful for
1145
+ database import). May be combined with -s to print tag names
1146
+ instead of descriptions, or -S to print tag values only,
1147
+ tab-delimited on a single line. The -t option may be combined with
1148
+ -j, -php or -X to add tag table information ("table", tag "id", and
1149
+ "index" for cases where multiple conditional tags exist with the
1150
+ same ID).
1151
+
1152
+ -T (-table)
1153
+ Output tag values in table form. Equivalent to -t -S -q -f.
1154
+
1155
+ -v[*NUM*] (-verbose)
1156
+ Print verbose messages. *NUM* specifies the level of verbosity in
1157
+ the range 0-5, with higher numbers being more verbose. If *NUM* is
1158
+ not given, then each -v option increases the level of verbosity by
1159
+ 1. With any level greater than 0, most other options are ignored
1160
+ and normal console output is suppressed unless specific tags are
1161
+ extracted. Using -v0 causes the console output buffer to be flushed
1162
+ after each line (which may be useful to avoid delays when piping
1163
+ exiftool output), and prints the name of each processed file when
1164
+ writing and the new file name when renaming, moving or copying.
1165
+ Verbose levels above -v0 do not flush after each line. Also see the
1166
+ -progress option.
1167
+
1168
+ -w[+|!] *EXT* or *FMT* (-textOut)
1169
+ Write console output to files with names ending in *EXT*, one for
1170
+ each source file. The output file name is obtained by replacing the
1171
+ source file extension (including the '.') with the specified
1172
+ extension (and a '.' is added to the start of *EXT* if it doesn't
1173
+ already contain one). Alternatively, a *FMT* string may be used to
1174
+ give more control over the output file name and directory. In the
1175
+ format string, %d, %f and %e represent the directory, filename and
1176
+ extension of the source file, and %c represents a copy number which
1177
+ is automatically incremented if the file already exists. %d
1178
+ includes the trailing '/' if necessary, but %e does not include the
1179
+ leading '.'. For example:
1180
+
1181
+ -w %d%f.txt # same effect as "-w txt"
1182
+ -w dir/%f_%e.out # write files to "dir" as "FILE_EXT.out"
1183
+ -w dir2/%d%f.txt # write to "dir2", keeping dir structure
1184
+ -w a%c.txt # write to "a.txt" or "a1.txt" or "a2.txt"...
1185
+
1186
+ Existing files will not be changed unless an exclamation point is
1187
+ added to the option name (ie. -w! or -textOut!) to overwrite the
1188
+ file, or a plus sign (ie. -w+ or -textOut+) to append to the
1189
+ existing file. Both may be used (ie. -w+! or -textOut+!) to
1190
+ overwrite output files that didn't exist before the command was
1191
+ run, and append the output from multiple source files. For example,
1192
+ to write one output file for all source files in each directory:
1193
+
1194
+ exiftool -filename -createdate -T -w+! %d/out.txt -r DIR
1195
+
1196
+ Capitalized format codes %D, %F, %E and %C provide slightly
1197
+ different alternatives to the lower case versions. %D does not
1198
+ include the trailing '/', %F is the full filename including
1199
+ extension, %E includes the leading '.', and %C increments the count
1200
+ for each processed file (see below).
1201
+
1202
+ Notes:
1203
+
1204
+ 1) In a Windows BAT file the "%" character is represented by "%%",
1205
+ so an argument like "%d%f.txt" is written as "%%d%%f.txt".
1206
+
1207
+ 2) If the argument for -w does not contain a valid format code (eg.
1208
+ %f), then it is interpreted as a file extension, but there are
1209
+ three different ways to create a single output file from multiple
1210
+ source files:
1211
+
1212
+ # 1. Shell redirection
1213
+ exiftool FILE1 FILE2 ... > out.txt
1214
+
1215
+ # 2. With the -w option and a zero-width format code
1216
+ exiftool -w+! %0fout.txt FILE1 FILE2 ...
1217
+
1218
+ # 3. With the -W option (see the -W option below)
1219
+ exiftool -W+! out.txt FILE1 FILE2 ...
1220
+
1221
+ Advanced features:
1222
+
1223
+ A substring of the original file name, directory or extension may
1224
+ be taken by specifying a field width immediately following the '%'
1225
+ character. If the width is negative, the substring is taken from
1226
+ the end. The substring position (characters to ignore at the start
1227
+ or end of the string) may be given by a second optional value after
1228
+ a decimal point. For example:
1229
+
1230
+ Input File Name Format Specifier Output File Name
1231
+ ---------------- ---------------- ----------------
1232
+ Picture-123.jpg %7f.txt Picture.txt
1233
+ Picture-123.jpg %-.4f.out Picture.out
1234
+ Picture-123.jpg %7f.%-3f Picture.123
1235
+ Picture-123a.jpg Meta%-3.1f.txt Meta123.txt
1236
+
1237
+ (Note that special characters may have a width of greater than
1238
+ one.)
1239
+
1240
+ For %d and %D, the field width/position specifiers may be applied
1241
+ to the directory levels instead of substring position by using a
1242
+ colon instead of a decimal point in the format specifier. For
1243
+ example:
1244
+
1245
+ Source Dir Format Result Notes
1246
+ ------------ ------ ---------- ------------------
1247
+ pics/2012/02 %2:d pics/2012/ take top 2 levels
1248
+ pics/2012/02 %-:1d pics/2012/ up one directory level
1249
+ pics/2012/02 %:1d 2012/02/ ignore top level
1250
+ pics/2012/02 %1:1d 2012/ take 1 level after top
1251
+ pics/2012/02 %-1:D 02 bottom level folder name
1252
+ /Users/phil %:2d phil/ ignore top 2 levels
1253
+
1254
+ (Note that the root directory counts as one level when an absolute
1255
+ path is used as in the last example above.)
1256
+
1257
+ For %c, these modifiers have a different effects. If a field width
1258
+ is given, the copy number is padded with zeros to the specified
1259
+ width. A leading '-' adds a dash before the copy number, and a '+'
1260
+ adds an underline. By default, the copy number is omitted from the
1261
+ first file of a given name, but this can be changed by adding a
1262
+ decimal point to the modifier. For example:
1263
+
1264
+ -w A%-cZ.txt # AZ.txt, A-1Z.txt, A-2Z.txt ...
1265
+ -w B%5c.txt # B.txt, B00001.txt, B00002.txt ...
1266
+ -w C%.c.txt # C0.txt, C1.txt, C2.txt ...
1267
+ -w D%-.c.txt # D-0.txt, D-1.txt, D-2.txt ...
1268
+ -w E%-.4c.txt # E-0000.txt, E-0001.txt, E-0002.txt ...
1269
+ -w F%-.4nc.txt # F-0001.txt, F-0002.txt, F-0003.txt ...
1270
+ -w G%+c.txt # G.txt, G_1.txt G_2.txt ...
1271
+ -w H%-lc.txt # H.txt, H-b.txt, H-c.txt ...
1272
+ -w I.%.3uc.txt # I.AAA.txt, I.AAB.txt, I.AAC.txt ...
1273
+
1274
+ A special feature allows the copy number to be incremented for each
1275
+ processed file by using %C (upper case) instead of %c. This allows
1276
+ a sequential number to be added to output file names, even if the
1277
+ names are different. For %C, a copy number of zero is not omitted
1278
+ as it is with %c. A leading '-' causes the number to be reset at
1279
+ the start of each new directory (in the original directory
1280
+ structure if the files are being moved), and '+' has no effect. The
1281
+ number before the decimal place gives the starting index, the
1282
+ number after the decimal place gives the field width. The following
1283
+ examples show the output filenames when used with the command
1284
+ "exiftool rose.jpg star.jpg jet.jpg ...":
1285
+
1286
+ -w %C%f.txt # 0rose.txt, 1star.txt, 2jet.txt
1287
+ -w %f-%10C.txt # rose-10.txt, star-11.txt, jet-12.txt
1288
+ -w %.3C-%f.txt # 000-rose.txt, 001-star.txt, 002-jet.txt
1289
+ -w %57.4C%f.txt # 0057rose.txt, 0058star.txt, 0059jet.txt
1290
+
1291
+ All format codes may be modified by 'l' or 'u' to specify lower or
1292
+ upper case respectively (ie. %le for a lower case file extension).
1293
+ When used to modify %c or %C, the numbers are changed to an
1294
+ alphabetical base (see example H above). Also, %c and %C may be
1295
+ modified by 'n' to count using natural numbers starting from 1,
1296
+ instead of 0 (see example F above).
1297
+
1298
+ This same *FMT* syntax is used with the -o and -tagsFromFile
1299
+ options, although %c and %C are only valid for output file names.
1300
+
1301
+ -W[+|!] *FMT* (-tagOut)
1302
+ This enhanced version of the -w option allows a separate output
1303
+ file to be created for each extracted tag. See the -w option
1304
+ documentation above for details of the basic functionality. Listed
1305
+ here are the differences between -W and -w:
1306
+
1307
+ 1) With -W, a new output file is created for each extracted tag.
1308
+
1309
+ 2) -W supports four additional format codes: %t, %g and %s
1310
+ represent the tag name, group name, and suggested extension for the
1311
+ output file (based on the format of the data), and %o represents
1312
+ the value of the OriginalRawFileName or OriginalFileName tag from
1313
+ the input file (including extension). The %g code may be followed
1314
+ by a single digit to specify the group family number (eg. %g1),
1315
+ otherwise family 0 is assumed. The substring width/position/case
1316
+ specifiers may be used with these format codes in exactly the same
1317
+ way as with %f and %e.
1318
+
1319
+ 3) The argument for -W is interpreted as a file name if it contains
1320
+ no format codes. (For -w, this would be a file extension.) This
1321
+ change allows a simple file name to be specified, which, when
1322
+ combined with the append feature, provides a method to write
1323
+ metadata from multiple source files to a single output file without
1324
+ the need for shell redirection. For example, the following pairs of
1325
+ commands give the same result:
1326
+
1327
+ # overwriting existing text file
1328
+ exiftool test.jpg > out.txt # shell redirection
1329
+ exiftool test.jpg -W+! out.txt # equivalent -W option
1330
+
1331
+ # append to existing text file
1332
+ exiftool test.jpg >> out.txt # shell redirection
1333
+ exiftool test.jpg -W+ out.txt # equivalent -W option
1334
+
1335
+ 4) Adding the -v option to -W sends a list of the tags and output
1336
+ file names to the console instead of giving a verbose dump of the
1337
+ entire file. (Unless appending all output to one file for each
1338
+ source file by using -W+ with an output file *FMT* that does not
1339
+ contain %t, %g, %s or %o.)
1340
+
1341
+ 5) Individual list items are stored in separate files when -W is
1342
+ combined with -b, but note that for separate files to be created %c
1343
+ or %C must be used in *FMT* to give the files unique names.
1344
+
1345
+ -Wext *EXT*, --Wext *EXT* (-tagOutExt)
1346
+ This option is used to specify the type of output file(s) written
1347
+ by the -W option. An output file is written only if the suggested
1348
+ extension matches *EXT*. Multiple -Wext options may be used to
1349
+ write more than one type of file. Use --Wext to write all but the
1350
+ specified type(s).
1351
+
1352
+ -X (-xmlFormat)
1353
+ Use ExifTool-specific RDF/XML formatting for console output.
1354
+ Implies the -a option, so duplicate tags are extracted. The
1355
+ formatting options -b, -D, -H, -l, -s, -sep, -struct and -t may be
1356
+ used in combination with -X to affect the output, but note that the
1357
+ tag ID (-D, -H and -t), binary data (-b) and structured output
1358
+ (-struct) options are not effective for the short output (-s).
1359
+ Another restriction of -s is that only one tag with a given group
1360
+ and name may appear in the output. Note that the tag ID options
1361
+ (-D, -H and -t) will produce non-standard RDF/XML unless the -l
1362
+ option is also used.
1363
+
1364
+ By default, -X outputs flattened tags, so -struct should be added
1365
+ if required to preserve XMP structures. List-type tags with
1366
+ multiple values are formatted as an RDF Bag, but they are combined
1367
+ into a single string when -s or -sep is used. Using -L changes the
1368
+ XML encoding from "UTF-8" to "windows-1252". Other -charset
1369
+ settings change the encoding only if there is a corresponding
1370
+ standard XML character set. The -b option causes binary data values
1371
+ to be written, encoded in base64 if necessary. The -t option adds
1372
+ tag table information to the output (see -t for details).
1373
+
1374
+ Note: This output is NOT the same as XMP because it uses
1375
+ dynamically-generated property names corresponding to the ExifTool
1376
+ tag names with ExifTool family 1 group names as namespaces, and not
1377
+ the standard XMP properties and namespaces. To write XMP instead,
1378
+ use the -o option with an XMP extension for the output file.
1379
+
1380
+ Processing control
1381
+ -a, --a (-duplicates, --duplicates)
1382
+ Allow (-a) or suppress (--a) duplicate tag names to be extracted.
1383
+ By default, duplicate tags are suppressed when reading unless the
1384
+ -ee or -X options are used or the Duplicates option is enabled in
1385
+ the configuration file. When writing, this option allows multiple
1386
+ Warning messages to be shown. Duplicate tags are always extracted
1387
+ when copying.
1388
+
1389
+ -e (--composite)
1390
+ Extract existing tags only -- don't generate composite tags.
1391
+
1392
+ -ee[*NUM*] (-extractEmbedded)
1393
+ Extract information from embedded documents in EPS files, embedded
1394
+ EPS information and JPEG and Jpeg2000 images in PDF files, embedded
1395
+ MPF images in JPEG and MPO files, streaming metadata in AVCHD
1396
+ videos, and the resource fork of Mac OS files. Implies the -a
1397
+ option. Use -g3 or -G3 to identify the originating document for
1398
+ extracted information. Embedded documents containing sub-documents
1399
+ are indicated with dashes in the family 3 group name. (eg. "Doc2-3"
1400
+ is the 3rd sub-document of the 2nd embedded document.) Note that
1401
+ this option may increase processing time substantially, especially
1402
+ for PDF files with many embedded images or videos with streaming
1403
+ metadata.
1404
+
1405
+ When used with -ee, the -p option is evaluated for each embedded
1406
+ document as if it were a separate input file. This allows, for
1407
+ example, generation of GPS track logs from timed metadata in
1408
+ videos. See <https://exiftool.org/geotag.html#Inverse> for
1409
+ examples.
1410
+
1411
+ Setting *NUM* to 2 causes the H264 video stream in MP4 videos to be
1412
+ parsed until the first Supplemental Enhancement Information (SEI)
1413
+ message is decoded, or 3 to parse the entire H624 stream and decode
1414
+ all SEI information. For M2TS videos, a setting of 3 causes the
1415
+ entire file to be parsed in search of unlisted programs which may
1416
+ contain timed GPS.
1417
+
1418
+ -ext[+] *EXT*, --ext *EXT* (-extension)
1419
+ Process only files with (-ext) or without (--ext) a specified
1420
+ extension. There may be multiple -ext and --ext options. A plus
1421
+ sign may be added (ie. -ext+) to add the specified extension to the
1422
+ normally processed files. EXT may begin with a leading ".", which
1423
+ is ignored. Case is not significant. "*" may be used to process
1424
+ files with any extension (or none at all), as in the last three
1425
+ examples:
1426
+
1427
+ exiftool -ext JPG DIR # process only JPG files
1428
+ exiftool --ext cr2 --ext dng DIR # supported files but CR2/DNG
1429
+ exiftool -ext+ txt DIR # supported files plus TXT
1430
+ exiftool -ext "*" DIR # process all files
1431
+ exiftool -ext "*" --ext xml DIR # process all but XML files
1432
+ exiftool -ext "*" --ext . DIR # all but those with no ext
1433
+
1434
+ Using this option has two main advantages over specifying "*.*EXT*"
1435
+ on the command line: 1) It applies to files in subdirectories when
1436
+ combined with the -r option. 2) The -ext option is
1437
+ case-insensitive, which is useful when processing files on
1438
+ case-sensitive filesystems.
1439
+
1440
+ Note that all files specified on the command line will be processed
1441
+ regardless of extension unless the -ext option is used.
1442
+
1443
+ -F[*OFFSET*] (-fixBase)
1444
+ Fix the base for maker notes offsets. A common problem with some
1445
+ image editors is that offsets in the maker notes are not adjusted
1446
+ properly when the file is modified. This may cause the wrong values
1447
+ to be extracted for some maker note entries when reading the edited
1448
+ file. This option allows an integer *OFFSET* to be specified for
1449
+ adjusting the maker notes base offset. If no *OFFSET* is given,
1450
+ ExifTool takes its best guess at the correct base. Note that
1451
+ exiftool will automatically fix the offsets for images which store
1452
+ original offset information (eg. newer Canon models). Offsets are
1453
+ fixed permanently if -F is used when writing EXIF to an image. eg)
1454
+
1455
+ exiftool -F -exif:resolutionunit=inches image.jpg
1456
+
1457
+ -fast[*NUM*]
1458
+ Increase speed of extracting information. With -fast (or -fast1),
1459
+ ExifTool will not scan to the end of a JPEG image to check for an
1460
+ AFCP or PreviewImage trailer, or past the first comment in GIF
1461
+ images or the audio/video data in WAV/AVI files to search for
1462
+ additional metadata. These speed benefits are small when reading
1463
+ images directly from disk, but can be substantial if piping images
1464
+ through a network connection. For more substantial speed benefits,
1465
+ -fast2 also causes exiftool to avoid extracting any EXIF MakerNote
1466
+ information, and to stop processing at the IDAT chunk of PNG images
1467
+ and the mdat atom of QuickTime-format files (but note that some
1468
+ files may store metadata after this). -fast3 avoids extracting
1469
+ metadata from the file, and returns only pseudo System tags, but
1470
+ still reads the file header to obtain an educated guess at
1471
+ FileType. -fast4 doesn't even read the file header, and returns
1472
+ only System tags and a FileType based on the file extension. -fast5
1473
+ also disables generation of the Composite tags (like -e). Has no
1474
+ effect when writing.
1475
+
1476
+ Note that a separate -fast setting may be used for evaluation of a
1477
+ -if condition, or when ordering files with the -fileOrder option.
1478
+ See the -if and -fileOrder options for details.
1479
+
1480
+ -fileOrder[*NUM*] [-]*TAG*
1481
+ Set file processing order according to the sorted value of the
1482
+ specified *TAG*. Without this option, files are processed in the
1483
+ order returned by the system, which is commonly by file name, but
1484
+ this is filesystem dependent. For example, to process files in
1485
+ order of date:
1486
+
1487
+ exiftool -fileOrder DateTimeOriginal DIR
1488
+
1489
+ Additional -fileOrder options may be added for secondary sort keys.
1490
+ Numbers are sorted numerically, and all other values are sorted
1491
+ alphabetically. Files missing the specified tag are sorted last.
1492
+ The sort order may be reversed by prefixing the tag name with a "-"
1493
+ (eg. "-fileOrder -createdate"). Print conversion of the sorted
1494
+ values is disabled with the -n option, or a "#" appended to the tag
1495
+ name. Other formatting options (eg. -d) have no effect on the
1496
+ sorted values. Note that the -fileOrder option can incur large
1497
+ performance penalty since it involves an additional initial
1498
+ processing pass of all files, but this impact may be reduced by
1499
+ specifying a *NUM* to effectively set the -fast level for the
1500
+ initial pass. For example, -fileOrder4 may be used if *TAG* is a
1501
+ pseudo System tag. If multiple -fileOrder options are used, the
1502
+ extraction is done at the lowest -fast level. Note that files are
1503
+ sorted across directory boundaries if multiple input directories
1504
+ are specified.
1505
+
1506
+ -i *DIR* (-ignore)
1507
+ Ignore specified directory name. *DIR* may be either an individual
1508
+ folder name, or a full path. If a full path is specified, it must
1509
+ match the Directory tag exactly to be ignored. Use multiple -i
1510
+ options to ignore more than one directory name. A special *DIR*
1511
+ value of "SYMLINKS" (case sensitive) may be specified to avoid
1512
+ recursing into directories which are symbolic links when the -r
1513
+ option is used. As well, a value of "HIDDEN" (case sensitive) may
1514
+ be used to ignore files with names that start with a "." (ie.
1515
+ hidden files on Unix systems) when scanning a directory.
1516
+
1517
+ -if[*NUM*] *EXPR*
1518
+ Specify a condition to be evaluated before processing each *FILE*.
1519
+ *EXPR* is a Perl-like logic expression containing tag names
1520
+ prefixed by "$" symbols. It is evaluated with the tags from each
1521
+ *FILE* in turn, and the file is processed only if the expression
1522
+ returns true. Unlike Perl variable names, tag names are not case
1523
+ sensitive and may contain a hyphen. As well, tag names may have a
1524
+ leading group names separated by colons, and/or a trailing "#"
1525
+ character to disable print conversion. The expression $GROUP:all
1526
+ evaluates to 1 if any tag exists in the specified "GROUP", or 0
1527
+ otherwise (see note 2 below). When multiple -if options are used,
1528
+ all conditions must be satisfied to process the file. Returns an
1529
+ exit status of 2 if all files fail the condition. Below are a few
1530
+ examples:
1531
+
1532
+ # extract shutterspeed from all Canon images in a directory
1533
+ exiftool -shutterspeed -if "$make eq 'Canon'" dir
1534
+
1535
+ # add one hour to all images created on or after Apr. 2, 2006
1536
+ exiftool -alldates+=1 -if "$CreateDate ge '2006:04:02'" dir
1537
+
1538
+ # set EXIF ISO value if possible, unless it is set already
1539
+ exiftool "-exif:iso<iso" -if "not $exif:iso" dir
1540
+
1541
+ # find images containing a specific keyword (case insensitive)
1542
+ exiftool -if "$keywords =~ /harvey/i" -filename dir
1543
+
1544
+ Adding *NUM* to the -if option causes a separate processing pass to
1545
+ be executed for evaluating *EXPR* at a -fast level given by *NUM*
1546
+ (see the -fast option documentation for details). Without *NUM*,
1547
+ only one processing pass is done at the level specified by the
1548
+ -fast option. For example, using -if5 is possible if *EXPR* uses
1549
+ only pseudo System tags, and may significantly speed processing if
1550
+ enough files fail the condition.
1551
+
1552
+ The expression has access to the current ExifTool object through
1553
+ $self, and the following special functions are available to allow
1554
+ short-circuiting of the file processing. Both functions have a
1555
+ return value of 1. Case is significant for function names.
1556
+
1557
+ End() - end processing after this file
1558
+ EndDir() - end processing of files in the current directory
1559
+ after this file (not compatible with -fileOrder)
1560
+
1561
+ Notes:
1562
+
1563
+ 1) The -n and -b options also apply to tags used in *EXPR*.
1564
+
1565
+ 2) Some binary data blocks are not extracted unless specified
1566
+ explicitly. These tags are not available for use in the -if
1567
+ condition unless they are also specified on the command line. The
1568
+ alternative is to use the $GROUP:all syntax. (eg. Use $exif:all
1569
+ instead of $exif in *EXPR* to test for the existence of EXIF tags.)
1570
+
1571
+ 3) Tags in the string are interpolated in a similar way to -p
1572
+ before the expression is evaluated. In this interpolation, $/ is
1573
+ converted to a newline and $$ represents a single "$" symbol. So
1574
+ Perl variables, if used, require a double "$", and regular
1575
+ expressions ending in $/ must use $$/ instead.
1576
+
1577
+ 4) The condition accesses only tags from the file being processed
1578
+ unless the -fileNUM option is used to read an alternate file and
1579
+ the corresponding family 8 group name is specified for the tag. See
1580
+ the -fileNUM option details for more information.
1581
+
1582
+ 5) The -a option has no effect on the evaluation of the expression,
1583
+ and the values of duplicate tags are accessible only by specifying
1584
+ a group name (such as a family 4 instance number, eg. $Copy1:TAG,
1585
+ $Copy2:TAG, etc).
1586
+
1587
+ 6) A special "OK" UserParam is available to test the success of the
1588
+ previous command when -execute was used, and may be used like any
1589
+ other tag in the condition (ie. "$OK").
1590
+
1591
+ 7) The API RequestTags option is automatically set for all tags
1592
+ used in the -if condition.
1593
+
1594
+ -m (-ignoreMinorErrors)
1595
+ Ignore minor errors and warnings. This enables writing to files
1596
+ with minor errors and disables some validation checks which could
1597
+ result in minor warnings. Generally, minor errors/warnings indicate
1598
+ a problem which usually won't result in loss of metadata if
1599
+ ignored. However, there are exceptions, so ExifTool leaves it up to
1600
+ you to make the final decision. Minor errors and warnings are
1601
+ indicated by "[minor]" at the start of the message. Warnings which
1602
+ affect processing when ignored are indicated by "[Minor]" (with a
1603
+ capital "M"). Note that this causes missing values in
1604
+ -tagsFromFile, -p and -if strings to be set to an empty string
1605
+ rather than an undefined value.
1606
+
1607
+ -o *OUTFILE* or *FMT* (-out)
1608
+ Set the output file or directory name when writing information.
1609
+ Without this option, when any "real" tags are written the original
1610
+ file is renamed to "FILE_original" and output is written to *FILE*.
1611
+ When writing only FileName and/or Directory "pseudo" tags, -o
1612
+ causes the file to be copied instead of moved, but directories
1613
+ specified for either of these tags take precedence over that
1614
+ specified by the -o option.
1615
+
1616
+ *OUTFILE* may be "-" to write to stdout. The output file name may
1617
+ also be specified using a *FMT* string in which %d, %f and %e
1618
+ represent the directory, file name and extension of *FILE*. Also,
1619
+ %c may be used to add a copy number. See the -w option for *FMT*
1620
+ string examples.
1621
+
1622
+ The output file is taken to be a directory name if it already
1623
+ exists as a directory or if the name ends with '/'. Output
1624
+ directories are created if necessary. Existing files will not be
1625
+ overwritten. Combining the -overwrite_original option with -o
1626
+ causes the original source file to be erased after the output file
1627
+ is successfully written.
1628
+
1629
+ A special feature of this option allows the creation of certain
1630
+ types of files from scratch, or with the metadata from another type
1631
+ of file. The following file types may be created using this
1632
+ technique:
1633
+
1634
+ XMP, EXIF, EXV, MIE, ICC/ICM, VRD, DR4
1635
+
1636
+ The output file type is determined by the extension of *OUTFILE*
1637
+ (specified as "-.EXT" when writing to stdout). The output file is
1638
+ then created from a combination of information in *FILE* (as if the
1639
+ -tagsFromFile option was used), and tag values assigned on the
1640
+ command line. If no *FILE* is specified, the output file may be
1641
+ created from scratch using only tags assigned on the command line.
1642
+
1643
+ -overwrite_original
1644
+ Overwrite the original *FILE* (instead of preserving it by adding
1645
+ "_original" to the file name) when writing information to an image.
1646
+ Caution: This option should only be used if you already have
1647
+ separate backup copies of your image files. The overwrite is
1648
+ implemented by renaming a temporary file to replace the original.
1649
+ This deletes the original file and replaces it with the edited
1650
+ version in a single operation. When combined with -o, this option
1651
+ causes the original file to be deleted if the output file was
1652
+ successfully written (ie. the file is moved instead of copied).
1653
+
1654
+ -overwrite_original_in_place
1655
+ Similar to -overwrite_original except that an extra step is added
1656
+ to allow the original file attributes to be preserved. For example,
1657
+ on a Mac this causes the original file creation date, type,
1658
+ creator, label color, icon, Finder tags, other extended attributes
1659
+ and hard links to the file to be preserved (but note that the Mac
1660
+ OS resource fork is always preserved unless specifically deleted
1661
+ with "-rsrc:all="). This is implemented by opening the original
1662
+ file in update mode and replacing its data with a copy of a
1663
+ temporary file before deleting the temporary. The extra step
1664
+ results in slower performance, so the -overwrite_original option
1665
+ should be used instead unless necessary.
1666
+
1667
+ Note that this option reverts to the behaviour of the
1668
+ -overwrite_original option when also writing the FileName and/or
1669
+ Directory tags.
1670
+
1671
+ -P (-preserve)
1672
+ Preserve the filesystem modification date/time ("FileModifyDate")
1673
+ of the original file when writing. Note that some filesystems store
1674
+ a creation date (ie. "FileCreateDate" on Windows and Mac systems)
1675
+ which is not affected by this option. This creation date is
1676
+ preserved on Windows systems where Win32API::File and Win32::API
1677
+ are available regardless of this setting. For other systems, the
1678
+ -overwrite_original_in_place option may be used if necessary to
1679
+ preserve the creation date. The -P option is superseded by any
1680
+ value written to the FileModifyDate tag.
1681
+
1682
+ -password *PASSWD*
1683
+ Specify password to allow processing of password-protected PDF
1684
+ documents. If a password is required but not given, a warning is
1685
+ issued and the document is not processed. This option is ignored if
1686
+ a password is not required.
1687
+
1688
+ -progress[NUM][:[*TITLE*]]
1689
+ Show the progress when processing files. Without a colon, the
1690
+ -progress option adds a progress count in brackets after the name
1691
+ of each processed file, giving the current file number and the
1692
+ total number of files to be processed. Implies the -v0 option,
1693
+ causing the names of processed files to also be printed when
1694
+ writing. When combined with the -if option, the total count
1695
+ includes all files before the condition is applied, but files that
1696
+ fail the condition will not have their names printed. If NUM is
1697
+ specified, the progress is shown every NUM input files.
1698
+
1699
+ If followed by a colon (ie. -progress:), the console window title
1700
+ is set according to the specified *TITLE* string. If no *TITLE* is
1701
+ given, a default *TITLE* string of "ExifTool %p%%" is assumed. In
1702
+ the string, %f represents the file name, %p is the progress as a
1703
+ percent, %r is the progress as a ratio, %##b is a progress bar of
1704
+ width "##" (where "##" is an integer specifying the bar width in
1705
+ characters, or 20 characters by default if "##" is omitted), and %%
1706
+ is a % character. May be combined with the normal -progress option
1707
+ to also show the progress count in console messages. (Note: For
1708
+ this feature to function correctly on Mac/Linux, stderr must go to
1709
+ the console.)
1710
+
1711
+ -q (-quiet)
1712
+ Quiet processing. One -q suppresses normal informational messages,
1713
+ and a second -q suppresses warnings as well. Error messages can not
1714
+ be suppressed, although minor errors may be downgraded to warnings
1715
+ with the -m option, which may then be suppressed with "-q -q".
1716
+
1717
+ -r[.] (-recurse)
1718
+ Recursively process files in subdirectories. Only meaningful if
1719
+ *FILE* is a directory name. Subdirectories with names beginning
1720
+ with "." are not processed unless "." is added to the option name
1721
+ (ie. -r. or -recurse.). By default, exiftool will also follow
1722
+ symbolic links to directories if supported by the system, but this
1723
+ may be disabled with "-i SYMLINKS" (see the -i option for details).
1724
+ Combine this with -ext options to control the types of files
1725
+ processed.
1726
+
1727
+ -scanForXMP
1728
+ Scan all files (even unsupported formats) for XMP information
1729
+ unless found already. When combined with the -fast option, only
1730
+ unsupported file types are scanned. Warning: It can be time
1731
+ consuming to scan large files.
1732
+
1733
+ -u (-unknown)
1734
+ Extract values of unknown tags. Add another -u to also extract
1735
+ unknown information from binary data blocks. This option applies to
1736
+ tags with numerical tag ID's, and causes tag names like
1737
+ "Exif_0xc5d9" to be generated for unknown information. It has no
1738
+ effect on information types which have human-readable tag ID's
1739
+ (such as XMP), since unknown tags are extracted automatically from
1740
+ these formats.
1741
+
1742
+ -U (-unknown2)
1743
+ Extract values of unknown tags as well as unknown information from
1744
+ some binary data blocks. This is the same as two -u options.
1745
+
1746
+ -wm *MODE* (-writeMode)
1747
+ Set mode for writing/creating tags. *MODE* is a string of one or
1748
+ more characters from the list below. The default write mode is
1749
+ "wcg".
1750
+
1751
+ w - Write existing tags
1752
+ c - Create new tags
1753
+ g - create new Groups as necessary
1754
+
1755
+ For example, use "-wm cg" to only create new tags (and avoid
1756
+ editing existing ones).
1757
+
1758
+ The level of the group is the SubDirectory level in the metadata
1759
+ structure. For XMP or IPTC this is the full XMP/IPTC block (the
1760
+ family 0 group), but for EXIF this is the individual IFD (the
1761
+ family 1 group).
1762
+
1763
+ -z (-zip)
1764
+ When reading, causes information to be extracted from .gz and .bz2
1765
+ compressed images (only one image per archive; requires gzip and
1766
+ bzip2 to be available). When writing, causes compressed information
1767
+ to be written if supported by the metadata format (eg. PNG supports
1768
+ compressed textual metadata, JXL supports compressed EXIF and XML,
1769
+ and MIE supports any compressed metadata), disables the recommended
1770
+ padding in embedded XMP (saving 2424 bytes when writing XMP in a
1771
+ file), and writes XMP in shorthand format -- the equivalent of
1772
+ setting the API Compress=1 and Compact="NoPadding,Shorthand".
1773
+
1774
+ Other options
1775
+ -@ *ARGFILE*
1776
+ Read command-line arguments from the specified file. The file
1777
+ contains one argument per line (NOT one option per line -- some
1778
+ options require additional arguments, and all arguments must be
1779
+ placed on separate lines). Blank lines and lines beginning with "#"
1780
+ are ignored (unless they start with "#[CSTR]", in which case the
1781
+ rest of the line is treated as a C string, allowing standard C
1782
+ escape sequences such as "\n" for a newline). White space at the
1783
+ start of a line is removed. Normal shell processing of arguments is
1784
+ not performed, which among other things means that arguments should
1785
+ not be quoted and spaces are treated as any other character.
1786
+ *ARGFILE* may exist relative to either the current directory or the
1787
+ exiftool directory unless an absolute pathname is given.
1788
+
1789
+ For example, the following *ARGFILE* will set the value of
1790
+ Copyright to "Copyright YYYY, Phil Harvey", where "YYYY" is the
1791
+ year of CreateDate:
1792
+
1793
+ -d
1794
+ %Y
1795
+ -copyright<Copyright $createdate, Phil Harvey
1796
+
1797
+ Arguments in *ARGFILE* behave exactly the same as if they were
1798
+ entered at the location of the -@ option on the command line, with
1799
+ the exception that the -config and -common_args options may not be
1800
+ used in an *ARGFILE*.
1801
+
1802
+ -k (-pause)
1803
+ Pause with the message "-- press any key --" before terminating.
1804
+ This option is used to prevent the command window from closing when
1805
+ run as a Windows drag and drop application.
1806
+
1807
+ -list, -listw, -listf, -listr, -listwf, -listg[*NUM*], -listd, -listx,
1808
+ -listgeo
1809
+ Print a list of all valid tag names (-list), all writable tag names
1810
+ (-listw), all supported file extensions (-listf), all recognized
1811
+ file extensions (-listr), all writable file extensions (-listwf),
1812
+ all tag groups [in a specified family] (-listg[*NUM*]), all
1813
+ deletable tag groups (-listd), an XML database of tag details
1814
+ including language translations (-listx), or the Geolocation
1815
+ database (-listgeo). The -list, -listw and -listx options may be
1816
+ followed by an additional argument of the form "-GROUP:All" to list
1817
+ only tags in a specific group, where "GROUP" is one or more family
1818
+ 0-2 group names (excepting EXIF IFD groups) separated by colons.
1819
+ With -listg, *NUM* may be given to specify the group family,
1820
+ otherwise family 0 is assumed. The -l option may be combined with
1821
+ -listf, -listr or -listwf to add file descriptions to the list. The
1822
+ -lang option may be combined with -listx to output descriptions in
1823
+ a single language, and the -sort and/or -lang options may be
1824
+ combined with -listgeo. Also, the API GeolocMinPop, GeolocFeature
1825
+ and GeolocAltNames options apply to the -listgeo output. Here are
1826
+ some examples:
1827
+
1828
+ -list # list all tag names
1829
+ -list -EXIF:All # list all EXIF tags
1830
+ -list -xmp:time:all # list all XMP tags relating to time
1831
+ -listw -XMP-dc:All # list all writable XMP-dc tags
1832
+ -listf # list all supported file extensions
1833
+ -listr # list all recognized file extensions
1834
+ -listwf # list all writable file extensions
1835
+ -listg1 # list all groups in family 1
1836
+ -listd # list all deletable groups
1837
+ -listx -EXIF:All # list database of EXIF tags in XML format
1838
+ -listx -XMP:All -s # list short XML database of XMP tags
1839
+ -listgeo -lang de # list geolocation database in German
1840
+
1841
+ When combined with -listx, the -s option shortens the output by
1842
+ omitting the descriptions and values (as in the last example
1843
+ above), and -f adds 'flags' and 'struct' attributes if applicable.
1844
+ The flags are formatted as a comma-separated list of the following
1845
+ possible values: Avoid, Binary, List, Mandatory, Permanent,
1846
+ Protected, Unknown and Unsafe (see the Tag Name documentation). For
1847
+ XMP List tags, the list type (Alt, Bag or Seq) is added to the
1848
+ flags, and flattened structure tags are indicated by a Flattened
1849
+ flag with 'struct' giving the ID of the parent structure.
1850
+
1851
+ Note that none of the -list options require an input *FILE*.
1852
+
1853
+ -ver Print exiftool version number. The -v option may be added to print
1854
+ addition system information (see the README file of the full
1855
+ distribution for more details about optional libraries), or -v2 to
1856
+ also list the Perl include directories.
1857
+
1858
+ -- Indicates the end of options. Any remaining arguments are treated
1859
+ as file names, even if they begin with a dash ("-").
1860
+
1861
+ Special features
1862
+ -geotag *TRKFILE*
1863
+ Geotag images from the specified GPS track log file. Using the
1864
+ -geotag option is equivalent to writing a value to the "Geotag"
1865
+ tag. The GPS position is interpolated from the track at a time
1866
+ specified by the value written to the "Geotime" tag. If "Geotime"
1867
+ is not specified, the value is copied from "DateTimeOriginal#" (the
1868
+ "#" is added to copy the unformatted value, avoiding potential
1869
+ conflicts with the -d option). For example, the following two
1870
+ commands are equivalent:
1871
+
1872
+ exiftool -geotag trk.log image.jpg
1873
+ exiftool -geotag trk.log "-Geotime<DateTimeOriginal#" image.jpg
1874
+
1875
+ When the "Geotime" value is converted to UTC, the local system
1876
+ timezone is assumed unless the date/time value contains a timezone.
1877
+ Writing "Geotime" causes the following tags to be written (provided
1878
+ they can be calculated from the track log, and they are supported
1879
+ by the destination metadata format): GPSLatitude, GPSLatitudeRef,
1880
+ GPSLongitude, GPSLongitudeRef, GPSAltitude, GPSAltitudeRef,
1881
+ GPSDateStamp, GPSTimeStamp, GPSDateTime, GPSTrack, GPSTrackRef,
1882
+ GPSSpeed, GPSSpeedRef, GPSImgDirection, GPSImgDirectionRef,
1883
+ GPSPitch, GPSRoll, GPSCoordinates, AmbientTemperature and
1884
+ CameraElevationAngle. By default, in image files tags are created
1885
+ in EXIF, and updated in XMP only if they already exist. In
1886
+ QuickTime-format files GPSCoordinates is created in the preferred
1887
+ location (ItemList by default) as well as in XMP. However,
1888
+ "EXIF:Geotime", "XMP:Geotime" or "QuickTime:Geotime" may be
1889
+ specified to write to write only to one group. Also,
1890
+ "ItemList:Geotime", "Keys:Geotime" or "UserData:Geotime" may be
1891
+ used to write to a specific location in QuickTime-format files.
1892
+ Note that GPSPitch and GPSRoll are non-standard, and require
1893
+ user-defined tags in order to be written.
1894
+
1895
+ The "Geosync" tag may be used to specify a time correction which is
1896
+ applied to each "Geotime" value for synchronization with GPS time.
1897
+ For example, the following command compensates for image times
1898
+ which are 1 minute and 20 seconds behind GPS:
1899
+
1900
+ exiftool -geosync=+1:20 -geotag a.log DIR
1901
+
1902
+ Advanced "Geosync" features allow a piecewise linear time drift
1903
+ correction and synchronization from previously geotagged images.
1904
+ See "geotag.html" in the full ExifTool distribution for more
1905
+ information.
1906
+
1907
+ Multiple -geotag options may be used to concatenate GPS track log
1908
+ data. Also, a single -geotag option may be used to load multiple
1909
+ track log files by using wildcards in the *TRKFILE* name, but note
1910
+ that in this case *TRKFILE* must be quoted on most systems (with
1911
+ the notable exception of Windows) to prevent filename expansion.
1912
+ For example:
1913
+
1914
+ exiftool -geotag "TRACKDIR/*.log" IMAGEDIR
1915
+
1916
+ Currently supported track file formats are GPX, NMEA RMC/GGA/GLL,
1917
+ KML, IGC, Garmin XML and TCX, Magellan PMGNTRK, Honeywell PTNTHPR,
1918
+ Bramor gEO, Winplus Beacon TXT, and GPS/IMU CSV files. See
1919
+ "GEOTAGGING EXAMPLES" for examples. Also see "geotag.html" in the
1920
+ full ExifTool distribution and the Image::ExifTool Options for more
1921
+ details and for information about geotag configuration options.
1922
+
1923
+ The API Geolocation option may be set to the value "geotag" to also
1924
+ write the name, province/state and country of the nearest city
1925
+ while geotagging. See <https://exiftool.org/geolocation.html> for
1926
+ details.
1927
+
1928
+ -globalTimeShift *SHIFT*
1929
+ Shift all formatted date/time values by the specified amount when
1930
+ reading. Does not apply to unformatted (-n) output. *SHIFT* takes
1931
+ the same form as the date/time shift when writing (see
1932
+ Image::ExifTool::Shift.pl for details), with a negative shift being
1933
+ indicated with a minus sign ("-") at the start of the *SHIFT*
1934
+ string. For example:
1935
+
1936
+ # return all date/times, shifted back by 1 hour
1937
+ exiftool -globalTimeShift -1 -time:all a.jpg
1938
+
1939
+ # set the file name from the shifted CreateDate (-1 day) for
1940
+ # all images in a directory
1941
+ exiftool "-filename<createdate" -globaltimeshift "-0:0:1 0:0:0" \
1942
+ -d %Y%m%d-%H%M%S.%%e dir
1943
+
1944
+ -use *MODULE*
1945
+ Add features from specified plug-in *MODULE*. Currently, the MWG
1946
+ module is the only plug-in module distributed with exiftool. This
1947
+ module adds read/write support for tags as recommended by the
1948
+ Metadata Working Group. As a convenience, "-use MWG" is assumed if
1949
+ the group name prefix starts with "MWG:" exactly for any requested
1950
+ tag. See the MWG Tags documentation for more details. Note that
1951
+ this option is not reversible, and remains in effect until the
1952
+ application terminates, even across the -execute option.
1953
+
1954
+ Utilities
1955
+ -restore_original
1956
+ -delete_original[!]
1957
+ These utility options automate the maintenance of the "_original"
1958
+ files created by exiftool. They have no effect on files without an
1959
+ "_original" copy. The -restore_original option restores the
1960
+ specified files from their original copies by renaming the
1961
+ "_original" files to replace the edited versions. For example, the
1962
+ following command restores the originals of all JPG images in
1963
+ directory "DIR":
1964
+
1965
+ exiftool -restore_original -ext jpg DIR
1966
+
1967
+ The -delete_original option deletes the "_original" copies of all
1968
+ files specified on the command line. Without a trailing "!" this
1969
+ option prompts for confirmation before continuing. For example, the
1970
+ following command deletes "a.jpg_original" if it exists, after
1971
+ asking "Are you sure?":
1972
+
1973
+ exiftool -delete_original a.jpg
1974
+
1975
+ These options may not be used with other options to read or write
1976
+ tag values in the same command, but may be combined with options
1977
+ such -ext, -if, -r, -q and -v.
1978
+
1979
+ Advanced options
1980
+ Among other things, the advanced options allow complex processing to be
1981
+ performed from a single command without the need for additional
1982
+ scripting. This may be particularly useful for implementations such as
1983
+ Windows drag-and-drop applications. These options may also be used to
1984
+ improve performance in multi-pass processing by reducing the overhead
1985
+ required to load exiftool for each invocation.
1986
+
1987
+ -api [*OPT[[^]=[VAL]]*]
1988
+ Set ExifTool API option. *OPT* is an API option name. The option
1989
+ value is set to 1 if *=VAL* is omitted. If *VAL* is omitted, the
1990
+ option value is set to undef if "=" is used, or an empty string
1991
+ with "^=". If *OPT* is not specified a list of available options is
1992
+ returned. The option name is not case senstive, but the option
1993
+ values are. See Image::ExifTool Options for option details. This
1994
+ overrides API options set via the config file. Note that the
1995
+ exiftool app sets some API options internally, and attempts to
1996
+ change these via the command line will have no effect.
1997
+
1998
+ -common_args
1999
+ Specifies that all arguments following this option are common to
2000
+ all executed commands when -execute is used. This and the -config
2001
+ option are the only options that may not be used inside a -@
2002
+ *ARGFILE*. Note that by definition this option and its arguments
2003
+ MUST come after all other options on the command line.
2004
+
2005
+ -config *CFGFILE*
2006
+ Load specified configuration file instead of the default
2007
+ ".ExifTool_config". If used, this option must come before all other
2008
+ arguments on the command line and applies to all -execute'd
2009
+ commands. This file is used to create user-defined tags as well as
2010
+ set default ExifTool options. The *CFGFILE* must exist relative to
2011
+ the current working directory or the exiftool application directory
2012
+ unless an absolute path is specified. Loading of the default config
2013
+ file may be disabled by setting *CFGFILE* to an empty string (ie.
2014
+ ""). See <https://exiftool.org/config.html> and
2015
+ config_files/example.config in the full ExifTool distribution for
2016
+ details about the configuration file syntax.
2017
+
2018
+ -echo[*NUM*] *TEXT*
2019
+ Echo *TEXT* to stdout (-echo or -echo1) or stderr (-echo2). Text is
2020
+ output as the command line is parsed, before the processing of any
2021
+ input files. *NUM* may also be 3 or 4 to output text (to stdout or
2022
+ stderr respectively) after processing is complete. For -echo3 and
2023
+ -echo4, "${status}" may be used in the *TEXT* string to represent
2024
+ the numerical exit status of the command (see "EXIT STATUS").
2025
+
2026
+ -efile[*NUM*][!] *TXTFILE*
2027
+ Save the names of files giving errors (*NUM* missing or 1), files
2028
+ that were unchanged (*NUM* is 2), files that fail the -if condition
2029
+ (*NUM* is 4), files that were updated (*NUM* is 8), files that were
2030
+ created (*NUM* is 16), or any combination thereof by summing *NUM*
2031
+ (eg. -efile3 is the same has having both -efile and -efile2 options
2032
+ with the same *TXTFILE*). By default, file names are appended to
2033
+ any existing *TXTFILE*, but *TXTFILE* is overwritten if an
2034
+ exclamation point is added to the option (eg. -efile!). Saves the
2035
+ name of the file specified by the -srcfile option if applicable.
2036
+
2037
+ -execute[*NUM*]
2038
+ Execute command for all arguments up to this point on the command
2039
+ line (plus any arguments specified by -common_args). The result is
2040
+ as if the commands were executed as separate command lines (with
2041
+ the exception of the -config and -use options which remain in
2042
+ effect for subsequent commands). Allows multiple commands to be
2043
+ executed from a single command line. *NUM* is an optional number
2044
+ that is echoed in the "{ready}" message when using the -stay_open
2045
+ feature. If a *NUM* is specified, the -q option no longer
2046
+ suppresses the output "{readyNUM}" message.
2047
+
2048
+ -file*NUM* *ALTFILE*
2049
+ Read tags from an alternate source file. Among other things, this
2050
+ allows tags from different files to be compared and combined using
2051
+ the -if and -p options. *NUM* is any string of digits. Tags from
2052
+ alternate files are accessed via the corresponding family 8 group
2053
+ name (eg. "File1:TAG" for the -file1 option, "File2:TAG" for
2054
+ -file2, etc). *ALTFILE* may contain filename formatting codes like
2055
+ the -w option (%d, %f, etc), and/or tag names with a leading "$"
2056
+ symbol to access tags from the source file in the same way as the
2057
+ -p option (so any other dollar symbol in the file name must be
2058
+ doubled, eg. "money$$.jpg"). For example, assuming that the
2059
+ OriginalFileName tag has been set in the edited file, a command to
2060
+ copy Rights from the original file could look like this:
2061
+
2062
+ exiftool -file1 '$originalfilename' '-rights<file1:rights' edited.jpg
2063
+
2064
+ Subtle note: If a -tagsFromFile option is used, tags in the
2065
+ *ALTFILE* argument come from the *SRCFILE* that applies to the
2066
+ first argument accessing tags from the corresponding "FileNUM"
2067
+ group.
2068
+
2069
+ User-defined Composite tags may access tags from alternate files
2070
+ using the appropriate (case-sensitive) family 8 group name.
2071
+
2072
+ -list_dir
2073
+ List directories themselves instead of their contents. This option
2074
+ effectively causes directories to be treated as normal files when
2075
+ reading and writing. For example, with this option the output of
2076
+ the "ls -la" command on Mac/Linux may be approximated by this
2077
+ exiftool command:
2078
+
2079
+ exiftool -list_dir -T -ls-l -api systemtags -fast5 .* *
2080
+
2081
+ (The -T option formats the output in tab-separated columns, -ls-l
2082
+ is a shortcut tag, the API SystemTags option is required to extract
2083
+ some necessary tags, and the -fast5 option is added for speed since
2084
+ only system tags are being extracted.)
2085
+
2086
+ -srcfile *FMT*
2087
+ Specify a different source file to be processed based on the name
2088
+ of the original *FILE*. This may be useful in some special
2089
+ situations for processing related preview images or sidecar files.
2090
+ See the -w option for a description of the *FMT* syntax. Note that
2091
+ file name *FMT* strings for all options are based on the original
2092
+ *FILE* specified from the command line, not the name of the source
2093
+ file specified by -srcfile.
2094
+
2095
+ For example, to copy metadata from NEF files to the corresponding
2096
+ JPG previews in a directory where other JPG images may exist:
2097
+
2098
+ exiftool -ext nef -tagsfromfile @ -srcfile %d%f.jpg dir
2099
+
2100
+ If more than one -srcfile option is specified, the files are tested
2101
+ in order and the first existing source file is processed. If none
2102
+ of the source files already exist, then exiftool uses the first
2103
+ -srcfile specified.
2104
+
2105
+ A *FMT* of "@" may be used to represent the original *FILE*, which
2106
+ may be useful when specifying multiple -srcfile options (eg. to
2107
+ fall back to processing the original *FILE* if no sidecar exists).
2108
+
2109
+ When this option is used, two special UserParam tags
2110
+ (OriginalFileName and OriginalDirectory) are generated to allow
2111
+ access to the original *FILE* name and directory.
2112
+
2113
+ -stay_open *FLAG*
2114
+ If *FLAG* is 1 or "True" (case insensitive), causes exiftool keep
2115
+ reading from the -@ *ARGFILE* even after reaching the end of file.
2116
+ This feature allows calling applications to pre-load exiftool, thus
2117
+ avoiding the overhead of loading exiftool for each command. The
2118
+ procedure is as follows:
2119
+
2120
+ 1) Execute "exiftool -stay_open True -@ *ARGFILE*", where *ARGFILE*
2121
+ is the name of an existing (possibly empty) argument file or "-" to
2122
+ pipe arguments from the standard input.
2123
+
2124
+ 2) Write exiftool command-line arguments to *ARGFILE*, one argument
2125
+ per line (see the -@ option for details).
2126
+
2127
+ 3) Write "-execute\n" to *ARGFILE*, where "\n" represents a newline
2128
+ sequence. (Note: You may need to flush your write buffers here if
2129
+ using buffered output.) ExifTool will then execute the command with
2130
+ the arguments received up to this point, send a "{ready}" message
2131
+ to stdout when done (unless the -q or -T option is used), and
2132
+ continue trying to read arguments for the next command from
2133
+ *ARGFILE*. To aid in command/response synchronization, any number
2134
+ appended to the -execute option is echoed in the "{ready}" message.
2135
+ For example, "-execute613" results in "{ready613}". When this
2136
+ number is added, -q no longer suppresses the "{ready}" message.
2137
+ (Also, see the -echo3 and -echo4 options for additional ways to
2138
+ pass signals back to your application.)
2139
+
2140
+ 4) Repeat steps 2 and 3 for each command.
2141
+
2142
+ 5) Write "-stay_open\nFalse\n" (or "-stay_open\n0\n") to *ARGFILE*
2143
+ when done. This will cause exiftool to process any remaining
2144
+ command-line arguments then exit normally.
2145
+
2146
+ The input *ARGFILE* may be changed at any time before step 5 above
2147
+ by writing the following lines to the currently open *ARGFILE*:
2148
+
2149
+ -stay_open
2150
+ True
2151
+ -@
2152
+ NEWARGFILE
2153
+
2154
+ This causes *ARGFILE* to be closed, and *NEWARGFILE* to be kept
2155
+ open. (Without the -stay_open here, exiftool would have returned to
2156
+ reading arguments from *ARGFILE* after reaching the end of
2157
+ *NEWARGFILE*.)
2158
+
2159
+ Note: When writing arguments to a disk file there is a delay of up
2160
+ to 0.01 seconds after writing "-execute\n" before exiftool starts
2161
+ processing the command. This delay may be avoided by sending a CONT
2162
+ signal to the exiftool process immediately after writing
2163
+ "-execute\n". (There is no associated delay when writing arguments
2164
+ via a pipe with "-@ -", so the signal is not necessary when using
2165
+ this technique.)
2166
+
2167
+ -userParam *PARAM[[^]=[VAL]]*
2168
+ Set user parameter. *PARAM* is an arbitrary user parameter name.
2169
+ This is an interface to the API UserParam option (see the
2170
+ Image::ExifTool Options documentation), and provides a method to
2171
+ access user-defined parameters in arguments to the -if and -p
2172
+ options as if they were any other tag. Appending a hash tag ("#")
2173
+ to *PARAM* (eg. "-userParam MyTag#=yes") also causes the parameter
2174
+ to be extracted as a normal tag in the UserParam group. Similar to
2175
+ the -api option, the parameter value is set to 1 if *=VAL* is
2176
+ omitted, undef if just *VAL* is omitted with "=", or an empty
2177
+ string if *VAL* is omitted with "^=".
2178
+
2179
+ exiftool -p "$test from $filename" -userparam test=Hello FILE
2180
+
2181
+ Advanced formatting feature
2182
+ An advanced formatting feature allows modification of the value of any
2183
+ tag interpolated within a -if or -p option argument, or a -tagsFromFile
2184
+ redirection string. Tag names within these strings are prefixed by a "$"
2185
+ symbol, and an arbitrary Perl expression may be applied to the tag value
2186
+ by placing braces around the tag name and inserting the expression after
2187
+ the name, separated by a semicolon (ie. "${TAG;EXPR}"). The expression
2188
+ acts on the value of the tag through the default input variable ($_),
2189
+ and has access to the full ExifTool API through the current ExifTool
2190
+ object ($self) and the tag key ($tag). It may contain any valid Perl
2191
+ code, including translation ("tr///") and substitution ("s///")
2192
+ operations, but note that braces within the expression must be balanced.
2193
+ The example below prints the camera Make with spaces translated to
2194
+ underlines, and multiple consecutive underlines replaced by a single
2195
+ underline:
2196
+
2197
+ exiftool -p "${make;tr/ /_/;s/__+/_/g}" image.jpg
2198
+
2199
+ An "@" may be added after the tag name to make the expression act on
2200
+ individual list items for list-type tags, simplifying list processing.
2201
+ Set $_ to undef to remove an item from the list. As an example, the
2202
+ following command returns all subjects not containing the string "xxx":
2203
+
2204
+ exiftool -p "${subject@;$_=undef if /xxx/}" image.jpg
2205
+
2206
+ A default expression of "tr(/\\?*:|"<>\0)()d" is assumed if the
2207
+ expression is empty (ie. "${TAG;}"). This removes the characters / \ ? *
2208
+ : | < > and null from the printed value. (These characters are illegal
2209
+ in Windows file names, so this feature is useful if tag values are used
2210
+ in file names.)
2211
+
2212
+ Helper functions
2213
+ "DateFmt"
2214
+
2215
+ Simplifies reformatting of individual date/time values. This function
2216
+ acts on a standard EXIF-formatted date/time value in $_ and formats it
2217
+ according to the specified format string (see the -d option). To avoid
2218
+ trying to reformat an already-formatted date/time value, a "#" must be
2219
+ added to the tag name (as in the example below) if the -d option is also
2220
+ used. For example:
2221
+
2222
+ exiftool -p "${createdate#;DateFmt('%Y-%m-%d_%H%M%S')}" a.jpg
2223
+
2224
+ "ShiftTime"
2225
+
2226
+ Shifts EXIF-formatted date/time string by a specified amount. Start with
2227
+ a leading minus sign to shift backwards in time. See
2228
+ Image::ExifTool::Shift.pl for details about shift syntax. For example,
2229
+ to shift a date/time value back by one year:
2230
+
2231
+ exiftool -p "${createdate;ShiftTime('-1:0:0 0')}" a.jpg
2232
+
2233
+ "NoDups"
2234
+
2235
+ Removes duplicate items from a list with a separator specified by the
2236
+ -sep option. This function is most useful when copying list-type tags.
2237
+ For example, the following command may be used to remove duplicate
2238
+ Keywords:
2239
+
2240
+ exiftool -sep "##" "-keywords<${keywords;NoDups}" a.jpg
2241
+
2242
+ The -sep option is necessary to split the string back into individual
2243
+ list items when writing to a list-type tag.
2244
+
2245
+ An optional flag argument may be set to 1 to cause "NoDups" to set $_ to
2246
+ undef if no duplicates existed, thus preventing the file from being
2247
+ rewritten unnecessarily:
2248
+
2249
+ exiftool -sep "##" "-keywords<${keywords;NoDups(1)}" a.jpg
2250
+
2251
+ Note that function names are case sensitive.
2252
+
2253
+ ExifTool 12.64 adds an API NoDups option which makes the NoDups helper
2254
+ function largely redundant, with all the functionality except the
2255
+ ability to avoid rewriting the file if there are no duplicates, but with
2256
+ the advantage the duplicates may be removed when accumulating list items
2257
+ from multiple sources. An equivalent to the above commands using this
2258
+ feature would be:
2259
+
2260
+ exiftool -tagsfromfile @ -keywords -api nodups a.jpg
2261
+
2262
+ "SetTags"
2263
+
2264
+ Used to set tags in extracted images. With no arguments, copies all tags
2265
+ from the source file to the embedded image:
2266
+
2267
+ exiftool -p '${previewimage;SetTags}' -b a.arw > preview.jpg
2268
+
2269
+ Arguments may be added to copy or set specific tags. Arguments take
2270
+ exactly the same form as those on the command line when copying or
2271
+ writing tags, but without the leading dash. For example:
2272
+
2273
+ exiftool -p '${previewimage;SetTags("comment=test","title<filename")}' ...
2274
+
2275
+ WINDOWS UNICODE FILE NAMES
2276
+ In Windows, command-line arguments are specified using the current code
2277
+ page and are recoded automatically to the system code page. This
2278
+ recoding is not done for arguments in ExifTool arg files, so by default
2279
+ filenames in arg files use the system code page. Unfortunately, these
2280
+ code pages are not complete character sets, so not all file names may be
2281
+ represented.
2282
+
2283
+ ExifTool 9.79 and later allow the file name encoding to be specified
2284
+ with "-charset filename=CHARSET", where "CHARSET" is the name of a valid
2285
+ ExifTool character set, preferably "UTF8" (see the -charset option for a
2286
+ complete list). Setting this triggers the use of Windows wide-character
2287
+ i/o routines, thus providing support for most Unicode file names (see
2288
+ note 4). But note that it is not trivial to pass properly encoded file
2289
+ names on the Windows command line (see
2290
+ <https://exiftool.org/faq.html#Q18> for details), so placing them in a
2291
+ UTF-8 encoded -@ argfile and using "-charset filename=utf8" is
2292
+ recommended if possible.
2293
+
2294
+ A warning is issued if a specified filename contains special characters
2295
+ and the filename character set was not provided. However, the warning
2296
+ may be disabled by setting "-charset filename=""", and ExifTool may
2297
+ still function correctly if the system code page matches the character
2298
+ set used for the file names.
2299
+
2300
+ When a directory name is provided, the file name encoding need not be
2301
+ specified (unless the directory name contains special characters), and
2302
+ ExifTool will automatically use wide-character routines to scan the
2303
+ directory.
2304
+
2305
+ The filename character set applies to the *FILE* arguments as well as
2306
+ filename arguments of -@, -geotag, -o, -p, -srcfile, -tagsFromFile,
2307
+ -csv=, -j= and -*TAG*<=. However, it does not apply to the -config
2308
+ filename, which always uses the system character set. The "-charset
2309
+ filename=" option must come before the -@ option to be effective, but
2310
+ the order doesn't matter with respect to other options.
2311
+
2312
+ Notes:
2313
+
2314
+ 1) FileName and Directory tag values still use the same encoding as
2315
+ other tag values, and are converted to/from the filename character set
2316
+ when writing/reading if specified.
2317
+
2318
+ 2) Unicode support is not yet implemented for other Windows-based
2319
+ systems like Cygwin.
2320
+
2321
+ 3) See "WRITING READ-ONLY FILES" below for a note about editing
2322
+ read-only files with Unicode names.
2323
+
2324
+ 4) Unicode file names with surrogate pairs (code points over U+FFFF)
2325
+ still cause problems.
2326
+
2327
+ WRITING READ-ONLY FILES
2328
+ In general, ExifTool may be used to write metadata to read-only files
2329
+ provided that the user has write permission in the directory. However,
2330
+ there are three cases where file write permission is also required:
2331
+
2332
+ 1) When using the -overwrite_original_in_place option.
2333
+
2334
+ 2) When writing only pseudo System tags (eg. FileModifyDate).
2335
+
2336
+ 3) On Windows if the file has Unicode characters in its name, and a) the
2337
+ -overwrite_original option is used, or b) the "_original" backup already
2338
+ exists.
2339
+
2340
+ Hidden files in Windows behave as read-only files when attempting to
2341
+ write any real tags to the file -- an error is generated when using the
2342
+ -overwrite_original_in_place, otherwise writing should be successful and
2343
+ the hidden attribute will be removed. But the -if option may be used to
2344
+ avoid processing hidden files (provided Win32API::File is available):
2345
+
2346
+ exiftool -if "$fileattributes !~ /Hidden/" ...
2347
+
2348
+ READING EXAMPLES
2349
+ exiftool -a -u -g1 a.jpg
2350
+ Print all meta information in an image, including duplicate and
2351
+ unknown tags, sorted by group (for family 1). For performance
2352
+ reasons, this command may not extract all available metadata.
2353
+ (Metadata in embedded documents, metadata extracted by external
2354
+ utilities, and metadata requiring excessive processing time may not
2355
+ be extracted). Add "-ee3" and "-api RequestAll=3" to the command to
2356
+ extract absolutely everything available.
2357
+
2358
+ exiftool -common dir
2359
+ Print common meta information for all images in "dir". "-common" is
2360
+ a shortcut tag representing common EXIF meta information.
2361
+
2362
+ exiftool -T -createdate -aperture -shutterspeed -iso dir > out.txt
2363
+ List specified meta information in tab-delimited column form for
2364
+ all images in "dir" to an output text file named "out.txt".
2365
+
2366
+ exiftool -s -ImageSize -ExposureTime b.jpg
2367
+ Print ImageSize and ExposureTime tag names and values.
2368
+
2369
+ exiftool -l -canon c.jpg d.jpg
2370
+ Print standard Canon information from two image files.
2371
+
2372
+ exiftool -r -w .txt -common pictures
2373
+ Recursively extract common meta information from files in
2374
+ "pictures" directory, writing text output to ".txt" files with the
2375
+ same names.
2376
+
2377
+ exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg
2378
+ Save thumbnail image from "image.jpg" to a file called
2379
+ "thumbnail.jpg".
2380
+
2381
+ exiftool -b -JpgFromRaw -w _JFR.JPG -ext NEF -r .
2382
+ Recursively extract JPG image from all Nikon NEF files in the
2383
+ current directory, adding "_JFR.JPG" for the name of the output JPG
2384
+ files.
2385
+
2386
+ exiftool -a -b -W %d%f_%t%-c.%s -preview:all dir
2387
+ Extract all types of preview images (ThumbnailImage, PreviewImage,
2388
+ JpgFromRaw, etc.) from files in directory "dir", adding the tag
2389
+ name to the output preview image file names.
2390
+
2391
+ exiftool -d "%r %a, %B %e, %Y" -DateTimeOriginal -S -s -ext jpg .
2392
+ Print formatted date/time for all JPG files in the current
2393
+ directory.
2394
+
2395
+ exiftool -IFD1:XResolution -IFD1:YResolution image.jpg
2396
+ Extract image resolution from EXIF IFD1 information (thumbnail
2397
+ image IFD).
2398
+
2399
+ exiftool "-*resolution*" image.jpg
2400
+ Extract all tags with names containing the word "Resolution" from
2401
+ an image.
2402
+
2403
+ exiftool -xmp:author:all -a image.jpg
2404
+ Extract all author-related XMP information from an image.
2405
+
2406
+ exiftool -xmp -b a.jpg > out.xmp
2407
+ Extract complete XMP data record intact from "a.jpg" and write it
2408
+ to "out.xmp" using the special "XMP" tag (see the Extra tags in
2409
+ Image::ExifTool::TagNames).
2410
+
2411
+ exiftool -p "$filename has date $dateTimeOriginal" -q -f dir
2412
+ Print one line of output containing the file name and
2413
+ DateTimeOriginal for each image in directory "dir".
2414
+
2415
+ exiftool -ee3 -p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts
2416
+ Extract all GPS positions from an AVCHD video.
2417
+
2418
+ exiftool -icc_profile -b -w icc image.jpg
2419
+ Save complete ICC_Profile from an image to an output file with the
2420
+ same name and an extension of ".icc".
2421
+
2422
+ exiftool -htmldump -w tmp/%f_%e.html t/images
2423
+ Generate HTML pages from a hex dump of EXIF information in all
2424
+ images from the "t/images" directory. The output HTML files are
2425
+ written to the "tmp" directory (which is created if it didn't
2426
+ exist), with names of the form "FILENAME_EXT.html".
2427
+
2428
+ exiftool -a -b -ee -embeddedimage -W Image_%.3g3.%s file.pdf
2429
+ Extract embedded JPG and JP2 images from a PDF file. The output
2430
+ images will have file names like "Image_#.jpg" or "Image_#.jp2",
2431
+ where "#" is the ExifTool family 3 embedded document number for the
2432
+ image.
2433
+
2434
+ WRITING EXAMPLES
2435
+ Note that quotes are necessary around arguments which contain certain
2436
+ special characters such as ">", "<" or any white space. These quoting
2437
+ techniques are shell dependent, but the examples below will work in
2438
+ the Windows CMD shell.
2439
+
2440
+ exiftool -Comment="This is a new comment" dst.jpg
2441
+ Write new comment to a JPG image (replaces any existing comment).
2442
+
2443
+ exiftool -comment= -o newdir -ext jpg .
2444
+ Remove comment from all JPG images in the current directory,
2445
+ writing the modified images to a new directory.
2446
+
2447
+ exiftool -keywords=EXIF -keywords=editor dst.jpg
2448
+ Replace existing keyword list with two new keywords ("EXIF" and
2449
+ "editor").
2450
+
2451
+ exiftool -Keywords+=word -o newfile.jpg src.jpg
2452
+ Copy a source image to a new file, and add a keyword ("word") to
2453
+ the current list of keywords.
2454
+
2455
+ exiftool -exposurecompensation+=-0.5 a.jpg
2456
+ Decrement the value of ExposureCompensation by 0.5 EV. Note that +=
2457
+ with a negative value is used for decrementing because the -=
2458
+ operator is used for conditional deletion (see next example).
2459
+
2460
+ exiftool -credit-=xxx dir
2461
+ Delete Credit information from all files in a directory where the
2462
+ Credit value was "xxx".
2463
+
2464
+ exiftool -xmp:description-de="k&uuml;hl" -E dst.jpg
2465
+ Write alternate language for XMP:Description, using HTML character
2466
+ escaping to input special characters.
2467
+
2468
+ exiftool -all= dst.jpg
2469
+ Delete all meta information from an image. Note: You should NOT do
2470
+ this to RAW images (except DNG) since proprietary RAW image formats
2471
+ often contain information in the makernotes that is necessary for
2472
+ converting the image.
2473
+
2474
+ exiftool -all= -comment="lonely" dst.jpg
2475
+ Delete all meta information from an image and add a comment back
2476
+ in. (Note that the order is important: -comment="lonely" -all=
2477
+ would also delete the new comment.)
2478
+
2479
+ exiftool -all= --jfif:all dst.jpg
2480
+ Delete all meta information except JFIF group from an image.
2481
+
2482
+ exiftool -Photoshop:All= dst.jpg
2483
+ Delete Photoshop meta information from an image (note that the
2484
+ Photoshop information also includes IPTC).
2485
+
2486
+ exiftool -r -XMP-crss:all= DIR
2487
+ Recursively delete all XMP-crss information from images in a
2488
+ directory.
2489
+
2490
+ exiftool "-ThumbnailImage<=thumb.jpg" dst.jpg
2491
+ Set the thumbnail image from specified file (Note: The quotes are
2492
+ necessary to prevent shell redirection).
2493
+
2494
+ exiftool "-JpgFromRaw<=%d%f_JFR.JPG" -ext NEF -r .
2495
+ Recursively write JPEG images with filenames ending in "_JFR.JPG"
2496
+ to the JpgFromRaw tag of like-named files with extension ".NEF" in
2497
+ the current directory. (This is the inverse of the "-JpgFromRaw"
2498
+ command of the "READING EXAMPLES" section above.)
2499
+
2500
+ exiftool -DateTimeOriginal-="0:0:0 1:30:0" dir
2501
+ Adjust original date/time of all images in directory "dir" by
2502
+ subtracting one hour and 30 minutes. (This is equivalent to
2503
+ "-DateTimeOriginal-=1.5". See Image::ExifTool::Shift.pl for
2504
+ details.)
2505
+
2506
+ exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg
2507
+ Add 3 hours to the CreateDate and ModifyDate timestamps of two
2508
+ images.
2509
+
2510
+ exiftool -AllDates+=1:30 -if "$make eq 'Canon'" dir
2511
+ Shift the values of DateTimeOriginal, CreateDate and ModifyDate
2512
+ forward by 1 hour and 30 minutes for all Canon images in a
2513
+ directory. (The AllDates tag is provided as a shortcut for these
2514
+ three tags, allowing them to be accessed via a single tag.)
2515
+
2516
+ exiftool -xmp:city=Kingston image1.jpg image2.nef
2517
+ Write a tag to the XMP group of two images. (Without the "xmp:"
2518
+ this tag would get written to the IPTC group since "City" exists in
2519
+ both, and IPTC is preferred by default.)
2520
+
2521
+ exiftool -LightSource-="Unknown (0)" dst.tiff
2522
+ Delete "LightSource" tag only if it is unknown with a value of 0.
2523
+
2524
+ exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg
2525
+ Set "WhiteBalance" to "Tungsten" only if it was previously "Auto".
2526
+
2527
+ exiftool -comment-= -comment="new comment" a.jpg
2528
+ Write a new comment only if the image doesn't have one already.
2529
+
2530
+ exiftool -o %d%f.xmp dir
2531
+ Create XMP meta information data files for all images in "dir".
2532
+
2533
+ exiftool -o test.xmp -owner=Phil -title="XMP File"
2534
+ Create an XMP data file only from tags defined on the command line.
2535
+
2536
+ exiftool "-ICC_Profile<=%d%f.icc" image.jpg
2537
+ Write ICC_Profile to an image from a ".icc" file of the same name.
2538
+
2539
+ exiftool -hierarchicalkeywords="{keyword=one,children={keyword=B}}"
2540
+ Write structured XMP information. See
2541
+ <https://exiftool.org/struct.html> for more details.
2542
+
2543
+ exiftool -trailer:all= image.jpg
2544
+ Delete any trailer found after the end of image (EOI) in a JPEG
2545
+ file. A number of digital cameras store a large PreviewImage after
2546
+ the JPEG EOI, and the file size may be reduced significantly by
2547
+ deleting this trailer. See the JPEG Tags documentation for a list
2548
+ of recognized JPEG trailers.
2549
+
2550
+ COPYING EXAMPLES
2551
+ These examples demonstrate the ability to copy tag values between files.
2552
+
2553
+ exiftool -tagsFromFile src.cr2 dst.jpg
2554
+ Copy the values of all writable tags from "src.cr2" to "dst.jpg",
2555
+ writing the information to same-named tags in the preferred groups.
2556
+
2557
+ exiftool -TagsFromFile src.jpg -all:all dst.jpg
2558
+ Copy the values of all writable tags from "src.jpg" to "dst.jpg",
2559
+ preserving the original tag groups.
2560
+
2561
+ exiftool -all= -tagsfromfile src.jpg -exif:all dst.jpg
2562
+ Erase all meta information from "dst.jpg" image, then copy EXIF
2563
+ tags from "src.jpg".
2564
+
2565
+ exiftool -exif:all= -tagsfromfile @ -all:all -unsafe bad.jpg
2566
+ Rebuild all EXIF meta information from scratch in an image. This
2567
+ technique can be used in JPEG images to repair corrupted EXIF
2568
+ information which otherwise could not be written due to errors. The
2569
+ "Unsafe" tag is a shortcut for unsafe EXIF tags in JPEG images
2570
+ which are not normally copied. See the tag name documentation for
2571
+ more details about unsafe tags.
2572
+
2573
+ exiftool -Tagsfromfile a.jpg out.xmp
2574
+ Copy meta information from "a.jpg" to an XMP data file. If the XMP
2575
+ data file "out.xmp" already exists, it will be updated with the new
2576
+ information. Otherwise the XMP data file will be created. Only
2577
+ metadata-only files may be created like this (files containing
2578
+ images may be edited but not created). See "WRITING EXAMPLES" above
2579
+ for another technique to generate XMP files.
2580
+
2581
+ exiftool -tagsFromFile a.jpg -XMP:All= -ThumbnailImage= -m b.jpg
2582
+ Copy all meta information from "a.jpg" to "b.jpg", deleting all XMP
2583
+ information and the thumbnail image from the destination.
2584
+
2585
+ exiftool -TagsFromFile src.jpg -title -author=Phil dst.jpg
2586
+ Copy title from one image to another and set a new author name.
2587
+
2588
+ exiftool -TagsFromFile a.jpg -ISO -TagsFromFile b.jpg -comment dst.jpg
2589
+ Copy ISO from one image and Comment from another image to a
2590
+ destination image.
2591
+
2592
+ exiftool -tagsfromfile src.jpg -exif:all --subifd:all dst.jpg
2593
+ Copy only the EXIF information from one image to another, excluding
2594
+ SubIFD tags.
2595
+
2596
+ exiftool "-FileModifyDate<DateTimeOriginal" dir
2597
+ Use the original date from the meta information to set the same
2598
+ file's filesystem modification date for all images in a directory.
2599
+ (Note that "-TagsFromFile @" is assumed if no other -TagsFromFile
2600
+ is specified when redirecting information as in this example.)
2601
+
2602
+ exiftool -TagsFromFile src.jpg "-xmp:all<all" dst.jpg
2603
+ Copy all possible information from "src.jpg" and write in XMP
2604
+ format to "dst.jpg".
2605
+
2606
+ exiftool "-Description<${FileName;s/\.[^.]*$//}" dir
2607
+ Set the image Description from the file name after removing the
2608
+ extension. This example uses the "Advanced formatting feature" to
2609
+ perform a substitution operation to remove the last dot and
2610
+ subsequent characters from the file name.
2611
+
2612
+ exiftool -@ iptc2xmp.args -iptc:all= a.jpg
2613
+ Translate IPTC information to XMP with appropriate tag name
2614
+ conversions, and delete the original IPTC information from an
2615
+ image. This example uses iptc2xmp.args, which is a file included
2616
+ with the ExifTool distribution that contains the required arguments
2617
+ to convert IPTC information to XMP format. Also included with the
2618
+ distribution are xmp2iptc.args (which performs the inverse
2619
+ conversion) and a few more .args files for other conversions
2620
+ between EXIF, IPTC and XMP.
2621
+
2622
+ exiftool -tagsfromfile %d%f.CR2 -r -ext JPG dir
2623
+ Recursively rewrite all "JPG" images in "dir" with information
2624
+ copied from the corresponding "CR2" images in the same directories.
2625
+
2626
+ exiftool "-keywords+<make" image.jpg
2627
+ Add camera make to list of keywords.
2628
+
2629
+ exiftool "-comment<ISO=$exif:iso Exposure=${shutterspeed}" dir
2630
+ Set the Comment tag of all images in "dir" from the values of the
2631
+ EXIF:ISO and ShutterSpeed tags. The resulting comment will be in
2632
+ the form "ISO=100 Exposure=1/60".
2633
+
2634
+ exiftool -TagsFromFile src.jpg -icc_profile dst.jpg
2635
+ Copy ICC_Profile from one image to another.
2636
+
2637
+ exiftool -TagsFromFile src.jpg -all:all dst.mie
2638
+ Copy all meta information in its original form from a JPEG image to
2639
+ a MIE file. The MIE file will be created if it doesn't exist. This
2640
+ technique can be used to store the metadata of an image so it can
2641
+ be inserted back into the image (with the inverse command) later in
2642
+ a workflow.
2643
+
2644
+ exiftool -o dst.mie -all:all src.jpg
2645
+ This command performs exactly the same task as the command above,
2646
+ except that the -o option will not write to an output file that
2647
+ already exists.
2648
+
2649
+ exiftool -b -jpgfromraw -w %d%f_%ue.jpg -execute -b -previewimage -w
2650
+ %d%f_%ue.jpg -execute -tagsfromfile @ -srcfile %d%f_%ue.jpg
2651
+ -overwrite_original -common_args --ext jpg DIR
2652
+ [Advanced] Extract JpgFromRaw or PreviewImage from all but JPG
2653
+ files in DIR, saving them with file names like "image_EXT.jpg",
2654
+ then add all meta information from the original files to the
2655
+ extracted images. Here, the command line is broken into three
2656
+ sections (separated by -execute options), and each is executed as
2657
+ if it were a separate command. The -common_args option causes the
2658
+ "--ext jpg DIR" arguments to be applied to all three commands, and
2659
+ the -srcfile option allows the extracted JPG image to be the source
2660
+ file for the third command (whereas the RAW files are the source
2661
+ files for the other two commands).
2662
+
2663
+ RENAMING EXAMPLES
2664
+ By writing the "FileName" and "Directory" tags, files are renamed and/or
2665
+ moved to new directories. This can be particularly useful and powerful
2666
+ for organizing files by date when combined with the -d option. New
2667
+ directories are created as necessary, but existing files will not be
2668
+ overwritten. The format codes %d, %f and %e may be used in the new file
2669
+ name to represent the directory, name and extension of the original
2670
+ file, and %c may be used to add a copy number if the file already exists
2671
+ (see the -w option for details). Note that if used within a date format
2672
+ string, an extra '%' must be added to pass these codes through the
2673
+ date/time parser. (And further note that in a Windows batch file, all
2674
+ '%' characters must also be escaped, so in this extreme case "%%%%f" is
2675
+ necessary to pass a simple "%f" through the two levels of parsing.) See
2676
+ <https://exiftool.org/filename.html> for additional documentation and
2677
+ examples.
2678
+
2679
+ exiftool -filename=new.jpg dir/old.jpg
2680
+ Rename "old.jpg" to "new.jpg" in directory "dir".
2681
+
2682
+ exiftool -directory=%e dir
2683
+ Move all files from directory "dir" into directories named by the
2684
+ original file extensions.
2685
+
2686
+ exiftool "-Directory<DateTimeOriginal" -d %Y/%m/%d dir
2687
+ Move all files in "dir" into a directory hierarchy based on year,
2688
+ month and day of "DateTimeOriginal". eg) This command would move
2689
+ the file "dir/image.jpg" with a "DateTimeOriginal" of "2005:10:12
2690
+ 16:05:56" to "2005/10/12/image.jpg".
2691
+
2692
+ exiftool -o . "-Directory<DateTimeOriginal" -d %Y/%m/%d dir
2693
+ Same effect as above except files are copied instead of moved.
2694
+
2695
+ exiftool "-filename<%f_${model;}.%e" dir
2696
+ Rename all files in "dir" by adding the camera model name to the
2697
+ file name. The semicolon after the tag name inside the braces
2698
+ causes characters which are invalid in Windows file names to be
2699
+ deleted from the tag value (see the "Advanced formatting feature"
2700
+ for an explanation).
2701
+
2702
+ exiftool "-FileName<CreateDate" -d %Y%m%d_%H%M%S%%-c.%%e dir
2703
+ Rename all images in "dir" according to the "CreateDate" date and
2704
+ time, adding a copy number with leading '-' if the file already
2705
+ exists ("%-c"), and preserving the original file extension (%e).
2706
+ Note the extra '%' necessary to escape the filename codes (%c and
2707
+ %e) in the date format string.
2708
+
2709
+ exiftool -r "-FileName<CreateDate" -d %Y-%m-%d/%H%M_%%f.%%e dir
2710
+ Both the directory and the filename may be changed together via the
2711
+ "FileName" tag if the new "FileName" contains a '/'. The example
2712
+ above recursively renames all images in a directory by adding a
2713
+ "CreateDate" timestamp to the start of the filename, then moves
2714
+ them into new directories named by date.
2715
+
2716
+ exiftool "-FileName<${CreateDate}_$filenumber.jpg" -d %Y%m%d -ext jpg .
2717
+ Set the filename of all JPG images in the current directory from
2718
+ the CreateDate and FileNumber tags, in the form
2719
+ "20060507_118-1861.jpg".
2720
+
2721
+ GEOTAGGING EXAMPLES
2722
+ ExifTool implements geotagging from GPS log files via 3 special tags:
2723
+ Geotag (which for convenience is also implemented as an exiftool
2724
+ option), Geosync and Geotime. The examples below highlight some
2725
+ geotagging features. See <https://exiftool.org/geotag.html> for
2726
+ additional documentation. (Note that geotagging from known GPS
2727
+ coordinates is done by writing the GPS tags directly rather than using
2728
+ the -geotag option.)
2729
+
2730
+ exiftool -geotag track.log a.jpg
2731
+ Geotag an image ("a.jpg") from position information in a GPS track
2732
+ log ("track.log"). Since the "Geotime" tag is not specified, the
2733
+ value of DateTimeOriginal is used for geotagging. Local system time
2734
+ is assumed unless DateTimeOriginal contains a timezone.
2735
+
2736
+ exiftool -geotag track.log -geolocate=geotag a.jpg
2737
+ Geotag an image and also write geolocation information of the
2738
+ nearest city (city name, state/province and country). Read here for
2739
+ more details about the Geolocation feature:
2740
+ <https://exiftool.org/geolocation.html#Write>
2741
+
2742
+ exiftool -geotag t.log -geotime="2009:04:02 13:41:12-05:00" a.jpg
2743
+ Geotag an image with the GPS position for a specific time.
2744
+
2745
+ exiftool -geotag log.gpx "-xmp:geotime<createdate" dir
2746
+ Geotag all images in directory "dir" with XMP tags instead of EXIF
2747
+ tags, based on the image CreateDate.
2748
+
2749
+ exiftool -geotag a.log -geosync=-20 dir
2750
+ Geotag images in directory "dir", accounting for image timestamps
2751
+ which were 20 seconds ahead of GPS.
2752
+
2753
+ exiftool -geotag a.log -geosync=1.jpg -geosync=2.jpg dir
2754
+ Geotag images using time synchronization from two previously
2755
+ geotagged images (1.jpg and 2.jpg), synchronizing the image and GPS
2756
+ times using a linear time drift correction.
2757
+
2758
+ exiftool -geotag a.log "-geotime<${createdate}+01:00" dir
2759
+ Geotag images in "dir" using CreateDate with the specified
2760
+ timezone. If CreateDate already contained a timezone, then the
2761
+ timezone specified on the command line is ignored.
2762
+
2763
+ exiftool -geotag= a.jpg
2764
+ Delete GPS tags which may have been added by the geotag feature.
2765
+ Note that this does not remove all GPS tags -- to do this instead
2766
+ use "-gps:all=".
2767
+
2768
+ exiftool -xmp:geotag= a.jpg
2769
+ Delete XMP GPS tags which were added by the geotag feature.
2770
+
2771
+ exiftool -xmp:geotag=track.log a.jpg
2772
+ Geotag an image with XMP tags, using the time from
2773
+ DateTimeOriginal.
2774
+
2775
+ exiftool -geotag a.log -geotag b.log -r dir
2776
+ Combine multiple track logs and geotag an entire directory tree of
2777
+ images.
2778
+
2779
+ exiftool -geotag "tracks/*.log" -r dir
2780
+ Read all track logs from the "tracks" directory.
2781
+
2782
+ exiftool -p gpx.fmt dir > out.gpx
2783
+ Generate a GPX track log from all images in directory "dir". This
2784
+ example uses the "gpx.fmt" file included in the full ExifTool
2785
+ distribution package and assumes that the images in "dir" have all
2786
+ been previously geotagged.
2787
+
2788
+ PIPING EXAMPLES
2789
+ type a.jpg | exiftool -
2790
+ Extract information from stdin.
2791
+
2792
+ exiftool image.jpg -thumbnailimage -b | exiftool -
2793
+ Extract information from an embedded thumbnail image.
2794
+
2795
+ type a.jpg | exiftool -iptc:keywords+=fantastic - > b.jpg
2796
+ Add an IPTC keyword in a pipeline, saving output to a new file.
2797
+
2798
+ curl -s http://a.domain.com/bigfile.jpg | exiftool -fast -
2799
+ Extract information from an image over the internet using the cURL
2800
+ utility. The -fast option prevents exiftool from scanning for
2801
+ trailer information, so only the meta information header is
2802
+ transferred.
2803
+
2804
+ exiftool a.jpg -thumbnailimage -b | exiftool -comment=wow - | exiftool
2805
+ a.jpg "-thumbnailimage<=-"
2806
+ Add a comment to an embedded thumbnail image. (Why anyone would
2807
+ want to do this I don't know, but I've included this as an example
2808
+ to illustrate the flexibility of ExifTool.)
2809
+
2810
+ INTERRUPTING EXIFTOOL
2811
+ Interrupting exiftool with a CTRL-C or SIGINT will not result in
2812
+ partially written files or temporary files remaining on the hard disk.
2813
+ The exiftool application traps SIGINT and defers it until the end of
2814
+ critical processes if necessary, then does a proper cleanup before
2815
+ exiting.
2816
+
2817
+ EXIT STATUS
2818
+ The exiftool application exits with a status of 0 on success, or 1 if an
2819
+ error occurred, or 2 if all files failed the -if condition (for any of
2820
+ the commands if -execute was used).
2821
+
2822
+ AUTHOR
2823
+ Copyright 2003-2024, Phil Harvey
2824
+
2825
+ This is free software; you can redistribute it and/or modify it under
2826
+ the same terms as Perl itself.
2827
+
2828
+ SEE ALSO
2829
+ Image::ExifTool(3pm), Image::ExifTool::TagNames(3pm),
2830
+ Image::ExifTool::Shortcuts(3pm), Image::ExifTool::Shift.pl
2831
+