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