exiftool-vendored.pl 13.34.0 → 13.34.1

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