1EXIFTOOL(1)           User Contributed Perl Documentation          EXIFTOOL(1)
2
3
4

NAME

6       exiftool - Read and write meta information in files
7

SYNOPSIS

9   Reading
10       exiftool [OPTIONS] [-TAG...] [--TAG...] FILE...
11
12   Writing
13       exiftool [OPTIONS] -TAG[+-<]=[VALUE]... FILE...
14
15   Copying
16       exiftool [OPTIONS] -tagsFromFile SRCFILE [-SRCTAG[>DSTTAG]...] FILE...
17
18   Other
19       exiftool [ -ver | -list[w|f|r|wf|g[NUM]|d|x] ]
20
21       For specific examples, see the EXAMPLES sections below.
22
23       This documentation is displayed if exiftool is run without an input
24       FILE when one is expected.
25

DESCRIPTION

27       A command-line interface to Image::ExifTool, used for reading and
28       writing meta information in a variety of file types.  FILE is one or
29       more source file names, directory names, or "-" for the standard input.
30       Metadata is read from source files and printed in readable form to the
31       console (or written to output text files with -w).
32
33       To write or delete metadata, tag values are assigned using
34       -TAG=[VALUE], and/or the -geotag, -csv= or -json= options.  To copy or
35       move metadata, the -tagsFromFile feature is used.  By default the
36       original files are preserved with "_original" appended to their names
37       -- be sure to verify that the new files are OK before erasing the
38       originals.  Once in write mode, exiftool will ignore any read-specific
39       options.
40
41       Note:  If FILE is a directory name then only supported file types in
42       the directory are processed (in write mode only writable types are
43       processed).  However, files may be specified by name, or the -ext
44       option may be used to force processing of files with any extension.
45       Hidden files in the directory are also processed.  Adding the -r option
46       causes subdirectories to be processed recursively, but subdirectories
47       with names beginning with "." are skipped unless -r. is used.
48
49       Below is a list of file types and meta information formats currently
50       supported by ExifTool (r = read, w = write, c = create):
51
52         File Types
53         ------------+-------------+-------------+-------------+------------
54         3FR   r     | DSS   r     | J2C   r     | ODS   r     | RSRC  r
55         3G2   r/w   | DV    r     | JNG   r/w   | ODT   r     | RTF   r
56         3GP   r/w   | DVB   r/w   | JP2   r/w   | OFR   r     | RW2   r/w
57         A     r     | DVR-MS r    | JPEG  r/w   | OGG   r     | RWL   r/w
58         AA    r     | DYLIB r     | JSON  r     | OGV   r     | RWZ   r
59         AAE   r     | EIP   r     | K25   r     | OPUS  r     | RM    r
60         AAX   r/w   | EPS   r/w   | KDC   r     | ORF   r/w   | SEQ   r
61         ACR   r     | EPUB  r     | KEY   r     | OTF   r     | SKETCH r
62         AFM   r     | ERF   r/w   | LA    r     | PAC   r     | SO    r
63         AI    r/w   | EXE   r     | LFP   r     | PAGES r     | SR2   r/w
64         AIFF  r     | EXIF  r/w/c | LNK   r     | PBM   r/w   | SRF   r
65         APE   r     | EXR   r     | LRV   r/w   | PCD   r     | SRW   r/w
66         ARQ   r/w   | EXV   r/w/c | M2TS  r     | PCX   r     | SVG   r
67         ARW   r/w   | F4A/V r/w   | M4A/V r/w   | PDB   r     | SWF   r
68         ASF   r     | FFF   r/w   | MAX   r     | PDF   r/w   | THM   r/w
69         AVI   r     | FITS  r     | MEF   r/w   | PEF   r/w   | TIFF  r/w
70         AVIF  r/w   | FLA   r     | MIE   r/w/c | PFA   r     | TORRENT r
71         AZW   r     | FLAC  r     | MIFF  r     | PFB   r     | TTC   r
72         BMP   r     | FLIF  r/w   | MKA   r     | PFM   r     | TTF   r
73         BPG   r     | FLV   r     | MKS   r     | PGF   r     | TXT   r
74         BTF   r     | FPF   r     | MKV   r     | PGM   r/w   | VCF   r
75         CHM   r     | FPX   r     | MNG   r/w   | PLIST r     | VRD   r/w/c
76         COS   r     | GIF   r/w   | MOBI  r     | PICT  r     | VSD   r
77         CR2   r/w   | GPR   r/w   | MODD  r     | PMP   r     | WAV   r
78         CR3   r/w   | GZ    r     | MOI   r     | PNG   r/w   | WDP   r/w
79         CRM   r/w   | HDP   r/w   | MOS   r/w   | PPM   r/w   | WEBP  r
80         CRW   r/w   | HDR   r     | MOV   r/w   | PPT   r     | WEBM  r
81         CS1   r/w   | HEIC  r/w   | MP3   r     | PPTX  r     | WMA   r
82         DCM   r     | HEIF  r/w   | MP4   r/w   | PS    r/w   | WMV   r
83         DCP   r/w   | HTML  r     | MPC   r     | PSB   r/w   | WTV   r
84         DCR   r     | ICC   r/w/c | MPG   r     | PSD   r/w   | WV    r
85         DFONT r     | ICS   r     | MPO   r/w   | PSP   r     | X3F   r/w
86         DIVX  r     | IDML  r     | MQV   r/w   | QTIF  r/w   | XCF   r
87         DJVU  r     | IIQ   r/w   | MRW   r/w   | R3D   r     | XLS   r
88         DLL   r     | IND   r/w   | MXF   r     | RA    r     | XLSX  r
89         DNG   r/w   | INSP  r/w   | NEF   r/w   | RAF   r/w   | XMP   r/w/c
90         DOC   r     | INSV  r     | NRW   r/w   | RAM   r     | ZIP   r
91         DOCX  r     | INX   r     | NUMBERS r   | RAR   r     |
92         DPX   r     | ISO   r     | O     r     | RAW   r/w   |
93         DR4   r/w/c | ITC   r     | ODP   r     | RIFF  r     |
94
95         Meta Information
96         ----------------------+----------------------+---------------------
97         EXIF           r/w/c  |  CIFF           r/w  |  Ricoh RMETA    r
98         GPS            r/w/c  |  AFCP           r/w  |  Picture Info   r
99         IPTC           r/w/c  |  Kodak Meta     r/w  |  Adobe APP14    r
100         XMP            r/w/c  |  FotoStation    r/w  |  MPF            r
101         MakerNotes     r/w/c  |  PhotoMechanic  r/w  |  Stim           r
102         Photoshop IRB  r/w/c  |  JPEG 2000      r    |  DPX            r
103         ICC Profile    r/w/c  |  DICOM          r    |  APE            r
104         MIE            r/w/c  |  Flash          r    |  Vorbis         r
105         JFIF           r/w/c  |  FlashPix       r    |  SPIFF          r
106         Ducky APP12    r/w/c  |  QuickTime      r    |  DjVu           r
107         PDF            r/w/c  |  Matroska       r    |  M2TS           r
108         PNG            r/w/c  |  MXF            r    |  PE/COFF        r
109         Canon VRD      r/w/c  |  PrintIM        r    |  AVCHD          r
110         Nikon Capture  r/w/c  |  FLAC           r    |  ZIP            r
111         GeoTIFF        r/w/c  |  ID3            r    |  (and more)
112

OPTIONS

114       Case is not significant for any command-line option (including tag and
115       group names), except for single-character options when the
116       corresponding upper-case option exists.  Many single-character options
117       have equivalent long-name versions (shown in brackets), and some
118       options have inverses which are invoked with a leading double-dash.
119       Unrecognized options are interpreted as tag names (for this reason,
120       multiple single-character options may NOT be combined into one
121       argument).  Contrary to standard practice, options may appear after
122       source file names on the exiftool command line.
123
124   Option Summary
125       Tag operations
126
127         -TAG or --TAG                    Extract or exclude specified tag
128         -TAG[+-^]=[VALUE]                Write new value for tag
129         -TAG[+-]<=DATFILE                Write tag value from contents of file
130         -TAG[+-]<SRCTAG                  Copy tag value (see -tagsFromFile)
131
132         -tagsFromFile SRCFILE            Copy tag values from file
133         -x TAG      (-exclude)           Exclude specified tag
134
135       Input-output text formatting
136
137         -args       (-argFormat)         Format metadata as exiftool arguments
138         -b          (-binary)            Output metadata in binary format
139         -c FMT      (-coordFormat)       Set format for GPS coordinates
140         -charset [[TYPE=]CHARSET]        Specify encoding for special characters
141         -csv[[+]=CSVFILE]                Export/import tags in CSV format
142         -d FMT      (-dateFormat)        Set format for date/time values
143         -D          (-decimal)           Show tag ID numbers in decimal
144         -E, -ex     (-escape(HTML|XML))  Escape values for HTML (-E) or XML (-ex)
145         -f          (-forcePrint)        Force printing of all specified tags
146         -g[NUM...]  (-groupHeadings)     Organize output by tag group
147         -G[NUM...]  (-groupNames)        Print group name for each tag
148         -h          (-htmlFormat)        Use HMTL formatting for output
149         -H          (-hex)               Show tag ID numbers in hexadecimal
150         -htmlDump[OFFSET]                Generate HTML-format binary dump
151         -j[[+]=JSONFILE] (-json)         Export/import tags in JSON format
152         -l          (-long)              Use long 2-line output format
153         -L          (-latin)             Use Windows Latin1 encoding
154         -lang [LANG]                     Set current language
155         -listItem INDEX                  Extract specific item from a list
156         -n          (--printConv)        No print conversion
157         -p FMTFILE  (-printFormat)       Print output in specified format
158         -php                             Export tags as a PHP Array
159         -s[NUM]     (-short)             Short output format
160         -S          (-veryShort)         Very short output format
161         -sep STR    (-separator)         Set separator string for list items
162         -sort                            Sort output alphabetically
163         -struct                          Enable output of structured information
164         -t          (-tab)               Output in tab-delimited list format
165         -T          (-table)             Output in tabular format
166         -v[NUM]     (-verbose)           Print verbose messages
167         -w[+|!] EXT (-textOut)           Write (or overwrite!) output text files
168         -W[+|!] FMT (-tagOut)            Write output text file for each tag
169         -Wext EXT   (-tagOutExt)         Write only specified file types with -W
170         -X          (-xmlFormat)         Use RDF/XML output format
171
172       Processing control
173
174         -a          (-duplicates)        Allow duplicate tags to be extracted
175         -e          (--composite)        Do not calculate composite tags
176         -ee         (-extractEmbedded)   Extract information from embedded files
177         -ext[+] EXT (-extension)         Process files with specified extension
178         -F[OFFSET]  (-fixBase)           Fix the base for maker notes offsets
179         -fast[NUM]                       Increase speed when extracting metadata
180         -fileOrder[NUM] [-]TAG           Set file processing order
181         -i DIR      (-ignore)            Ignore specified directory name
182         -if[NUM] EXPR                    Conditionally process files
183         -m          (-ignoreMinorErrors) Ignore minor errors and warnings
184         -o OUTFILE  (-out)               Set output file or directory name
185         -overwrite_original              Overwrite original by renaming tmp file
186         -overwrite_original_in_place     Overwrite original by copying tmp file
187         -P          (-preserve)          Preserve file modification date/time
188         -password PASSWD                 Password for processing protected files
189         -progress[:[TITLE]]              Show file progress count
190         -q          (-quiet)             Quiet processing
191         -r[.]       (-recurse)           Recursively process subdirectories
192         -scanForXMP                      Brute force XMP scan
193         -u          (-unknown)           Extract unknown tags
194         -U          (-unknown2)          Extract unknown binary tags too
195         -wm MODE    (-writeMode)         Set mode for writing/creating tags
196         -z          (-zip)               Read/write compressed information
197
198       Other options
199
200         -@ ARGFILE                       Read command-line arguments from file
201         -k          (-pause)             Pause before terminating
202         -list[w|f|wf|g[NUM]|d|x]         List various exiftool capabilities
203         -ver                             Print exiftool version number
204
205       Special features
206
207         -geotag TRKFILE                  Geotag images from specified GPS log
208         -globalTimeShift SHIFT           Shift all formatted date/time values
209         -use MODULE                      Add features from plug-in module
210
211       Utilities
212
213         -delete_original[!]              Delete "_original" backups
214         -restore_original                Restore from "_original" backups
215
216       Advanced options
217
218         -api OPT[[^]=[VAL]]              Set ExifTool API option
219         -common_args                     Define common arguments
220         -config CFGFILE                  Specify configuration file name
221         -echo[NUM] TEXT                  Echo text to stdout or stderr
222         -execute[NUM]                    Execute multiple commands on one line
223         -srcfile FMT                     Process a different source file
224         -stay_open FLAG                  Keep reading -@ argfile even after EOF
225         -userParam PARAM[[^]=[VAL]]      Set user parameter (API UserParam opt)
226
227   Option Details
228       Tag operations
229
230       -TAG Extract information for the specified tag (eg. "-CreateDate").
231            Multiple tags may be specified in a single command.  A tag name is
232            the handle by which a piece of information is referenced.  See
233            Image::ExifTool::TagNames for documentation on available tag
234            names.  A tag name may include leading group names separated by
235            colons (eg. "-EXIF:CreateDate", or "-Doc1:XMP:Creator"), and each
236            group name may be prefixed by a digit to specify family number
237            (eg.  "-1IPTC:City").  Use the -listg option to list available
238            group names by family.
239
240            A special tag name of "All" may be used to indicate all meta
241            information (ie. -All).  This is particularly useful when a group
242            name is specified to extract all information in a group (but
243            beware that unless the -a option is also used, some tags in the
244            group may be suppressed by same-named tags in other groups).  The
245            wildcard characters "?" and "*" may be used in a tag name to match
246            any single character and zero or more characters respectively.
247            These may not be used in a group name, with the exception that a
248            group name of "*" (or "All") may be used to extract all instances
249            of a tag (as if -a was used).  Note that arguments containing
250            wildcards must be quoted on the command line of most systems to
251            prevent shell globbing.
252
253            A "#" may be appended to the tag name to disable the print
254            conversion on a per-tag basis (see the -n option).  This may also
255            be used when writing or copying tags.
256
257            If no tags are specified, all available information is extracted
258            (as if "-All" had been specified).
259
260            Note:  Descriptions, not tag names, are shown by default when
261            extracting information.  Use the -s option to see the tag names
262            instead.
263
264       --TAG
265            Exclude specified tag from extracted information.  Same as the -x
266            option.  Group names and wildcards are permitted as described
267            above for -TAG.  Once excluded from the output, a tag may not be
268            re-included by a subsequent option.  May also be used following a
269            -tagsFromFile option to exclude tags from being copied (when
270            redirecting to another tag, it is the source tag that should be
271            excluded), or to exclude groups from being deleted when deleting
272            all information (eg. "-all= --exif:all" deletes all but EXIF
273            information).  But note that this will not exclude individual tags
274            from a group delete (unless a family 2 group is specified, see
275            note 4 below).  Instead, individual tags may be recovered using
276            the -tagsFromFile option (eg. "-all= -tagsfromfile @ -artist").
277
278       -TAG[+-^]=[VALUE]
279            Write a new value for the specified tag (eg. "-comment=wow"), or
280            delete the tag if no VALUE is given (eg. "-comment=").  "+=" and
281            "-=" are used to add or remove existing entries from a list, or to
282            shift date/time values (see Image::ExifTool::Shift.pl and note 6
283            below for more details).  "+=" may also be used to increment
284            numerical values (or decrement if VALUE is negative), and "-=" may
285            be used to conditionally delete or replace a tag (see "WRITING
286            EXAMPLES" for examples).  "^=" is used to write an empty string
287            instead of deleting the tag when no VALUE is given, but otherwise
288            it is equivalent to "=".
289
290            TAG may contain one or more leading family 0, 1 or 2 group names,
291            prefixed by optional family numbers, and separated colons.  If no
292            group name is specified, the tag is created in the preferred
293            group, and updated in any other location where a same-named tag
294            already exists.  The preferred group is the first group in the
295            following list where TAG is valid: 1) EXIF, 2) IPTC, 3) XMP.
296
297            The wildcards "*" and "?" may be used in tag names to assign the
298            same value to multiple tags.  When specified with wildcards,
299            "unsafe" tags are not written.  A tag name of "All" is equivalent
300            to "*" (except that it doesn't require quoting, while arguments
301            with wildcards do on systems with shell globbing), and is often
302            used when deleting all metadata (ie. "-All=") or an entire group
303            (eg. "-XMP-dc:All=", see note 4 below).  Note that not all groups
304            are deletable, and that the JPEG APP14 "Adobe" group is not
305            removed by default with "-All=" because it may affect the
306            appearance of the image.  However, color space information is
307            removed, so the colors may be affected (but this may be avoided by
308            copying back the tags defined by the ColorSpaceTags shortcut).
309            Use the -listd option for a complete list of deletable groups, and
310            see note 5 below regarding the "APP" groups.  Also, within an
311            image some groups may be contained within others, and these groups
312            are removed if the containing group is deleted:
313
314              JPEG Image:
315              - Deleting EXIF or IFD0 also deletes ExifIFD, GlobParamIFD,
316                GPS, IFD1, InteropIFD, MakerNotes, PrintIM and SubIFD.
317              - Deleting ExifIFD also deletes InteropIFD and MakerNotes.
318              - Deleting Photoshop also deletes IPTC.
319
320              TIFF Image:
321              - Deleting EXIF only removes ExifIFD which also deletes
322                InteropIFD and MakerNotes.
323
324            Notes:
325
326            1) Many tag values may be assigned in a single command.  If two
327            assignments affect the same tag, the latter takes precedence
328            (except for list-type tags, for which both values are written).
329
330            2) In general, MakerNotes tags are considered "Permanent", and may
331            be edited but not created or deleted individually.  This avoids
332            many potential problems, including the inevitable compatibility
333            problems with OEM software which may be very inflexible about the
334            information it expects to find in the maker notes.
335
336            3) Changes to PDF files by ExifTool are reversible (by deleting
337            the update with "-PDF-update:all=") because the original
338            information is never actually deleted from the file.  So ExifTool
339            alone may not be used to securely edit metadata in PDF files.
340
341            4) Specifying "-GROUP:all=" deletes the entire group as a block
342            only if a single family 0 or 1 group is specified.  Otherwise all
343            deletable tags in the specified group(s) are removed individually,
344            and in this case is it possible to exclude individual tags from a
345            mass delete.  For example, "-time:all --Exif:Time:All" removes all
346            deletable Time tags except those in the EXIF.  This difference
347            also applies if family 2 is specified when deleting all groups.
348            For example, "-2all:all=" deletes tags individually, while
349            "-all:all=" deletes entire blocks.
350
351            5) The "APP" group names ("APP0" through "APP15") are used to
352            delete JPEG application segments which are not associated with
353            another deletable group.  For example, specifying "-APP14:All="
354            will NOT delete the APP14 "Adobe" segment because this is
355            accomplished with "-Adobe:All".
356
357            6) When shifting a value, the shift is applied to the original
358            value of the tag, overriding any other values previously assigned
359            to the tag on the same command line.  To shift a date/time value
360            and copy it to another tag in the same operation, use the
361            -globalTimeShift option.
362
363            Special feature:  Integer values may be specified in hexadecimal
364            with a leading "0x", and simple rational values may be specified
365            as fractions.
366
367       -TAG<=DATFILE or -TAG<=FMT
368            Set the value of a tag from the contents of file DATFILE.  The
369            file name may also be given by a FMT string where %d, %f and %e
370            represent the directory, file name and extension of the original
371            FILE (see the -w option for more details).  Note that quotes are
372            required around this argument to prevent shell redirection since
373            it contains a "<" symbol.  If DATFILE/FMT is not provided, the
374            effect is the same as "-TAG=", and the tag is simply deleted.
375            "+<=" or "-<=" may also be used to add or delete specific list
376            entries, or to shift date/time values.
377
378       -tagsFromFile SRCFILE or FMT
379            Copy tag values from SRCFILE to FILE.  Tag names on the command
380            line after this option specify the tags to be copied, or excluded
381            from the copy.  Wildcards are permitted in these tag names.  If no
382            tags are specified, then all possible tags (see note 1 below) from
383            the source file are copied to same-named tags in the preferred
384            location of the output file (the same as specifying "-all").  More
385            than one -tagsFromFile option may be used to copy tags from
386            multiple files.
387
388            By default, this option will update any existing and writable
389            same-named tags in the output FILE, but will create new tags only
390            in their preferred groups.  This allows some information to be
391            automatically transferred to the appropriate group when copying
392            between images of different formats. However, if a group name is
393            specified for a tag then the information is written only to this
394            group (unless redirected to another group, see below).  If "All"
395            is used as a group name, then the specified tag(s) are written to
396            the same family 1 group they had in the source file (ie. the same
397            specific location, like ExifIFD or XMP-dc).  For example, the
398            common operation of copying all writable tags to the same specific
399            locations in the output FILE is achieved by adding "-all:all".  A
400            different family may be specified by adding a leading family
401            number to the group name (eg. "-0all:all" preserves the same
402            general location, like EXIF or XMP).
403
404            SRCFILE may be the same as FILE to move information around within
405            a single file.  In this case, "@" may be used to represent the
406            source file (ie. "-tagsFromFile @"), permitting this feature to be
407            used for batch processing multiple files.  Specified tags are then
408            copied from each file in turn as it is rewritten.  For advanced
409            batch use, the source file name may also be specified using a FMT
410            string in which %d, %f and %e represent the directory, file name
411            and extension of FILE.  (eg. the current FILE would be represented
412            by "%d%f.%e", with the same effect as "@").  See the -w option for
413            FMT string examples.
414
415            A powerful redirection feature allows a destination tag to be
416            specified for each copied tag.  With this feature, information may
417            be written to a tag with a different name or group.  This is done
418            using "'-DSTTAG<SRCTAG'" or "'-SRCTAG>DSTTAG'" on the command line
419            after -tagsFromFile, and causes the value of SRCTAG to be copied
420            from SRCFILE and written to DSTTAG in FILE.  Has no effect unless
421            SRCTAG exists in SRCFILE.  Note that this argument must be quoted
422            to prevent shell redirection, and there is no "=" sign as when
423            assigning new values.  Source and/or destination tags may be
424            prefixed by a group name and/or suffixed by "#".  Wildcards are
425            allowed in both the source and destination tag names.  A
426            destination group and/or tag name of "All" or "*" writes to the
427            same family 1 group and/or tag name as the source.  If no
428            destination group is specified, the information is written to the
429            preferred group.  Whitespace around the ">" or "<" is ignored. As
430            a convenience, "-tagsFromFile @" is assumed for any redirected
431            tags which are specified without a prior -tagsFromFile option.
432            Copied tags may also be added or deleted from a list with
433            arguments of the form "'-SRCTAG+<DSTTAG'" or "'-SRCTAG-<DSTTAG'"
434            (but see Note 5 below).
435
436            An extension of the redirection feature allows strings involving
437            tag names to be used on the right hand side of the "<" symbol with
438            the syntax "'-DSTTAG<STR'", where tag names in STR are prefixed
439            with a "$" symbol.  See the -p option and the "Advanced formatting
440            feature" section for more details about this syntax.  Strings
441            starting with a "=" sign must insert a single space after the "<"
442            to avoid confusion with the "<=" operator which sets the tag value
443            from the contents of a file.  A single space at the start of the
444            string is removed if it exists, but all other whitespace in the
445            string is preserved.  See note 8 below about using the redirection
446            feature with list-type stags, shortcuts or when using wildcards in
447            tag names.
448
449            See "COPYING EXAMPLES" for examples using -tagsFromFile.
450
451            Notes:
452
453            1) Some tags (generally tags which may affect the appearance of
454            the image) are considered "unsafe" to write, and are only copied
455            if specified explicitly (ie. no wildcards).  See the tag name
456            documentation for more details about "unsafe" tags.
457
458            2) Be aware of the difference between excluding a tag from being
459            copied (--TAG), and deleting a tag (-TAG=).  Excluding a tag
460            prevents it from being copied to the destination image, but
461            deleting will remove a pre-existing tag from the image.
462
463            3) The maker note information is copied as a block, so it isn't
464            affected like other information by subsequent tag assignments on
465            the command line, and individual makernote tags may not be
466            excluded from a block copy.  Also, since the PreviewImage
467            referenced from the maker notes may be rather large, it is not
468            copied, and must be transferred separately if desired.
469
470            4) The order of operations is to copy all specified tags at the
471            point of the -tagsFromFile option in the command line.  Any tag
472            assignment to the right of the -tagsFromFile option is made after
473            all tags are copied.  For example, new tag values are set in the
474            order One, Two, Three then Four with this command:
475
476                exiftool -One=1 -tagsFromFile s.jpg -Two -Four=4 -Three d.jpg
477
478            This is significant in the case where an overlap exists between
479            the copied and assigned tags because later operations may override
480            earlier ones.
481
482            5) The normal behaviour of copied tags differs from that of
483            assigned tags for list-type tags and conditional replacements
484            because each copy operation on a tag overrides any previous
485            operations.  While this avoids duplicate list items when copying
486            groups of tags from a file containing redundant information, it
487            also prevents values of different tags from being copied into the
488            same list when this is the intent.  So a -addTagsFromFile option
489            is provided which allows copying of multiple tags into the same
490            list.  eg)
491
492                exiftool -addtagsfromfile @ '-subject<make' '-subject<model' ...
493
494            Similarly, -addTagsFromFile must be used when conditionally
495            replacing a tag to prevent overriding earlier conditions.
496
497            Other than these differences, the -tagsFromFile and
498            -addTagsFromFile options are equivalent.
499
500            6) The -a option (allow duplicate tags) is always in effect when
501            copying tags from SRCFILE, but the highest priority tag is always
502            copied last so it takes precedence.
503
504            7) Structured tags are copied by default when copying tags.  See
505            the -struct option for details.
506
507            8) With the redirection feature, copying a tag directly (ie.
508            "'-DSTTAG<SRCTAG'") is not the same as interpolating its value
509            inside a string (ie. "'-DSTTAG<$SRCTAG'") for list-type tags,
510            shortcut tags, tag names containing wildcards, or UserParam
511            variables.  When copying directly, the values of each matching
512            source tag are copied individually to the destination tag (as if
513            they were separate assignments).  However, when interpolated
514            inside a string, list items and the values of shortcut tags are
515            concatenated (with a separator set by the -sep option), and
516            wildcards are not allowed.  Also, UserParam variables are
517            available only when interpolated in a string.  Another difference
518            is that a minor warning is generated if a tag doesn't exist when
519            interpolating its value in a string (with "$"), but isn't when
520            copying the tag directly.
521
522            Finally, the behaviour is different when a destination tag or
523            group of "All" is used.  When copying directly, a destination
524            group and/or tag name of "All" writes to the same family 1 group
525            and/or tag name as the source.  But when interpolated in a string,
526            the identity of the source tags are lost and the value is written
527            to all possible groups/tags.  For example, the string form must be
528            used in the following command since the intent is to set the value
529            of all existing date/time tags from "CreateDate":
530
531                exiftool "-time:all<$createdate" -wm w FILE
532
533       -x TAG (-exclude)
534            Exclude the specified tag.  There may be multiple -x options.
535            This has the same effect as --TAG on the command line.  See the
536            --TAG documentation above for a complete description.
537
538       Input-output text formatting
539
540       Note that trailing spaces are removed from extracted values for most
541       output text formats.  The exceptions are "-b", "-csv", "-j" and "-X".
542
543       -args (-argFormat)
544            Output information in the form of exiftool arguments, suitable for
545            use with the -@ option when writing.  May be combined with the -G
546            option to include group names.  This feature may be used to
547            effectively copy tags between images, but allows the metadata to
548            be altered by editing the intermediate file ("out.args" in this
549            example):
550
551                exiftool -args -G1 --filename --directory src.jpg > out.args
552                exiftool -@ out.args -sep ", " dst.jpg
553
554            Note:  Be careful when copying information with this technique
555            since it is easy to write tags which are normally considered
556            "unsafe".  For instance, the FileName and Directory tags are
557            excluded in the example above to avoid renaming and moving the
558            destination file.  Also note that the second command above will
559            produce warning messages for any tags which are not writable.
560
561            As well, the -sep option should be used as in the second command
562            above to maintain separate list items when writing metadata back
563            to image files, and the -struct option may be used when extracting
564            to preserve structured XMP information.
565
566       -b (-binary)
567            Output requested metadata in binary format without tag names or
568            descriptions.  This option is mainly used for extracting embedded
569            images or other binary data, but it may also be useful for some
570            text strings since control characters (such as newlines) are not
571            replaced by '.' as they are in the default output.  By default,
572            list items are separated by a newline when extracted with the -b
573            option, but this may be changed (see the -sep option for details).
574            May be combined with "-j", "-php" or "-X" to extract binary data
575            in JSON, PHP or XML format, but note that "unsafe" tags must be
576            specified explicitly to be extracted as binary in these formats.
577
578       -c FMT (-coordFormat)
579            Set the print format for GPS coordinates.  FMT uses the same
580            syntax as a "printf" format string.  The specifiers correspond to
581            degrees, minutes and seconds in that order, but minutes and
582            seconds are optional.  For example, the following table gives the
583            output for the same coordinate using various formats:
584
585                        FMT                  Output
586                -------------------    ------------------
587                "%d deg %d' %.2f"\"    54 deg 59' 22.80"  (default for reading)
588                "%d %d %.8f"           54 59 22.80000000  (default for copying)
589                "%d deg %.4f min"      54 deg 59.3800 min
590                "%.6f degrees"         54.989667 degrees
591
592            Notes:
593
594            1) To avoid loss of precision, the default coordinate format is
595            different when copying tags using the -tagsFromFile option.
596
597            2) If the hemisphere is known, a reference direction (N, S, E or
598            W) is appended to each printed coordinate, but adding a "+" to the
599            format specifier (eg. "%+.6f") prints a signed coordinate instead.
600
601            3) This print formatting may be disabled with the -n option to
602            extract coordinates as signed decimal degrees.
603
604       -charset [[TYPE=]CHARSET]
605            If TYPE is "ExifTool" or not specified, this option sets the
606            ExifTool character encoding for output tag values when reading and
607            input values when writing, with a default of "UTF8".  If no
608            CHARSET is given, a list of available character sets is returned.
609            Valid CHARSET values are:
610
611                CHARSET     Alias(es)        Description
612                ----------  ---------------  ----------------------------------
613                UTF8        cp65001, UTF-8   UTF-8 characters (default)
614                Latin       cp1252, Latin1   Windows Latin1 (West European)
615                Latin2      cp1250           Windows Latin2 (Central European)
616                Cyrillic    cp1251, Russian  Windows Cyrillic
617                Greek       cp1253           Windows Greek
618                Turkish     cp1254           Windows Turkish
619                Hebrew      cp1255           Windows Hebrew
620                Arabic      cp1256           Windows Arabic
621                Baltic      cp1257           Windows Baltic
622                Vietnam     cp1258           Windows Vietnamese
623                Thai        cp874            Windows Thai
624                DOSLatinUS  cp437            DOS Latin US
625                DOSLatin1   cp850            DOS Latin1
626                MacRoman    cp10000, Roman   Macintosh Roman
627                MacLatin2   cp10029          Macintosh Latin2 (Central Europe)
628                MacCyrillic cp10007          Macintosh Cyrillic
629                MacGreek    cp10006          Macintosh Greek
630                MacTurkish  cp10081          Macintosh Turkish
631                MacRomanian cp10010          Macintosh Romanian
632                MacIceland  cp10079          Macintosh Icelandic
633                MacCroatian cp10082          Macintosh Croatian
634
635            TYPE may be "FileName" to specify the encoding of file names on
636            the command line (ie. FILE arguments).  In Windows, this triggers
637            use of wide-character i/o routines, thus providing support for
638            Unicode file names.  See the "WINDOWS UNICODE FILE NAMES" section
639            below for details.
640
641            Other values of TYPE listed below are used to specify the internal
642            encoding of various meta information formats.
643
644                TYPE       Description                                  Default
645                ---------  -------------------------------------------  -------
646                EXIF       Internal encoding of EXIF "ASCII" strings    (none)
647                ID3        Internal encoding of ID3v1 information       Latin
648                IPTC       Internal IPTC encoding to assume when        Latin
649                            IPTC:CodedCharacterSet is not defined
650                Photoshop  Internal encoding of Photoshop IRB strings   Latin
651                QuickTime  Internal encoding of QuickTime strings       MacRoman
652                RIFF       Internal encoding of RIFF strings            0
653
654            See <https://exiftool.org/faq.html#Q10> for more information about
655            coded character sets, and the Image::ExifTool Options for more
656            details about the -charset settings.
657
658       -csv[[+]=CSVFILE]
659            Export information in CSV format, or import information if CSVFILE
660            is specified.  When importing, the CSV file must be in exactly the
661            same format as the exported file.  The first row of the CSVFILE
662            must be the ExifTool tag names (with optional group names) for
663            each column of the file, and values must be separated by commas.
664            A special "SourceFile" column specifies the files associated with
665            each row of information (and a SourceFile of "*" may be used to
666            define default tags to be imported for all files which are
667            combined with any tags specified for the specific SourceFile
668            processed).  The following examples demonstrate basic use of this
669            option:
670
671                # generate CSV file with common tags from all images in a directory
672                exiftool -common -csv dir > out.csv
673
674                # update metadata for all images in a directory from CSV file
675                exiftool -csv=a.csv dir
676
677            Empty values are ignored when importing (unless the -f option is
678            used and the API MissingTagValue is set to an empty string, in
679            which case the tag is deleted).  Also, FileName and Directory
680            columns are ignored if they exist (ie. ExifTool will not attempt
681            to write these tags with a CSV import).  To force a tag to be
682            deleted, use the -f option and set the value to "-" in the CSV
683            file (or to the MissingTagValue if this API option was used).
684            Multiple databases may be imported in a single command.
685
686            When exporting a CSV file, the -g or -G option adds group names to
687            the tag headings.  If the -a option is used to allow duplicate tag
688            names, the duplicate tags are only included in the CSV output if
689            the column headings are unique.  Adding the -G4 option ensures a
690            unique column heading for each tag.  The -b option may be added to
691            output binary data, encoded in base64 if necessary (indicated by
692            ASCII "base64:" as the first 7 bytes of the value).  Values may
693            also be encoded in base64 if the -charset option is used and the
694            value contains invalid characters.
695
696            When exporting specific tags, the CSV columns are arranged in the
697            same order as the specified tags provided the column headings
698            exactly match the specified tag names, otherwise the columns are
699            sorted in alphabetical order.
700
701            When importing from a CSV file, only files specified on the
702            command line are processed.  Any extra entries in the CSV file are
703            ignored.
704
705            List-type tags are stored as simple strings in a CSV file, but the
706            -sep option may be used to split them back into separate items
707            when importing.
708
709            Special feature:  -csv+=CSVFILE may be used to add items to
710            existing lists.  This affects only list-type tags.  Also applies
711            to the -j option.
712
713            Note that this option is fundamentally different than all other
714            output format options because it requires information from all
715            input files to be buffered in memory before the output is written.
716            This may result in excessive memory usage when processing a very
717            large number of files with a single command.  Also, it makes this
718            option incompatible with the -w option.  When processing a large
719            number of files, it is recommended to either use the JSON (-j) or
720            XML (-X) output format, or use -p to generate a fixed-column CSV
721            file instead of using the -csv option.
722
723       -d FMT (-dateFormat)
724            Set the format for date/time tag values.  The FMT string may
725            contain formatting codes beginning with a percent character ("%")
726            to represent the various components of a date/time value.  The
727            specifics of the FMT syntax are system dependent -- consult the
728            "strftime" man page on your system for details.  The default
729            format is equivalent to "%Y:%m:%d %H:%M:%S".  This option has no
730            effect on date-only or time-only tags and ignores timezone
731            information if present.  Only one -d option may be used per
732            command.  Requires POSIX::strptime or Time::Piece for the
733            inversion conversion when writing.
734
735       -D (-decimal)
736            Show tag ID number in decimal when extracting information.
737
738       -E, -ex (-escapeHTML, -escapeXML)
739            Escape characters in output values for HTML (-E) or XML (-ex).
740            For HTML, all characters with Unicode code points above U+007F are
741            escaped as well as the following 5 characters: & (&amp;) ' (&#39;)
742            " (&quot;) > (&gt;) and < (&lt;).  For XML, only these 5
743            characters are escaped.  The -E option is implied with -h, and -ex
744            is implied with -X.  The inverse conversion is applied when
745            writing tags.
746
747       -f (-forcePrint)
748            Force printing of tags even if their values are not found.  This
749            option only applies when specific tags are requested on the
750            command line (ie. not with wildcards or by "-all").  With this
751            option, a dash ("-") is printed for the value of any missing tag,
752            but the dash may be changed via the API MissingTagValue option.
753            May also be used to add a 'flags' attribute to the -listx output,
754            or to allow tags to be deleted when writing with the -csv=CSVFILE
755            feature.
756
757       -g[NUM][:NUM...] (-groupHeadings)
758            Organize output by tag group.  NUM specifies a group family
759            number, and may be 0 (general location), 1 (specific location), 2
760            (category), 3 (document number), 4 (instance number), 5 (metadata
761            path) or 6 (EXIF/TIFF format).  -g0 is assumed if a family number
762            is not specified, and family numbers may be added wherever -g is
763            mentioned in the documentation.  Multiple families may be
764            specified by separating them with colons.  By default the
765            resulting group name is simplified by removing any leading "Main:"
766            and collapsing adjacent identical group names, but this can be
767            avoided by placing a colon before the first family number (eg.
768            -g:3:1).  Use the -listg option to list group names for a
769            specified family.  The SavePath and SaveFormat API options are
770            automatically enabled if the respective family 5 or 6 group names
771            are requested.  See the API GetGroup documentation for more
772            information.
773
774       -G[NUM][:NUM...] (-groupNames)
775            Same as -g but print group name for each tag.  -G0 is assumed if
776            NUM is not specified.  May be combined with a number of other
777            options to add group names to the output.  Note that NUM may be
778            added wherever -G is mentioned in the documentation.  See the -g
779            option above for details.
780
781       -h (-htmlFormat)
782            Use HTML table formatting for output.  Implies the -E option.  The
783            formatting options -D, -H, -g, -G, -l and -s may be used in
784            combination with -h to influence the HTML format.
785
786       -H (-hex)
787            Show tag ID number in hexadecimal when extracting information.
788
789       -htmlDump[OFFSET]
790            Generate a dynamic web page containing a hex dump of the EXIF
791            information.  This can be a very powerful tool for low-level
792            analysis of EXIF information.  The -htmlDump option is also
793            invoked if the -v and -h options are used together.  The verbose
794            level controls the maximum length of the blocks dumped.  An OFFSET
795            may be given to specify the base for displayed offsets.  If not
796            provided, the EXIF/TIFF base offset is used.  Use -htmlDump0 for
797            absolute offsets.  Currently only EXIF/TIFF and JPEG information
798            is dumped, but the -u option can be used to give a raw hex dump of
799            other file formats.
800
801       -j[[+]=JSONFILE] (-json)
802            Use JSON (JavaScript Object Notation) formatting for console
803            output, or import JSON file if JSONFILE is specified.  This option
804            may be combined with -g to organize the output into objects by
805            group, or -G to add group names to each tag.  List-type tags with
806            multiple items are output as JSON arrays unless -sep is used.  By
807            default XMP structures are flattened into individual tags in the
808            JSON output, but the original structure may be preserved with the
809            -struct option (this also causes all list-type XMP tags to be
810            output as JSON arrays, otherwise single-item lists would be output
811            as simple strings).  The -a option is implied if the -g or -G
812            options are used, otherwise it is ignored and tags with identical
813            JSON names are suppressed. (-g4 may be used to ensure that all
814            tags have unique JSON names.)  Adding the -D or -H option changes
815            tag values to JSON objects with "val" and "id" fields, and adding
816            -l adds a "desc" field, and a "num" field if the numerical value
817            is different from the converted "val".  The -b option may be added
818            to output binary data, encoded in base64 if necessary (indicated
819            by ASCII "base64:" as the first 7 bytes of the value), and -t may
820            be added to include tag table information (see -t for details).
821            The JSON output is UTF-8 regardless of any -L or -charset option
822            setting, but the UTF-8 validation is disabled if a character set
823            other than UTF-8 is specified.
824
825            If JSONFILE is specified, the file is imported and the tag
826            definitions from the file are used to set tag values on a per-file
827            basis.  The special "SourceFile" entry in each JSON object
828            associates the information with a specific target file.  An object
829            with a missing SourceFile or a SourceFile of "*" defines default
830            tags for all target files which are combined with any tags
831            specified for the specific SourceFile processed.  The imported
832            JSON file must have the same format as the exported JSON files
833            with the exception that the -g option is not compatible with the
834            import file format (use -G instead).  Additionally, tag names in
835            the input JSON file may be suffixed with a "#" to disable print
836            conversion.
837
838            Unlike CSV import, empty values are not ignored, and will cause an
839            empty value to be written if supported by the specific metadata
840            type.  Tags are deleted by using the -f option and setting the tag
841            value to "-" (or to the MissingTagValue setting if this API option
842            was used).  Importing with -j+=JSONFILE causes new values to be
843            added to existing lists.
844
845       -l (-long)
846            Use long 2-line Canon-style output format.  Adds a description and
847            unconverted value (if it is different from the converted value) to
848            the XML, JSON or PHP output when -X, -j or -php is used.  May also
849            be combined with -listf, -listr or -listwf to add descriptions of
850            the file types.
851
852       -L (-latin)
853            Use Windows Latin1 encoding (cp1252) for output tag values instead
854            of the default UTF-8.  When writing, -L specifies that input text
855            values are Latin1 instead of UTF-8.  Equivalent to "-charset
856            latin".
857
858       -lang [LANG]
859            Set current language for tag descriptions and converted values.
860            LANG is "de", "fr", "ja", etc.  Use -lang with no other arguments
861            to get a list of available languages.  The default language is
862            "en" if -lang is not specified.  Note that tag/group names are
863            always English, independent of the -lang setting, and translation
864            of warning/error messages has not yet been implemented.  May also
865            be combined with -listx to output descriptions in one language
866            only.
867
868            By default, ExifTool uses UTF-8 encoding for special characters,
869            but the the -L or -charset option may be used to invoke other
870            encodings.  Note that ExifTool uses Unicode::LineBreak if
871            available to help preserve the column alignment of the plain text
872            output for languages with a variable-width character set.
873
874            Currently, the language support is not complete, but users are
875            welcome to help improve this by submitting their own translations.
876            To submit a translation, follow these steps (you must have Perl
877            installed for this):
878
879            1. Download and unpack the latest Image-ExifTool full
880            distribution.
881
882            2. 'cd' into the Image-ExifTool directory.
883
884            3. Run this command to make an XML file of the desired tags (eg.
885            EXIF):
886
887               ./exiftool -listx -exif:all > out.xml
888
889            4. Copy this text into a file called 'import.pl' in the exiftool
890            directory:
891
892                push @INC, 'lib';
893                require Image::ExifTool::TagInfoXML;
894                my $file = shift or die "Expected XML file name\n";
895                $Image::ExifTool::TagInfoXML::makeMissing = shift;
896                Image::ExifTool::TagInfoXML::BuildLangModules($file,8);
897
898            5. Run the 'import.pl' script to Import the XML file, generating
899            the 'MISSING' entries for your language (eg. Russian):
900
901               perl import.pl out.xml ru
902
903            6. Edit the generated language module
904            lib/Image/ExifTool/Lang/ru.pm, and search and replace all
905            'MISSING' strings in the file with your translations.
906
907            7. Email the module ('ru.pm' in this example) to philharvey66 at
908            gmail.com
909
910            8. Thank you!!
911
912       -listItem INDEX
913            For list-type tags, this causes only the item with the specified
914            index to be extracted.  INDEX is 0 for the first item in the list.
915            Negative indices may also be used to reference items from the end
916            of the list.  Has no effect on single-valued tags.  Also applies
917            to tag values when copying from a tag, and in -if conditions.
918
919       -n (--printConv)
920            Disable print conversion for all tags.  By default, extracted
921            values are converted to a more human-readable format, but the -n
922            option disables this conversion, revealing the machine-readable
923            values.  For example:
924
925                > exiftool -Orientation -S a.jpg
926                Orientation: Rotate 90 CW
927                > exiftool -Orientation -S -n a.jpg
928                Orientation: 6
929
930            The print conversion may also be disabled on a per-tag basis by
931            suffixing the tag name with a "#" character:
932
933                > exiftool -Orientation# -Orientation -S a.jpg
934                Orientation: 6
935                Orientation: Rotate 90 CW
936
937            These techniques may also be used to disable the inverse print
938            conversion when writing.  For example, the following commands all
939            have the same effect:
940
941                > exiftool -Orientation='Rotate 90 CW' a.jpg
942                > exiftool -Orientation=6 -n a.jpg
943                > exiftool -Orientation#=6 a.jpg
944
945       -p FMTFILE or STR (-printFormat)
946            Print output in the format specified by the given file or string.
947            The argument is interpreted as a string unless a file of that name
948            exists, in which case the string is loaded from the contents of
949            the file.  Tag names in the format file or string begin with a "$"
950            symbol and may contain a leading group names and/or a trailing
951            "#".  Case is not significant.  Braces "{}" may be used around the
952            tag name to separate it from subsequent text.  Use $$ to represent
953            a "$" symbol, and $/ for a newline.
954
955            Multiple -p options may be used, each contributing a line (or
956            more) of text to the output.  Lines beginning with "#[HEAD]" and
957            "#[TAIL]" are output before the first processed file and after the
958            last processed file respectively.  Lines beginning with "#[SECT]"
959            and "#[ENDS]" are output before and after each section of files.
960            A section is defined as a group of consecutive files with the same
961            section header (eg. files are grouped by directory if "#[SECT]"
962            contains $directory).  Lines beginning with "#[BODY]" and lines
963            not beginning with "#" are output for each processed file.  Lines
964            beginning with "#[IF]" are not output, but all BODY lines are
965            skipped if any tag on an IF line doesn't exist.  Other lines
966            beginning with "#" are ignored.  For example, this format file:
967
968                # this is a comment line
969                #[HEAD]-- Generated by ExifTool $exifToolVersion --
970                File: $FileName - $DateTimeOriginal
971                (f/$Aperture, ${ShutterSpeed}s, ISO $EXIF:ISO)
972                #[TAIL]-- end --
973
974            with this command:
975
976                exiftool -p test.fmt a.jpg b.jpg
977
978            produces output like this:
979
980                -- Generated by ExifTool 11.85 --
981                File: a.jpg - 2003:10:31 15:44:19
982                (f/5.6, 1/60s, ISO 100)
983                File: b.jpg - 2006:05:23 11:57:38
984                (f/8.0, 1/13s, ISO 100)
985                -- end --
986
987            The values of List-type tags with multiple items and Shortcut tags
988            representing multiple tags are joined according the the -sep
989            option setting when interpolated in the string.
990
991            When -ee (-extractEmbedded) is combined with -p, embedded
992            documents are effectively processed as separate input files.
993
994            If a specified tag does not exist, a minor warning is issued and
995            the line with the missing tag is not printed.  However, the -f
996            option may be used to set the value of missing tags to '-' (but
997            this may be configured via the MissingTagValue API option), or the
998            -m option may be used to ignore minor warnings and leave the
999            missing values empty.  Alternatively, -q -q may be used to simply
1000            suppress the warning messages.
1001
1002            The "Advanced formatting feature" may be used to modify the values
1003            of individual tags with the -p option.
1004
1005       -php Format output as a PHP Array.  The -g, -G, -D, -H, -l, -sep and
1006            -struct options combine with -php, and duplicate tags are handled
1007            in the same way as with the -json option.  As well, the -b option
1008            may be added to output binary data, and -t may be added to include
1009            tag table information (see -t for details).  Here is a simple
1010            example showing how this could be used in a PHP script:
1011
1012                <?php
1013                eval('$array=' . `exiftool -php -q image.jpg`);
1014                print_r($array);
1015                ?>
1016
1017       -s[NUM] (-short)
1018            Short output format.  Prints tag names instead of descriptions.
1019            Add NUM or up to 3 -s options for even shorter formats:
1020
1021                -s1 or -s        - print tag names instead of descriptions
1022                -s2 or -s -s     - no extra spaces to column-align values
1023                -s3 or -s -s -s  - print values only (no tag names)
1024
1025            Also effective when combined with -t, -h, -X or -listx options.
1026
1027       -S (-veryShort)
1028            Very short format.  The same as -s2 or two -s options.  Tag names
1029            are printed instead of descriptions, and no extra spaces are added
1030            to column-align values.
1031
1032       -sep STR (-separator)
1033            Specify separator string for items in list-type tags.  When
1034            reading, the default is to join list items with ", ".  When
1035            writing, this option causes values assigned to list-type tags to
1036            be split into individual items at each substring matching STR
1037            (otherwise they are not split by default).  Space characters in
1038            STR match zero or more whitespace characters in the value.
1039
1040            Note that an empty separator ("") is allowed, and will join items
1041            with no separator when reading, or split the value into individual
1042            characters when writing.
1043
1044            For pure binary output (-b used without -j, -php or -X), the first
1045            -sep option specifies a list-item separator, and a second -sep
1046            option specifies a terminator for the end of the list (or after
1047            each value if not a list).  In these strings, "\n", "\r" and "\t"
1048            may be used to represent a newline, carriage return and tab
1049            respectively.  By default, binary list items are separated by a
1050            newline, and no terminator is added.
1051
1052       -sort, --sort
1053            Sort output by tag description, or by tag name if the -s option is
1054            used.  When sorting by description, the sort order will depend on
1055            the -lang option setting.  Without the -sort option, tags appear
1056            in the order they were specified on the command line, or if not
1057            specified, the order they were extracted from the file.  By
1058            default, tags are organized by groups when combined with the -g or
1059            -G option, but this grouping may be disabled with --sort.
1060
1061       -struct, --struct
1062            Output structured XMP information instead of flattening to
1063            individual tags.  This option works well when combined with the
1064            XML (-X) and JSON (-j) output formats.  For other output formats,
1065            XMP structures and lists are serialized into the same format as
1066            when writing structured information (see
1067            <https://exiftool.org/struct.html> for details).  When copying,
1068            structured tags are copied by default unless --struct is used to
1069            disable this feature (although flattened tags may still be copied
1070            by specifying them individually unless -struct is used).  These
1071            options have no effect when assigning new values since both
1072            flattened and structured tags may always be used when writing.
1073
1074       -t (-tab)
1075            Output a tab-delimited list of description/values (useful for
1076            database import).  May be combined with -s to print tag names
1077            instead of descriptions, or -S to print tag values only, tab-
1078            delimited on a single line.  The -t option may be combined with
1079            -j, -php or -X to add tag table information ("table", tag "id",
1080            and "index" for cases where multiple conditional tags exist with
1081            the same ID).
1082
1083       -T (-table)
1084            Output tag values in table form.  Equivalent to -t -S -q -f.
1085
1086       -v[NUM] (-verbose)
1087            Print verbose messages.  NUM specifies the level of verbosity in
1088            the range 0-5, with higher numbers being more verbose.  If NUM is
1089            not given, then each -v option increases the level of verbosity by
1090            1.  With any level greater than 0, most other options are ignored
1091            and normal console output is suppressed unless specific tags are
1092            extracted.  Using -v0 causes the console output buffer to be
1093            flushed after each line (which may be useful to avoid delays when
1094            piping exiftool output), and prints the name of each processed
1095            file when writing.  Also see the -progress option.
1096
1097       -w[+|!] EXT or FMT (-textOut)
1098            Write console output to files with names ending in EXT, one for
1099            each source file.  The output file name is obtained by replacing
1100            the source file extension (including the '.') with the specified
1101            extension (and a '.' is added to the start of EXT if it doesn't
1102            already contain one).  Alternatively, a FMT string may be used to
1103            give more control over the output file name and directory.  In the
1104            format string, %d, %f and %e represent the directory, filename and
1105            extension of the source file, and %c represents a copy number
1106            which is automatically incremented if the file already exists.  %d
1107            includes the trailing '/' if necessary, but %e does not include
1108            the leading '.'.  For example:
1109
1110                -w %d%f.txt       # same effect as "-w txt"
1111                -w dir/%f_%e.out  # write files to "dir" as "FILE_EXT.out"
1112                -w dir2/%d%f.txt  # write to "dir2", keeping dir structure
1113                -w a%c.txt        # write to "a.txt" or "a1.txt" or "a2.txt"...
1114
1115            Existing files will not be changed unless an exclamation point is
1116            added to the option name (ie. -w! or -textOut!) to overwrite the
1117            file, or a plus sign (ie. -w+ or -textOut+) to append to the
1118            existing file.  Both may be used (ie. -w+! or -textOut+!) to
1119            overwrite output files that didn't exist before the command was
1120            run, and append the output from multiple source files.  For
1121            example, to write one output file for all source files in each
1122            directory:
1123
1124                exiftool -filename -createdate -T -w+! %d/out.txt -r DIR
1125
1126            Capitalized format codes %D, %F, %E and %C provide slightly
1127            different alternatives to the lower case versions.  %D does not
1128            include the trailing '/', %F is the full filename including
1129            extension, %E includes the leading '.', and %C increments the
1130            count for each processed file (see below).
1131
1132            Notes:
1133
1134            1) In a Windows BAT file the "%" character is represented by "%%",
1135            so an argument like "%d%f.txt" is written as "%%d%%f.txt".
1136
1137            2) If the argument for -w does not contain a valid format code
1138            (eg. %f), then it is interpreted as a file extension.  It is not
1139            possible to specify a simple filename as an argument -- creating a
1140            single output file from multiple source files is typically done by
1141            shell redirection, ie)
1142
1143                exiftool FILE1 FILE2 ... > out.txt
1144
1145            But if necessary, an empty format code may be used to force the
1146            argument to be interpreted as a format string, and the same result
1147            may be obtained without the use of shell redirection:
1148
1149                exiftool -w+! %0fout.txt FILE1 FILE2 ...
1150
1151            Advanced features:
1152
1153            A substring of the original file name, directory or extension may
1154            be taken by specifying a field width immediately following the '%'
1155            character.  If the width is negative, the substring is taken from
1156            the end.  The substring position (characters to ignore at the
1157            start or end of the string) may be given by a second optional
1158            value after a decimal point.  For example:
1159
1160                Input File Name     Format Specifier    Output File Name
1161                ----------------    ----------------    ----------------
1162                Picture-123.jpg     %7f.txt             Picture.txt
1163                Picture-123.jpg     %-.4f.out           Picture.out
1164                Picture-123.jpg     %7f.%-3f            Picture.123
1165                Picture-123a.jpg    Meta%-3.1f.txt      Meta123.txt
1166
1167            (Note that special characters may have a width of greater than
1168            one.)
1169
1170            For %d and %D, the field width/position specifiers may be applied
1171            to the directory levels instead of substring position by using a
1172            colon instead of a decimal point in the format specifier.  For
1173            example:
1174
1175                Source Dir     Format   Result       Notes
1176                ------------   ------   ----------   ------------------
1177                pics/2012/02   %2:d     pics/2012/   take top 2 levels
1178                pics/2012/02   %-:1d    pics/2012/   up one directory level
1179                pics/2012/02   %:1d     2012/02/     ignore top level
1180                pics/2012/02   %1:1d    2012/        take 1 level after top
1181                pics/2012/02   %-1:D    02           bottom level folder name
1182                /Users/phil    %:2d     phil/        ignore top 2 levels
1183
1184            (Note that the root directory counts as one level when an absolute
1185            path is used as in the last example above.)
1186
1187            For %c, these modifiers have a different effects.  If a field
1188            width is given, the copy number is padded with zeros to the
1189            specified width.  A leading '-' adds a dash before the copy
1190            number, and a '+' adds an underline.  By default, the copy number
1191            is omitted from the first file of a given name, but this can be
1192            changed by adding a decimal point to the modifier.  For example:
1193
1194                -w A%-cZ.txt      # AZ.txt, A-1Z.txt, A-2Z.txt ...
1195                -w B%5c.txt       # B.txt, B00001.txt, B00002.txt ...
1196                -w C%.c.txt       # C0.txt, C1.txt, C2.txt ...
1197                -w D%-.c.txt      # D-0.txt, D-1.txt, D-2.txt ...
1198                -w E%-.4c.txt     # E-0000.txt, E-0001.txt, E-0002.txt ...
1199                -w F%-.4nc.txt    # F-0001.txt, F-0002.txt, F-0003.txt ...
1200                -w G%+c.txt       # G.txt, G_1.txt G_2.txt ...
1201                -w H%-lc.txt      # H.txt, H-b.txt, H-c.txt ...
1202                -w I.%.3uc.txt    # I.AAA.txt, I.AAB.txt, I.AAC.txt ...
1203
1204            A special feature allows the copy number to be incremented for
1205            each processed file by using %C (upper case) instead of %c.  This
1206            allows a sequential number to be added to output file names, even
1207            if the names are different.  For %C, a copy number of zero is not
1208            omitted as it is with %c.  A leading '-' causes the number to be
1209            reset at the start of each new directory, and '+' has no effect.
1210            The number before the decimal place gives the starting index, the
1211            number after the decimal place gives the field width.  The
1212            following examples show the output filenames when used with the
1213            command "exiftool rose.jpg star.jpg jet.jpg ...":
1214
1215                -w %C%f.txt       # 0rose.txt, 1star.txt, 2jet.txt
1216                -w %f-%10C.txt    # rose-10.txt, star-11.txt, jet-12.txt
1217                -w %.3C-%f.txt    # 000-rose.txt, 001-star.txt, 002-jet.txt
1218                -w %57.4C%f.txt   # 0057rose.txt, 0058star.txt, 0059jet.txt
1219
1220            All format codes may be modified by 'l' or 'u' to specify lower or
1221            upper case respectively (ie. %le for a lower case file extension).
1222            When used to modify %c or %C, the numbers are changed to an
1223            alphabetical base (see example H above).  Also, %c and %C may be
1224            modified by 'n' to count using natural numbers starting from 1,
1225            instead of 0 (see example F above).
1226
1227            This same FMT syntax is used with the -o and -tagsFromFile
1228            options, although %c and %C are only valid for output file names.
1229
1230       -W[+|!] FMT (-tagOut)
1231            This enhanced version of the -w option allows a separate output
1232            file to be created for each extracted tag.  See the -w option
1233            documentation above for details of the basic functionality.
1234            Listed here are the differences between -W and -w:
1235
1236            1) With -W, a new output file is created for each extracted tag.
1237
1238            2) -W supports three additional format codes:  %t, %g and %s
1239            represent the tag name, group name, and suggested extension for
1240            the output file (based on the format of the data).  The %g code
1241            may be followed by a single digit to specify the group family
1242            number (eg. %g1), otherwise family 0 is assumed.  The substring
1243            width/position/case specifiers may be used with these format codes
1244            in exactly the same way as with %f and %e.
1245
1246            3) The argument for -W is interpreted as a file name if it
1247            contains no format codes.  (For -w, this would be a file
1248            extension.)  This change allows a simple file name to be
1249            specified, which, when combined with the append feature, provides
1250            a method to write metadata from multiple source files to a single
1251            output file without the need for shell redirection.  For example,
1252            the following pairs of commands give the same result:
1253
1254                # overwriting existing text file
1255                exiftool test.jpg > out.txt     # shell redirection
1256                exiftool test.jpg -W+! out.txt  # equivalent -W option
1257
1258                # append to existing text file
1259                exiftool test.jpg >> out.txt    # shell redirection
1260                exiftool test.jpg -W+ out.txt   # equivalent -W option
1261
1262            4) Adding the -v option to -W sends a list of the tags and output
1263            file names to the console instead of giving a verbose dump of the
1264            entire file.  (Unless appending all output to one file for each
1265            source file by using -W+ with an output file FMT that does not
1266            contain %t, $g or %s.)
1267
1268            5) Individual list items are stored in separate files when -W is
1269            combined with -b, but note that for separate files to be created
1270            %c or %C must be used in FMT to give the files unique names.
1271
1272       -Wext EXT, --Wext EXT (-tagOutExt)
1273            This option is used to specify the type of output file(s) written
1274            by the -W option.  An output file is written only if the suggested
1275            extension matches EXT.  Multiple -Wext options may be used to
1276            write more than one type of file.  Use --Wext to write all but the
1277            specified type(s).
1278
1279       -X (-xmlFormat)
1280            Use ExifTool-specific RDF/XML formatting for console output.
1281            Implies the -a option, so duplicate tags are extracted.  The
1282            formatting options -b, -D, -H, -l, -s, -sep, -struct and -t may be
1283            used in combination with -X to affect the output, but note that
1284            the tag ID (-D, -H and -t), binary data (-b) and structured output
1285            (-struct) options are not effective for the short output (-s).
1286            Another restriction of -s is that only one tag with a given group
1287            and name may appear in the output.  Note that the tag ID options
1288            (-D, -H and -t) will produce non-standard RDF/XML unless the -l
1289            option is also used.
1290
1291            By default, -X outputs flattened tags, so -struct should be added
1292            if required to preserve XMP structures.  List-type tags with
1293            multiple values are formatted as an RDF Bag, but they are combined
1294            into a single string when -s or -sep is used.  Using -L changes
1295            the XML encoding from "UTF-8" to "windows-1252".  Other -charset
1296            settings change the encoding only if there is a corresponding
1297            standard XML character set.  The -b option causes binary data
1298            values to be written, encoded in base64 if necessary.  The -t
1299            option adds tag table information to the output (see -t for
1300            details).
1301
1302            Note:  This output is NOT the same as XMP because it uses
1303            dynamically-generated property names corresponding to the ExifTool
1304            tag names, and not the standard XMP properties.  To write XMP
1305            instead, use the -o option with an XMP extension for the output
1306            file.
1307
1308       Processing control
1309
1310       -a, --a (-duplicates, --duplicates)
1311            Allow (-a) or suppress (--a) duplicate tag names to be extracted.
1312            By default, duplicate tags are suppressed when reading unless the
1313            -ee or -X options are used or the Duplicates option is enabled in
1314            the configuration file. This option has an affect when writing
1315            only to allow duplicate Warning messages to be shown.  Duplicate
1316            tags are always extracted when copying.
1317
1318       -e (--composite)
1319            Extract existing tags only -- don't calculate composite tags.
1320
1321       -ee (-extractEmbedded)
1322            Extract information from embedded documents in EPS files, embedded
1323            EPS information and JPEG and Jpeg2000 images in PDF files,
1324            embedded MPF images in JPEG and MPO files, streaming metadata in
1325            AVCHD videos, and the resource fork of Mac OS files.  Implies the
1326            -a option.  Use -g3 or -G3 to identify the originating document
1327            for extracted information.  Embedded documents containing sub-
1328            documents are indicated with dashes in the family 3 group name.
1329            (eg. "Doc2-3" is the 3rd sub-document of the 2nd embedded
1330            document.) Note that this option may increase processing time
1331            substantially, especially for PDF files with many embedded images
1332            or videos with streaming metadata.
1333
1334            When used with -ee, the -p option is evaluated for each embedded
1335            document as if it were a separate input file.  This allows, for
1336            example, generation of GPS track logs from timed metadata in
1337            videos.  See <https://exiftool.org/geotag.html#Inverse> for
1338            examples.
1339
1340       -ext[+] EXT, --ext EXT (-extension)
1341            Process only files with (-ext) or without (--ext) a specified
1342            extension.  There may be multiple -ext and --ext options.  A plus
1343            sign may be added (ie. -ext+) to add the specified extension to
1344            the normally processed files.  EXT may begin with a leading '.',
1345            which is ignored.  Case is not significant.  "*" may be used to
1346            process files with any extension (or none at all), as in the last
1347            three examples:
1348
1349                exiftool -ext JPG DIR             # process only JPG files
1350                exiftool --ext cr2 --ext dng DIR  # supported files but CR2/DNG
1351                exiftool -ext+ txt DIR            # supported files plus TXT
1352                exiftool -ext "*" DIR             # process all files
1353                exiftool -ext "*" --ext xml DIR   # process all but XML files
1354                exiftool -ext "*" --ext . DIR     # all but those with no ext
1355
1356            Using this option has two main advantages over specifying "*.EXT"
1357            on the command line:  1) It applies to files in subdirectories
1358            when combined with the -r option.  2) The -ext option is case-
1359            insensitive, which is useful when processing files on case-
1360            sensitive filesystems.
1361
1362            Note that all files specified on the command line will be
1363            processed regardless of extension unless the -ext option is used.
1364
1365       -F[OFFSET] (-fixBase)
1366            Fix the base for maker notes offsets.  A common problem with some
1367            image editors is that offsets in the maker notes are not adjusted
1368            properly when the file is modified.  This may cause the wrong
1369            values to be extracted for some maker note entries when reading
1370            the edited file.  This option allows an integer OFFSET to be
1371            specified for adjusting the maker notes base offset.  If no OFFSET
1372            is given, ExifTool takes its best guess at the correct base.  Note
1373            that exiftool will automatically fix the offsets for images which
1374            store original offset information (eg. newer Canon models).
1375            Offsets are fixed permanently if -F is used when writing EXIF to
1376            an image. eg)
1377
1378                exiftool -F -exif:resolutionunit=inches image.jpg
1379
1380       -fast[NUM]
1381            Increase speed of extracting information.  With -fast (or -fast1),
1382            ExifTool will not scan to the end of a JPEG image to check for an
1383            AFCP or PreviewImage trailer, or past the first comment in GIF
1384            images or the audio/video data in WAV/AVI files to search for
1385            additional metadata.  These speed benefits are small when reading
1386            images directly from disk, but can be substantial if piping images
1387            through a network connection.  For more substantial speed
1388            benefits, -fast2 also causes exiftool to avoid extracting any EXIF
1389            MakerNote information.  -fast3 avoids extracting metadata from the
1390            file, and returns only pseudo System tags, but still reads the
1391            file header to obtain an educated guess at FileType.  -fast4
1392            doesn't even read the file header, and returns only System tags
1393            and a FileType based on the file extension.  Has no effect when
1394            writing.
1395
1396            Note that a separate -fast setting may be used for evaluation of a
1397            -if condition, or when ordering files with the -fileOrder option.
1398            See the -if and -fileOrder options for details.
1399
1400       -fileOrder[NUM] [-]TAG
1401            Set file processing order according to the sorted value of the
1402            specified TAG.  For example, to process files in order of date:
1403
1404                exiftool -fileOrder DateTimeOriginal DIR
1405
1406            Additional -fileOrder options may be added for secondary sort
1407            keys.  Numbers are sorted numerically, and all other values are
1408            sorted alphabetically.  Files missing the specified tag are sorted
1409            last.  The sort order may be reversed by prefixing the tag name
1410            with a "-" (eg.  "-fileOrder -createdate").  Print conversion of
1411            the sorted values is disabled with the -n option, or a "#"
1412            appended to the tag name.  Other formatting options (eg. -d) have
1413            no effect on the sorted values.  Note that the -fileOrder option
1414            can have a large performance impact since it involves an
1415            additional processing pass of each file, but this impact may be
1416            reduced by specifying a NUM for the -fast level used during the
1417            metadata-extraction phase.  For example, -fileOrder4 may be used
1418            if TAG is a pseudo System tag.  If multiple -fileOrder options are
1419            used, the extraction is done at the lowest -fast level.
1420
1421       -i DIR (-ignore)
1422            Ignore specified directory name.  DIR may be either an individual
1423            folder name, or a full path.  If a full path is specified, it must
1424            match the Directory tag exactly to be ignored.  Use multiple -i
1425            options to ignore more than one directory name.  A special DIR
1426            value of "SYMLINKS" (case sensitive) may be specified to ignore
1427            symbolic links when the -r option is used.
1428
1429       -if[NUM] EXPR
1430            Specify a condition to be evaluated before processing each FILE.
1431            EXPR is a Perl-like logic expression containing tag names prefixed
1432            by "$" symbols.  It is evaluated with the tags from each FILE in
1433            turn, and the file is processed only if the expression returns
1434            true.  Unlike Perl variable names, tag names are not case
1435            sensitive and may contain a hyphen.  As well, tag names may have a
1436            leading group names separated by colons, and/or a trailing "#"
1437            character to disable print conversion.  The expression $GROUP:all
1438            evaluates to 1 if any tag exists in the specified "GROUP", or 0
1439            otherwise (see note 2 below).  When multiple -if options are used,
1440            all conditions must be satisfied to process the file.  Returns an
1441            exit status of 2 if all files fail the condition.  Below are a few
1442            examples:
1443
1444                # extract shutterspeed from all Canon images in a directory
1445                exiftool -shutterspeed -if '$make eq "Canon"' dir
1446
1447                # add one hour to all images created on or after Apr. 2, 2006
1448                exiftool -alldates+=1 -if '$CreateDate ge "2006:04:02"' dir
1449
1450                # set EXIF ISO value if possible, unless it is set already
1451                exiftool '-exif:iso<iso' -if 'not $exif:iso' dir
1452
1453                # find images containing a specific keyword (case insensitive)
1454                exiftool -if '$keywords =~ /harvey/i' -filename dir
1455
1456            Adding NUM to the -if option causes a separate processing pass to
1457            be executed for evaluating EXPR at a -fast level given by NUM (see
1458            the -fast option documentation for details).  Without NUM, only
1459            one processing pass is done at the level specified by the -fast
1460            option.  For example, using -if4 is possible if EXPR uses only
1461            pseudo System tags, and may significantly speed processing if
1462            enough files fail the condition.
1463
1464            Notes:
1465
1466            1) The -n and -b options also apply to tags used in EXPR.
1467
1468            2) Some binary data blocks are not extracted unless specified
1469            explicitly.  These tags are not available for use in the -if
1470            condition unless they are also specified on the command line.  The
1471            alternative is to use the $GROUP:all syntax. (eg. Use $exif:all
1472            instead of $exif in EXPR to test for the existence of EXIF tags.)
1473
1474            3) Tags in the string are interpolated the same way as with -p
1475            before the expression is evaluated.  In this interpolation, $/ is
1476            converted to a newline and $$ represents a single "$" symbol (so
1477            Perl variables, if used, require a double "$").
1478
1479            4) The condition may only test tags from the file being processed.
1480            To process one file based on tags from another, two steps are
1481            required.  For example, to process XMP sidecar files in directory
1482            "DIR" based on tags from the associated NEF:
1483
1484                exiftool -if EXPR -p '$directory/$filename' -ext nef DIR > nef.txt
1485                exiftool -@ nef.txt -srcfile %d%f.xmp ...
1486
1487            5) The -a option has no effect on the evaluation of the
1488            expression, and the values of duplicate tags are accessible only
1489            by specifying a group name (such as a family 4 instance number,
1490            eg. $Copy1:TAG, $Copy2:TAG, etc).
1491
1492            6) A special "OK" UserParam is available to test the success of
1493            the previous command when -execute was used, and may be used like
1494            any other tag in the condition (ie. "$OK").
1495
1496       -m (-ignoreMinorErrors)
1497            Ignore minor errors and warnings.  This enables writing to files
1498            with minor errors and disables some validation checks which could
1499            result in minor warnings.  Generally, minor errors/warnings
1500            indicate a problem which usually won't result in loss of metadata
1501            if ignored.  However, there are exceptions, so ExifTool leaves it
1502            up to you to make the final decision.  Minor errors and warnings
1503            are indicated by "[minor]" at the start of the message.  Warnings
1504            which affect processing when ignored are indicated by "[Minor]"
1505            (with a capital "M").  Note that this causes missing values in
1506            -tagsFromFile, -p and -if strings to be set to an empty string
1507            rather than an undefined value.
1508
1509       -o OUTFILE or FMT (-out)
1510            Set the output file or directory name when writing information.
1511            Without this option, when any "real" tags are written the original
1512            file is renamed to "FILE_original" and output is written to FILE.
1513            When writing only FileName and/or Directory "pseudo" tags, -o
1514            causes the file to be copied instead of moved, but directories
1515            specified for either of these tags take precedence over that
1516            specified by the -o option.
1517
1518            OUTFILE may be "-" to write to stdout.  The output file name may
1519            also be specified using a FMT string in which %d, %f and %e
1520            represent the directory, file name and extension of FILE.  Also,
1521            %c may be used to add a copy number. See the -w option for FMT
1522            string examples.
1523
1524            The output file is taken to be a directory name if it already
1525            exists as a directory or if the name ends with '/'.  Output
1526            directories are created if necessary.  Existing files will not be
1527            overwritten.  Combining the -overwrite_original option with -o
1528            causes the original source file to be erased after the output file
1529            is successfully written.
1530
1531            A special feature of this option allows the creation of certain
1532            types of files from scratch, or with the metadata from another
1533            type of file.  The following file types may be created using this
1534            technique:
1535
1536                XMP, EXIF, EXV, MIE, ICC/ICM, VRD, DR4
1537
1538            The output file type is determined by the extension of OUTFILE
1539            (specified as "-.EXT" when writing to stdout).  The output file is
1540            then created from a combination of information in FILE (as if the
1541            -tagsFromFile option was used), and tag values assigned on the
1542            command line.  If no FILE is specified, the output file may be
1543            created from scratch using only tags assigned on the command line.
1544
1545       -overwrite_original
1546            Overwrite the original FILE (instead of preserving it by adding
1547            "_original" to the file name) when writing information to an
1548            image.  Caution: This option should only be used if you already
1549            have separate backup copies of your image files.  The overwrite is
1550            implemented by renaming a temporary file to replace the original.
1551            This deletes the original file and replaces it with the edited
1552            version in a single operation.  When combined with -o, this option
1553            causes the original file to be deleted if the output file was
1554            successfully written (ie. the file is moved instead of copied).
1555
1556       -overwrite_original_in_place
1557            Similar to -overwrite_original except that an extra step is added
1558            to allow the original file attributes to be preserved.  For
1559            example, on a Mac this causes the original file creation date,
1560            type, creator, label color, icon, Finder tags, other extended
1561            attributes and hard links to the file to be preserved (but note
1562            that the Mac OS resource fork is always preserved unless
1563            specifically deleted with "-rsrc:all=").  This is implemented by
1564            opening the original file in update mode and replacing its data
1565            with a copy of a temporary file before deleting the temporary.
1566            The extra step results in slower performance, so the
1567            -overwrite_original option should be used instead unless
1568            necessary.
1569
1570       -P (-preserve)
1571            Preserve the filesystem modification date/time ("FileModifyDate")
1572            of the original file when writing.  Note that some filesystems
1573            store a creation date (Windows "FileCreateDate" or Mac
1574            "MDItemFSCreationDate") which is not affected by this option.  The
1575            creation date is preserved on Windows systems where Win32API::File
1576            and Win32::API are available regardless of this setting.  For
1577            other systems, the -overwrite_original_in_place option may be used
1578            if necessary to preserve the creation date.  This option is
1579            superseded by any value written to the FileModifyDate tag.
1580
1581       -password PASSWD
1582            Specify password to allow processing of password-protected PDF
1583            documents.  If a password is required but not given, a warning is
1584            issued and the document is not processed.  This option is ignored
1585            if a password is not required.
1586
1587       -progress[:[TITLE]]
1588            Show the progress when processing files.  Without a colon, the
1589            -progress option adds a progress count in brackets after the name
1590            of each processed file, giving the current file number and the
1591            total number of files to be processed.  Implies the -v0 option,
1592            causing the names of processed files to also be printed when
1593            writing.  When combined with the -if option, the total count
1594            includes all files before the condition is applied, but files that
1595            fail the condition will not have their names printed.
1596
1597            If followed by a colon (ie. -progress:), the console window title
1598            is set according to the specified TITLE string.  If no TITLE is
1599            given, a default TITLE string of "ExifTool %p%%" is assumed.  In
1600            the string, %f represents the file name, %p is the progress as a
1601            percent, %r is the progress as a ratio, %##b is a progress bar of
1602            width "##" (20 characters if "##" is omitted), and %% is a %
1603            character.  May be combined with the normal -progress option to
1604            also show the progress count in console messages.  (Note: For this
1605            feature to function correctly on Mac/Linux, stderr must go to the
1606            console.)
1607
1608       -q (-quiet)
1609            Quiet processing.  One -q suppresses normal informational
1610            messages, and a second -q suppresses warnings as well.  Error
1611            messages can not be suppressed, although minor errors may be
1612            downgraded to warnings with the -m option, which may then be
1613            suppressed with "-q -q".
1614
1615       -r[.] (-recurse)
1616            Recursively process files in subdirectories.  Only meaningful if
1617            FILE is a directory name.  Subdirectories with names beginning
1618            with "." are not processed unless "." is added to the option name
1619            (ie. -r. or -recurse.).  By default, exiftool will also follow
1620            symbolic links to directories if supported by the system, but this
1621            may be disabled with "-i SYMLINKS" (see the -i option for
1622            details).  Combine this with -ext options to control the types of
1623            files processed.
1624
1625       -scanForXMP
1626            Scan all files (even unsupported formats) for XMP information
1627            unless found already.  When combined with the -fast option, only
1628            unsupported file types are scanned.  Warning: It can be time
1629            consuming to scan large files.
1630
1631       -u (-unknown)
1632            Extract values of unknown tags.  Add another -u to also extract
1633            unknown information from binary data blocks.  This option applies
1634            to tags with numerical tag ID's, and causes tag names like
1635            "Exif_0xc5d9" to be generated for unknown information.  It has no
1636            effect on information types which have human-readable tag ID's
1637            (such as XMP), since unknown tags are extracted automatically from
1638            these formats.
1639
1640       -U (-unknown2)
1641            Extract values of unknown tags as well as unknown information from
1642            some binary data blocks.  This is the same as two -u options.
1643
1644       -wm MODE (-writeMode)
1645            Set mode for writing/creating tags.  MODE is a string of one or
1646            more characters from the list below.  The default write mode is
1647            "wcg".
1648
1649                w - Write existing tags
1650                c - Create new tags
1651                g - create new Groups as necessary
1652
1653            For example, use "-wm cg" to only create new tags (and avoid
1654            editing existing ones).
1655
1656            The level of the group is the SubDirectory level in the metadata
1657            structure.  For XMP or IPTC this is the full XMP/IPTC block (the
1658            family 0 group), but for EXIF this is the individual IFD (the
1659            family 1 group).
1660
1661       -z (-zip)
1662            When reading, causes information to be extracted from .gz and .bz2
1663            compressed images (only one image per archive; requires gzip and
1664            bzip2 to be available).  When writing, causes compressed
1665            information to be written if supported by the metadata format (eg.
1666            compressed textual metadata in PNG), disables the recommended
1667            padding in embedded XMP (saving 2424 bytes when writing XMP in a
1668            file), and writes XMP in shorthand format -- the equivalent of
1669            setting the API Compress=1 and Compact="NoPadding,Shorthand".
1670
1671       Other options
1672
1673       -@ ARGFILE
1674            Read command-line arguments from the specified file.  The file
1675            contains one argument per line (NOT one option per line -- some
1676            options require additional arguments, and all arguments must be
1677            placed on separate lines).  Blank lines and lines beginning with
1678            "#" are ignored (unless they start with "#[CSTR]", in which case
1679            the rest of the line is treated as a C string, allowing standard C
1680            escape sequences such as "\n" for a newline).  White space at the
1681            start of a line is removed.  Normal shell processing of arguments
1682            is not performed, which among other things means that arguments
1683            should not be quoted and spaces are treated as any other
1684            character.  ARGFILE may exist relative to either the current
1685            directory or the exiftool directory unless an absolute pathname is
1686            given.
1687
1688            For example, the following ARGFILE will set the value of Copyright
1689            to "Copyright YYYY, Phil Harvey", where "YYYY" is the year of
1690            CreateDate:
1691
1692                -d
1693                %Y
1694                -copyright<Copyright $createdate, Phil Harvey
1695
1696            Arguments in ARGFILE behave exactly the same as if they were
1697            entered at the location of the -@ option on the command line, with
1698            the exception that the -config and -common_args options may not be
1699            used in an ARGFILE.
1700
1701       -k (-pause)
1702            Pause with the message "-- press any key --" or "-- press RETURN
1703            --" (depending on your system) before terminating.  This option is
1704            used to prevent the command window from closing when run as a
1705            Windows drag and drop application.
1706
1707       -list, -listw, -listf, -listr, -listwf, -listg[NUM], -listd, -listx
1708            Print a list of all valid tag names (-list), all writable tag
1709            names (-listw), all supported file extensions (-listf), all
1710            recognized file extensions (-listr), all writable file extensions
1711            (-listwf), all tag groups [in a specified family] (-listg[NUM]),
1712            all deletable tag groups (-listd), or an XML database of tag
1713            details including language translations (-listx).  The -list,
1714            -listw and -listx options may be followed by an additional
1715            argument of the form "-GROUP:All" to list only tags in a specific
1716            group, where "GROUP" is one or more family 0-2 group names
1717            (excepting EXIF IFD groups) separated by colons.  With -listg, NUM
1718            may be given to specify the group family, otherwise family 0 is
1719            assumed.  The -l option may be combined with -listf, -listr or
1720            -listwf to add file descriptions to the list.  The -lang option
1721            may be combined with -listx to output descriptions in a single
1722            language.  Here are some examples:
1723
1724                -list               # list all tag names
1725                -list -EXIF:All     # list all EXIF tags
1726                -list -xmp:time:all # list all XMP tags relating to time
1727                -listw -XMP-dc:All  # list all writable XMP-dc tags
1728                -listf              # list all supported file extensions
1729                -listr              # list all recognized file extensions
1730                -listwf             # list all writable file extensions
1731                -listg1             # list all groups in family 1
1732                -listd              # list all deletable groups
1733                -listx -EXIF:All    # list database of EXIF tags in XML format
1734                -listx -XMP:All -s  # list short XML database of XMP tags
1735
1736            When combined with -listx, the -s option shortens the output by
1737            omitting the descriptions and values (as in the last example
1738            above), and -f adds a 'flags' attribute if applicable.  The flags
1739            are formatted as a comma-separated list of the following possible
1740            values:  Avoid, Binary, List, Mandatory, Permanent, Protected,
1741            Unknown and Unsafe (see the Tag Name documentation).  For XMP List
1742            tags, the list type (Alt, Bag or Seq) is added to the flags, and
1743            flattened structure tags are indicated by a Flattened flag.
1744
1745            Note that none of the -list options require an input FILE.
1746
1747       -ver Print exiftool version number.  The -v option may be added to
1748            print addition system information (see the README file of the full
1749            distribution for more details about optional libraries), or -v2 to
1750            also list the Perl include directories.
1751
1752       Special features
1753
1754       -geotag TRKFILE
1755            Geotag images from the specified GPS track log file.  Using the
1756            -geotag option is equivalent to writing a value to the "Geotag"
1757            tag.  The GPS position is interpolated from the track at a time
1758            specified by the value written to the "Geotime" tag.  If "Geotime"
1759            is not specified, the value is copied from "DateTimeOriginal#"
1760            (the "#" is added to copy the unformatted value, avoiding
1761            potential conflicts with the -d option).  For example, the
1762            following two commands are equivalent:
1763
1764                exiftool -geotag trk.log image.jpg
1765                exiftool -geotag trk.log "-Geotime<DateTimeOriginal#" image.jpg
1766
1767            When the "Geotime" value is converted to UTC, the local system
1768            timezone is assumed unless the date/time value contains a
1769            timezone.  Writing "Geotime" causes the following tags to be
1770            written (provided they can be calculated from the track log, and
1771            they are supported by the destination metadata format):
1772            GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef,
1773            GPSAltitude, GPSAltitudeRef, GPSDateStamp, GPSTimeStamp,
1774            GPSDateTime, GPSTrack, GPSTrackRef, GPSSpeed, GPSSpeedRef,
1775            GPSImgDirection, GPSImgDirectionRef, GPSPitch, GPSRoll,
1776            AmbientTemperature and CameraElevationAngle.  By default, tags are
1777            created in EXIF, and updated in XMP only if they already exist.
1778            However, "EXIF:Geotime" or "XMP:Geotime" may be specified to write
1779            only EXIF or XMP tags respectively.  Note that GPSPitch and
1780            GPSRoll are non-standard, and require user-defined tags in order
1781            to be written.
1782
1783            The "Geosync" tag may be used to specify a time correction which
1784            is applied to each "Geotime" value for synchronization with GPS
1785            time.  For example, the following command compensates for image
1786            times which are 1 minute and 20 seconds behind GPS:
1787
1788                exiftool -geosync=+1:20 -geotag a.log DIR
1789
1790            Advanced "Geosync" features allow a linear time drift correction
1791            and synchronization from previously geotagged images.  See
1792            "geotag.html" in the full ExifTool distribution for more
1793            information.
1794
1795            Multiple -geotag options may be used to concatenate GPS track log
1796            data.  Also, a single -geotag option may be used to load multiple
1797            track log files by using wildcards in the TRKFILE name, but note
1798            that in this case TRKFILE must be quoted on most systems (with the
1799            notable exception of Windows) to prevent filename expansion.  For
1800            example:
1801
1802                exiftool -geotag "TRACKDIR/*.log" IMAGEDIR
1803
1804            Currently supported track file formats are GPX, NMEA RMC/GGA/GLL,
1805            KML, IGC, Garmin XML and TCX, Magellan PMGNTRK, Honeywell PTNTHPR,
1806            Bramor gEO, Winplus Beacon TXT, and GPS/IMU CSV files.  See
1807            "GEOTAGGING EXAMPLES" for examples. Also see "geotag.html" in the
1808            full ExifTool distribution and the Image::ExifTool Options for
1809            more details and for information about geotag configuration
1810            options.
1811
1812       -globalTimeShift SHIFT
1813            Shift all formatted date/time values by the specified amount when
1814            reading.  Does not apply to unformatted (-n) output.  SHIFT takes
1815            the same form as the date/time shift when writing (see
1816            Image::ExifTool::Shift.pl for details), with a negative shift
1817            being indicated with a minus sign ("-") at the start of the SHIFT
1818            string.  For example:
1819
1820                # return all date/times, shifted back by 1 hour
1821                exiftool -globalTimeShift -1 -time:all a.jpg
1822
1823                # set the file name from the shifted CreateDate (-1 day) for
1824                # all images in a directory
1825                exiftool "-filename<createdate" -globaltimeshift "-0:0:1 0:0:0" \
1826                    -d %Y%m%d-%H%M%S.%%e dir
1827
1828       -use MODULE
1829            Add features from specified plug-in MODULE.  Currently, the MWG
1830            module is the only plug-in module distributed with exiftool.  This
1831            module adds read/write support for tags as recommended by the
1832            Metadata Working Group.  As a convenience, "-use MWG" is assumed
1833            if the "MWG" group is specified for any tag on the command line.
1834            See the MWG Tags documentation for more details.  Note that this
1835            option is not reversible, and remains in effect until the
1836            application terminates, even across the "-execute" option.
1837
1838       Utilities
1839
1840       -restore_original
1841       -delete_original[!]
1842            These utility options automate the maintenance of the "_original"
1843            files created by exiftool.  They have no effect on files without
1844            an "_original" copy.  The -restore_original option restores the
1845            specified files from their original copies by renaming the
1846            "_original" files to replace the edited versions.  For example,
1847            the following command restores the originals of all JPG images in
1848            directory "DIR":
1849
1850                exiftool -restore_original -ext jpg DIR
1851
1852            The -delete_original option deletes the "_original" copies of all
1853            files specified on the command line.  Without a trailing "!" this
1854            option prompts for confirmation before continuing.  For example,
1855            the following command deletes "a.jpg_original" if it exists, after
1856            asking "Are you sure?":
1857
1858                exiftool -delete_original a.jpg
1859
1860            These options may not be used with other options to read or write
1861            tag values in the same command, but may be combined with options
1862            such -ext, -if, -r, -q and -v.
1863
1864       Advanced options
1865
1866       Among other things, the advanced options allow complex processing to be
1867       performed from a single command without the need for additional
1868       scripting.  This may be particularly useful for implementations such as
1869       Windows drag-and-drop applications.  These options may also be used to
1870       improve performance in multi-pass processing by reducing the overhead
1871       required to load exiftool for each invocation.
1872
1873       -api OPT[[^]=[VAL]]
1874            Set ExifTool API option.  OPT is an API option name.  The option
1875            value is set to 1 if =VAL is omitted.  If VAL is omitted, the
1876            option value is set to undef if "=" is used, or an empty string
1877            with "^=".  See Image::ExifTool Options for a list of available
1878            API options.  This overrides API options set via the config file.
1879
1880       -common_args
1881            Specifies that all arguments following this option are common to
1882            all executed commands when -execute is used.  This and the -config
1883            option are the only options that may not be used inside a -@
1884            ARGFILE.  Note that by definition this option and its arguments
1885            MUST come after all other options on the command line.
1886
1887       -config CFGFILE
1888            Load specified configuration file instead of the default
1889            ".ExifTool_config".  If used, this option must come before all
1890            other arguments on the command line and applies to all -execute'd
1891            commands.  The CFGFILE must exist relative to the current working
1892            directory or the exiftool application directory unless an absolute
1893            path is specified.  Loading of the default config file may be
1894            disabled by setting CFGFILE to an empty string (ie.  "").  See
1895            <https://exiftool.org/config.html> and config_files/example.config
1896            in the full ExifTool distribution for details about the
1897            configuration file syntax.
1898
1899       -echo[NUM] TEXT
1900            Echo TEXT to stdout (-echo or -echo1) or stderr (-echo2).  Text is
1901            output as the command line is parsed, before the processing of any
1902            input files.  NUM may also be 3 or 4 to output text (to stdout or
1903            stderr respectively) after processing is complete.
1904
1905       -execute[NUM]
1906            Execute command for all arguments up to this point on the command
1907            line (plus any arguments specified by -common_args).  The result
1908            is as if the commands were executed as separate command lines
1909            (with the exception of the -config and -use options which remain
1910            in effect for subsequent commands).  Allows multiple commands to
1911            be executed from a single command line.  NUM is an optional number
1912            that is echoed in the "{ready}" message when using the -stay_open
1913            feature.
1914
1915       -srcfile FMT
1916            Specify a different source file to be processed based on the name
1917            of the original FILE.  This may be useful in some special
1918            situations for processing related preview images or sidecar files.
1919            See the -w option for a description of the FMT syntax.  Note that
1920            file name FMT strings for all options are based on the original
1921            FILE specified from the command line, not the name of the source
1922            file specified by -srcfile.
1923
1924            For example, to copy metadata from NEF files to the corresponding
1925            JPG previews in a directory where other JPG images may exist:
1926
1927                exiftool -ext nef -tagsfromfile @ -srcfile %d%f.jpg dir
1928
1929            If more than one -srcfile option is specified, the files are
1930            tested in order and the first existing source file is processed.
1931            If none of the source files already exist, then exiftool uses the
1932            first -srcfile specified.
1933
1934            A FMT of "@" may be used to represent the original FILE, which may
1935            be useful when specifying multiple -srcfile options (eg. to fall
1936            back to processing the original FILE if no sidecar exists).
1937
1938       -stay_open FLAG
1939            If FLAG is 1 or "True", causes exiftool keep reading from the -@
1940            ARGFILE even after reaching the end of file.  This feature allows
1941            calling applications to pre-load exiftool, thus avoiding the
1942            overhead of loading exiftool for each command.  The procedure is
1943            as follows:
1944
1945            1) Execute "exiftool -stay_open True -@ ARGFILE", where ARGFILE is
1946            the name of an existing (possibly empty) argument file or "-" to
1947            pipe arguments from the standard input.
1948
1949            2) Write exiftool command-line arguments to ARGFILE, one argument
1950            per line (see the -@ option for details).
1951
1952            3) Write "-execute\n" to ARGFILE, where "\n" represents a newline
1953            sequence.  (Note: You may need to flush your write buffers here if
1954            using buffered output.)  Exiftool will then execute the command
1955            with the arguments received up to this point, send a "{ready}"
1956            message to stdout when done (unless the -q or -T option is used),
1957            and continue trying to read arguments for the next command from
1958            ARGFILE.  To aid in command/response synchronization, any number
1959            appended to the "-execute" option is echoed in the "{ready}"
1960            message.  For example, "-execute613" results in "{ready613}".
1961
1962            4) Repeat steps 2 and 3 for each command.
1963
1964            5) Write "-stay_open\nFalse\n" to ARGFILE when done.  This will
1965            cause exiftool to process any remaining command-line arguments
1966            then exit normally.
1967
1968            The input ARGFILE may be changed at any time before step 5 above
1969            by writing the following lines to the currently open ARGFILE:
1970
1971                -stay_open
1972                True
1973                -@
1974                NEWARGFILE
1975
1976            This causes ARGFILE to be closed, and NEWARGFILE to be kept open.
1977            (Without the -stay_open here, exiftool would have returned to
1978            reading arguments from ARGFILE after reaching the end of
1979            NEWARGFILE.)
1980
1981            Note:  When writing arguments to a disk file there is a delay of
1982            up to 0.01 seconds after writing "-execute\n" before exiftool
1983            starts processing the command.  This delay may be avoided by
1984            sending a CONT signal to the exiftool process immediately after
1985            writing "-execute\n".  (There is no associated delay when writing
1986            arguments via a pipe with "-@ -", so the signal is not necessary
1987            when using this technique.)
1988
1989       -userParam PARAM[[^]=[VAL]]
1990            Set user parameter.  PARAM is an arbitrary user parameter name.
1991            This is an interface to the API UserParam option (see the
1992            Image::ExifTool Options documentation), and provides a method to
1993            access user-defined parameters from inside tag name expressions
1994            (as if it were any other tag, see example below), and from
1995            PrintConv/ValueConv logic (via the ExifTool Options function).
1996            Similar to the -api option, the parameter value is set to 1 if
1997            =VAL is omitted, undef if just VAL is omitted with "=", or an
1998            empty string if VAL is omitted with "^=".
1999
2000                exiftool -p '$test from $filename' -userparam test=Hello FILE
2001
2002       Advanced formatting feature
2003
2004       An advanced formatting feature allows modification of the value of any
2005       tag interpolated within a -if or -p option argument, or a -tagsFromFile
2006       redirection string.  Tag names within these strings are prefixed by a
2007       "$" symbol, and an arbitrary Perl expression may be applied to the tag
2008       value by placing braces around the tag name and inserting the
2009       expression after the name, separated by a semicolon (ie.
2010       "${TAG;EXPR}").  The expression acts on the value of the tag through
2011       the default input variable ($_), and has access to the full ExifTool
2012       API through the current ExifTool object ($self) and the tag key ($tag).
2013       It may contain any valid Perl code, including translation ("tr///") and
2014       substitution ("s///") operations, but note that braces within the
2015       expression must be balanced.  The example below prints the camera Make
2016       with spaces translated to underlines, and multiple consecutive
2017       underlines replaced by a single underline:
2018
2019           exiftool -p '${make;tr/ /_/;s/__+/_/g}' image.jpg
2020
2021       An "@" may be added after the tag name to make the expression act on
2022       individual list items for list-type tags, simplifying list processing.
2023       Set $_ to undef to remove an item from the list.  As an example, the
2024       following command returns all subjects not containing the string "xxx":
2025
2026           exiftool -p '${subject@;$_=undef if /xxx/}' image.jpg
2027
2028       A default expression of "tr(/\\?*:|"<>\0)()d" is assumed if the
2029       expression is empty (ie. "${TAG;}").  This removes the characters / \ ?
2030       * : | < > and null from the printed value.  (These characters are
2031       illegal in Windows file names, so this feature is useful if tag values
2032       are used in file names.)
2033
2034       Helper functions
2035
2036       "DateFmt"
2037
2038       Simplifies reformatting of individual date/time values.  This function
2039       acts on a standard EXIF-formatted date/time value in $_ and formats it
2040       according to the specified format string (see the -d option).  To avoid
2041       trying to reformat an already-formatted date/time value, a "#" must be
2042       added to the tag name (as in the example below) if the -d option is
2043       also used.  For example:
2044
2045           exiftool -p '${createdate#;DateFmt("%Y-%m-%d_%H%M%S")}' a.jpg
2046
2047       "ShiftTime"
2048
2049       Shifts EXIF-formatted date/time string by a specified amount.  Start
2050       with a leading minus sign to shift backwards in time.  See
2051       Image::ExifTool::Shift.pl for details about shift syntax.  For example,
2052       to shift a date/time value back by one year:
2053
2054           exiftool -p '${createdate;ShiftTime("-1:0:0 0")}' a.jpg
2055
2056       "NoDups"
2057
2058       Removes duplicate items from a list with a separator specified by the
2059       -sep option.  This function is most useful when copying list-type tags.
2060       For example, the following command may be used to remove duplicate
2061       Keywords:
2062
2063           exiftool -sep '##' '-keywords<${keywords;NoDups}' a.jpg
2064
2065       The -sep option is necessary to split the string back into individual
2066       list items when writing to a list-type tag.
2067
2068       An optional flag argument may be set to 1 to cause "NoDups" to return
2069       undef if no duplicates existed, thus preventing the file from being
2070       rewritten unnecessarily:
2071
2072           exiftool -sep '##' '-keywords<${keywords;NoDups(1)}' a.jpg
2073
2074       Note that function names are case sensitive.
2075

WINDOWS UNICODE FILE NAMES

2077       In Windows, command-line arguments are specified using the current code
2078       page and are recoded automatically to the system code page.  This
2079       recoding is not done for arguments in ExifTool arg files, so by default
2080       filenames in arg files use the system code page.  Unfortunately, these
2081       code pages are not complete character sets, so not all file names may
2082       be represented.
2083
2084       ExifTool 9.79 and later allow the file name encoding to be specified
2085       with "-charset filename=CHARSET", where "CHARSET" is the name of a
2086       valid ExifTool character set, preferably "UTF8" (see the -charset
2087       option for a complete list).  Setting this triggers the use of Windows
2088       wide-character i/o routines, thus providing support for most Unicode
2089       file names (see note 4).  But note that it is not trivial to pass
2090       properly encoded file names on the Windows command line (see
2091       <https://exiftool.org/faq.html#Q18> for details), so placing them in a
2092       UTF-8 encoded -@ argfile and using "-charset filename=utf8" is
2093       recommended if possible.
2094
2095       A warning is issued if a specified filename contains special characters
2096       and the filename character set was not provided.  However, the warning
2097       may be disabled by setting "-charset filename=""", and ExifTool may
2098       still function correctly if the system code page matches the character
2099       set used for the file names.
2100
2101       When a directory name is provided, the file name encoding need not be
2102       specified (unless the directory name contains special characters), and
2103       ExifTool will automatically use wide-character routines to scan the
2104       directory.
2105
2106       The filename character set applies to the FILE arguments as well as
2107       filename arguments of -@, -geotag, -o, -p, -srcfile, -tagsFromFile,
2108       -csv=, -j= and -TAG<=.  However, it does not apply to the -config
2109       filename, which always uses the system character set.  The "-charset
2110       filename=" option must come before the -@ option to be effective, but
2111       the order doesn't matter with respect to other options.
2112
2113       Notes:
2114
2115       1) FileName and Directory tag values still use the same encoding as
2116       other tag values, and are converted to/from the filename character set
2117       when writing/reading if specified.
2118
2119       2) Unicode support is not yet implemented for other Windows-based
2120       systems like Cygwin.
2121
2122       3) See "WRITING READ-ONLY FILES" below for a note about editing read-
2123       only files with Unicode names.
2124
2125       4) Unicode file names with surrogate pairs (code points over U+FFFF)
2126       still cause problems.
2127

WRITING READ-ONLY FILES

2129       In general, ExifTool may be used to write metadata to read-only files
2130       provided that the user has write permission in the directory.  However,
2131       there are three cases where file write permission is also required:
2132
2133       1) When using the -overwrite_original_in_place option.
2134
2135       2) When writing only pseudo System tags (eg. FileModifyDate).
2136
2137       3) On Windows if the file has Unicode characters in its name, and a)
2138       the -overwrite_original option is used, or b) the "_original" backup
2139       already exists.
2140

READING EXAMPLES

2142       Note: Beware when cutting and pasting these examples into your
2143       terminal!  Some characters such as single and double quotes and hyphens
2144       may have been changed into similar-looking yet functionally-different
2145       characters by the text formatter used to display this documentation.
2146       Also note that Windows users must use double quotes instead of single
2147       quotes as below around arguments containing special characters.
2148
2149       exiftool -a -u -g1 a.jpg
2150            Print all meta information in an image, including duplicate and
2151            unknown tags, sorted by group (for family 1).  For performance
2152            reasons, this command may not extract all available metadata.
2153            (Metadata in embedded documents, metadata extracted by external
2154            utilities, and metadata requiring excessive processing time may
2155            not be extracted).  Add "-ee" and "-api RequestAll=3" to the
2156            command to extract absolutely everything available.
2157
2158       exiftool -common dir
2159            Print common meta information for all images in "dir".  "-common"
2160            is a shortcut tag representing common EXIF meta information.
2161
2162       exiftool -T -createdate -aperture -shutterspeed -iso dir > out.txt
2163            List specified meta information in tab-delimited column form for
2164            all images in "dir" to an output text file named "out.txt".
2165
2166       exiftool -s -ImageSize -ExposureTime b.jpg
2167            Print ImageSize and ExposureTime tag names and values.
2168
2169       exiftool -l -canon c.jpg d.jpg
2170            Print standard Canon information from two image files.
2171
2172       exiftool -r -w .txt -common pictures
2173            Recursively extract common meta information from files in
2174            "pictures" directory, writing text output to ".txt" files with the
2175            same names.
2176
2177       exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg
2178            Save thumbnail image from "image.jpg" to a file called
2179            "thumbnail.jpg".
2180
2181       exiftool -b -JpgFromRaw -w _JFR.JPG -ext NEF -r .
2182            Recursively extract JPG image from all Nikon NEF files in the
2183            current directory, adding "_JFR.JPG" for the name of the output
2184            JPG files.
2185
2186       exiftool -a -b -W %d%f_%t%-c.%s -preview:all dir
2187            Extract all types of preview images (ThumbnailImage, PreviewImage,
2188            JpgFromRaw, etc.) from files in directory "dir", adding the tag
2189            name to the output preview image file names.
2190
2191       exiftool -d '%r %a, %B %e, %Y' -DateTimeOriginal -S -s -ext jpg .
2192            Print formatted date/time for all JPG files in the current
2193            directory.
2194
2195       exiftool -IFD1:XResolution -IFD1:YResolution image.jpg
2196            Extract image resolution from EXIF IFD1 information (thumbnail
2197            image IFD).
2198
2199       exiftool '-*resolution*' image.jpg
2200            Extract all tags with names containing the word "Resolution" from
2201            an image.
2202
2203       exiftool -xmp:author:all -a image.jpg
2204            Extract all author-related XMP information from an image.
2205
2206       exiftool -xmp -b a.jpg > out.xmp
2207            Extract complete XMP data record intact from "a.jpg" and write it
2208            to "out.xmp" using the special "XMP" tag (see the Extra tags in
2209            Image::ExifTool::TagNames).
2210
2211       exiftool -p '$filename has date $dateTimeOriginal' -q -f dir
2212            Print one line of output containing the file name and
2213            DateTimeOriginal for each image in directory "dir".
2214
2215       exiftool -ee -p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts
2216            Extract all GPS positions from an AVCHD video.
2217
2218       exiftool -icc_profile -b -w icc image.jpg
2219            Save complete ICC_Profile from an image to an output file with the
2220            same name and an extension of ".icc".
2221
2222       exiftool -htmldump -w tmp/%f_%e.html t/images
2223            Generate HTML pages from a hex dump of EXIF information in all
2224            images from the "t/images" directory.  The output HTML files are
2225            written to the "tmp" directory (which is created if it didn't
2226            exist), with names of the form 'FILENAME_EXT.html'.
2227
2228       exiftool -a -b -ee -embeddedimage -W Image_%.3g3.%s file.pdf
2229            Extract embedded JPG and JP2 images from a PDF file.  The output
2230            images will have file names like "Image_#.jpg" or "Image_#.jp2",
2231            where "#" is the ExifTool family 3 embedded document number for
2232            the image.
2233

WRITING EXAMPLES

2235       Note that quotes are necessary around arguments which contain certain
2236       special characters such as ">", "<" or any white space.  These quoting
2237       techniques are shell dependent, but the examples below will work for
2238       most Unix shells.  With the Windows cmd shell however, double quotes
2239       should be used (eg. -Comment="This is a new comment").
2240
2241       exiftool -Comment='This is a new comment' dst.jpg
2242            Write new comment to a JPG image (replaces any existing comment).
2243
2244       exiftool -comment= -o newdir -ext jpg .
2245            Remove comment from all JPG images in the current directory,
2246            writing the modified images to a new directory.
2247
2248       exiftool -keywords=EXIF -keywords=editor dst.jpg
2249            Replace existing keyword list with two new keywords ("EXIF" and
2250            "editor").
2251
2252       exiftool -Keywords+=word -o newfile.jpg src.jpg
2253            Copy a source image to a new file, and add a keyword ("word") to
2254            the current list of keywords.
2255
2256       exiftool -exposurecompensation+=-0.5 a.jpg
2257            Decrement the value of ExposureCompensation by 0.5 EV.  Note that
2258            += with a negative value is used for decrementing because the -=
2259            operator is used for conditional deletion (see next example).
2260
2261       exiftool -credit-=xxx dir
2262            Delete Credit information from all files in a directory where the
2263            Credit value was "xxx".
2264
2265       exiftool -xmp:description-de='k&uuml;hl' -E dst.jpg
2266            Write alternate language for XMP:Description, using HTML character
2267            escaping to input special characters.
2268
2269       exiftool -all= dst.jpg
2270            Delete all meta information from an image.  Note: You should NOT
2271            do this to RAW images (except DNG) since proprietary RAW image
2272            formats often contain information in the makernotes that is
2273            necessary for converting the image.
2274
2275       exiftool -all= -comment='lonely' dst.jpg
2276            Delete all meta information from an image and add a comment back
2277            in.  (Note that the order is important: "-comment='lonely' -all="
2278            would also delete the new comment.)
2279
2280       exiftool -all= --jfif:all dst.jpg
2281            Delete all meta information except JFIF group from an image.
2282
2283       exiftool -Photoshop:All= dst.jpg
2284            Delete Photoshop meta information from an image (note that the
2285            Photoshop information also includes IPTC).
2286
2287       exiftool -r -XMP-crss:all= DIR
2288            Recursively delete all XMP-crss information from images in a
2289            directory.
2290
2291       exiftool '-ThumbnailImage<=thumb.jpg' dst.jpg
2292            Set the thumbnail image from specified file (Note: The quotes are
2293            necessary to prevent shell redirection).
2294
2295       exiftool '-JpgFromRaw<=%d%f_JFR.JPG' -ext NEF -r .
2296            Recursively write JPEG images with filenames ending in "_JFR.JPG"
2297            to the JpgFromRaw tag of like-named files with extension ".NEF" in
2298            the current directory.  (This is the inverse of the "-JpgFromRaw"
2299            command of the "READING EXAMPLES" section above.)
2300
2301       exiftool -DateTimeOriginal-='0:0:0 1:30:0' dir
2302            Adjust original date/time of all images in directory "dir" by
2303            subtracting one hour and 30 minutes.  (This is equivalent to
2304            "-DateTimeOriginal-=1.5".  See Image::ExifTool::Shift.pl for
2305            details.)
2306
2307       exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg
2308            Add 3 hours to the CreateDate and ModifyDate timestamps of two
2309            images.
2310
2311       exiftool -AllDates+=1:30 -if '$make eq "Canon"' dir
2312            Shift the values of DateTimeOriginal, CreateDate and ModifyDate
2313            forward by 1 hour and 30 minutes for all Canon images in a
2314            directory.  (The AllDates tag is provided as a shortcut for these
2315            three tags, allowing them to be accessed via a single tag.)
2316
2317       exiftool -xmp:city=Kingston image1.jpg image2.nef
2318            Write a tag to the XMP group of two images.  (Without the "xmp:"
2319            this tag would get written to the IPTC group since "City" exists
2320            in both, and IPTC is preferred by default.)
2321
2322       exiftool -LightSource-='Unknown (0)' dst.tiff
2323            Delete "LightSource" tag only if it is unknown with a value of 0.
2324
2325       exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg
2326            Set "WhiteBalance" to "Tungsten" only if it was previously "Auto".
2327
2328       exiftool -comment-= -comment='new comment' a.jpg
2329            Write a new comment only if the image doesn't have one already.
2330
2331       exiftool -o %d%f.xmp dir
2332            Create XMP meta information data files for all images in "dir".
2333
2334       exiftool -o test.xmp -owner=Phil -title='XMP File'
2335            Create an XMP data file only from tags defined on the command
2336            line.
2337
2338       exiftool '-ICC_Profile<=%d%f.icc' image.jpg
2339            Write ICC_Profile to an image from a ".icc" file of the same name.
2340
2341       exiftool -hierarchicalkeywords='{keyword=one,children={keyword=B}}'
2342            Write structured XMP information.  See
2343            <https://exiftool.org/struct.html> for more details.
2344
2345       exiftool -trailer:all= image.jpg
2346            Delete any trailer found after the end of image (EOI) in a JPEG
2347            file.  A number of digital cameras store a large PreviewImage
2348            after the JPEG EOI, and the file size may be reduced significantly
2349            by deleting this trailer.  See the JPEG Tags documentation for a
2350            list of recognized JPEG trailers.
2351

COPYING EXAMPLES

2353       These examples demonstrate the ability to copy tag values between
2354       files.
2355
2356       exiftool -tagsFromFile src.cr2 dst.jpg
2357            Copy the values of all writable tags from "src.cr2" to "dst.jpg",
2358            writing the information to same-named tags in the preferred
2359            groups.
2360
2361       exiftool -TagsFromFile src.jpg -all:all dst.jpg
2362            Copy the values of all writable tags from "src.jpg" to "dst.jpg",
2363            preserving the original tag groups.
2364
2365       exiftool -all= -tagsfromfile src.jpg -exif:all dst.jpg
2366            Erase all meta information from "dst.jpg" image, then copy EXIF
2367            tags from "src.jpg".
2368
2369       exiftool -exif:all= -tagsfromfile @ -all:all -unsafe bad.jpg
2370            Rebuild all EXIF meta information from scratch in an image.  This
2371            technique can be used in JPEG images to repair corrupted EXIF
2372            information which otherwise could not be written due to errors.
2373            The "Unsafe" tag is a shortcut for unsafe EXIF tags in JPEG images
2374            which are not normally copied.  See the tag name documentation for
2375            more details about unsafe tags.
2376
2377       exiftool -Tagsfromfile a.jpg out.xmp
2378            Copy meta information from "a.jpg" to an XMP data file.  If the
2379            XMP data file "out.xmp" already exists, it will be updated with
2380            the new information.  Otherwise the XMP data file will be created.
2381            Only metadata-only files may be created like this (files
2382            containing images may be edited but not created).  See "WRITING
2383            EXAMPLES" above for another technique to generate XMP files.
2384
2385       exiftool -tagsFromFile a.jpg -XMP:All= -ThumbnailImage= -m b.jpg
2386            Copy all meta information from "a.jpg" to "b.jpg", deleting all
2387            XMP information and the thumbnail image from the destination.
2388
2389       exiftool -TagsFromFile src.jpg -title -author=Phil dst.jpg
2390            Copy title from one image to another and set a new author name.
2391
2392       exiftool -TagsFromFile a.jpg -ISO -TagsFromFile b.jpg -comment dst.jpg
2393            Copy ISO from one image and Comment from another image to a
2394            destination image.
2395
2396       exiftool -tagsfromfile src.jpg -exif:all --subifd:all dst.jpg
2397            Copy only the EXIF information from one image to another,
2398            excluding SubIFD tags.
2399
2400       exiftool '-FileModifyDate<DateTimeOriginal' dir
2401            Use the original date from the meta information to set the same
2402            file's filesystem modification date for all images in a directory.
2403            (Note that "-TagsFromFile @" is assumed if no other -TagsFromFile
2404            is specified when redirecting information as in this example.)
2405
2406       exiftool -TagsFromFile src.jpg '-xmp:all<all' dst.jpg
2407            Copy all possible information from "src.jpg" and write in XMP
2408            format to "dst.jpg".
2409
2410       exiftool '-Description<${FileName;s/\.[^.]*$//}' dir
2411            Set the image Description from the file name after removing the
2412            extension.  This example uses the "Advanced formatting feature" to
2413            perform a substitution operation to remove the last dot and
2414            subsequent characters from the file name.
2415
2416       exiftool -@ iptc2xmp.args -iptc:all= a.jpg
2417            Translate IPTC information to XMP with appropriate tag name
2418            conversions, and delete the original IPTC information from an
2419            image.  This example uses iptc2xmp.args, which is a file included
2420            with the ExifTool distribution that contains the required
2421            arguments to convert IPTC information to XMP format.  Also
2422            included with the distribution are xmp2iptc.args (which performs
2423            the inverse conversion) and a few more .args files for other
2424            conversions between EXIF, IPTC and XMP.
2425
2426       exiftool -tagsfromfile %d%f.CR2 -r -ext JPG dir
2427            Recursively rewrite all "JPG" images in "dir" with information
2428            copied from the corresponding "CR2" images in the same
2429            directories.
2430
2431       exiftool '-keywords+<make' image.jpg
2432            Add camera make to list of keywords.
2433
2434       exiftool '-comment<ISO=$exif:iso Exposure=${shutterspeed}' dir
2435            Set the Comment tag of all images in "dir" from the values of the
2436            EXIF:ISO and ShutterSpeed tags.  The resulting comment will be in
2437            the form "ISO=100 Exposure=1/60".
2438
2439       exiftool -TagsFromFile src.jpg -icc_profile dst.jpg
2440            Copy ICC_Profile from one image to another.
2441
2442       exiftool -TagsFromFile src.jpg -all:all dst.mie
2443            Copy all meta information in its original form from a JPEG image
2444            to a MIE file.  The MIE file will be created if it doesn't exist.
2445            This technique can be used to store the metadata of an image so it
2446            can be inserted back into the image (with the inverse command)
2447            later in a workflow.
2448
2449       exiftool -o dst.mie -all:all src.jpg
2450            This command performs exactly the same task as the command above,
2451            except that the -o option will not write to an output file that
2452            already exists.
2453
2454       exiftool -b -jpgfromraw -w %d%f_%ue.jpg -execute -b -previewimage -w
2455       %d%f_%ue.jpg -execute -tagsfromfile @ -srcfile %d%f_%ue.jpg
2456       -overwrite_original -common_args --ext jpg DIR
2457            [Advanced] Extract JpgFromRaw or PreviewImage from all but JPG
2458            files in DIR, saving them with file names like "image_EXT.jpg",
2459            then add all meta information from the original files to the
2460            extracted images.  Here, the command line is broken into three
2461            sections (separated by -execute options), and each is executed as
2462            if it were a separate command.  The -common_args option causes the
2463            "--ext jpg DIR" arguments to be applied to all three commands, and
2464            the -srcfile option allows the extracted JPG image to be the
2465            source file for the third command (whereas the RAW files are the
2466            source files for the other two commands).
2467

RENAMING EXAMPLES

2469       By writing the "FileName" and "Directory" tags, files are renamed
2470       and/or moved to new directories.  This can be particularly useful and
2471       powerful for organizing files by date when combined with the -d option.
2472       New directories are created as necessary, but existing files will not
2473       be overwritten.  The format codes %d, %f and %e may be used in the new
2474       file name to represent the directory, name and extension of the
2475       original file, and %c may be used to add a copy number if the file
2476       already exists (see the -w option for details).  Note that if used
2477       within a date format string, an extra '%' must be added to pass these
2478       codes through the date/time parser.  (And further note that in a
2479       Windows batch file, all '%' characters must also be escaped, so in this
2480       extreme case '%%%%f' is necessary to pass a simple '%f' through the two
2481       levels of parsing.)  See <https://exiftool.org/filename.html> for
2482       additional documentation and examples.
2483
2484       exiftool -filename=new.jpg dir/old.jpg
2485            Rename "old.jpg" to "new.jpg" in directory "dir".
2486
2487       exiftool -directory=%e dir
2488            Move all files from directory "dir" into directories named by the
2489            original file extensions.
2490
2491       exiftool '-Directory<DateTimeOriginal' -d %Y/%m/%d dir
2492            Move all files in "dir" into a directory hierarchy based on year,
2493            month and day of "DateTimeOriginal".  eg) This command would move
2494            the file "dir/image.jpg" with a "DateTimeOriginal" of "2005:10:12
2495            16:05:56" to "2005/10/12/image.jpg".
2496
2497       exiftool -o . '-Directory<DateTimeOriginal' -d %Y/%m/%d dir
2498            Same effect as above except files are copied instead of moved.
2499
2500       exiftool '-filename<%f_${model;}.%e' dir
2501            Rename all files in "dir" by adding the camera model name to the
2502            file name.  The semicolon after the tag name inside the braces
2503            causes characters which are invalid in Windows file names to be
2504            deleted from the tag value (see the "Advanced formatting feature"
2505            for an explanation).
2506
2507       exiftool '-FileName<CreateDate' -d %Y%m%d_%H%M%S%%-c.%%e dir
2508            Rename all images in "dir" according to the "CreateDate" date and
2509            time, adding a copy number with leading '-' if the file already
2510            exists ("%-c"), and preserving the original file extension (%e).
2511            Note the extra '%' necessary to escape the filename codes (%c and
2512            %e) in the date format string.
2513
2514       exiftool -r '-FileName<CreateDate' -d %Y-%m-%d/%H%M_%%f.%%e dir
2515            Both the directory and the filename may be changed together via
2516            the "FileName" tag if the new "FileName" contains a '/'.  The
2517            example above recursively renames all images in a directory by
2518            adding a "CreateDate" timestamp to the start of the filename, then
2519            moves them into new directories named by date.
2520
2521       exiftool '-FileName<${CreateDate}_$filenumber.jpg' -d %Y%m%d -ext jpg .
2522            Set the filename of all JPG images in the current directory from
2523            the CreateDate and FileNumber tags, in the form
2524            "20060507_118-1861.jpg".
2525

GEOTAGGING EXAMPLES

2527       ExifTool implements geotagging via 3 special tags: Geotag (which for
2528       convenience is also implemented as an exiftool option), Geosync and
2529       Geotime.  The examples below highlight some geotagging features.  See
2530       <https://exiftool.org/geotag.html> for additional documentation.
2531
2532       exiftool -geotag track.log a.jpg
2533            Geotag an image ("a.jpg") from position information in a GPS track
2534            log ("track.log").  Since the "Geotime" tag is not specified, the
2535            value of DateTimeOriginal is used for geotagging.  Local system
2536            time is assumed unless DateTimeOriginal contains a timezone.
2537
2538       exiftool -geotag t.log -geotime='2009:04:02 13:41:12-05:00' a.jpg
2539            Geotag an image with the GPS position for a specific time.
2540
2541       exiftool -geotag log.gpx '-xmp:geotime<createdate' dir
2542            Geotag all images in directory "dir" with XMP tags instead of EXIF
2543            tags, based on the image CreateDate.
2544
2545       exiftool -geotag a.log -geosync=-20 dir
2546            Geotag images in directory "dir", accounting for image timestamps
2547            which were 20 seconds ahead of GPS.
2548
2549       exiftool -geotag a.log -geosync=1.jpg -geosync=2.jpg dir
2550            Geotag images using time synchronization from two previously
2551            geotagged images (1.jpg and 2.jpg), synchronizing the image and
2552            GPS times using a linear time drift correction.
2553
2554       exiftool -geotag a.log '-geotime<${createdate}+01:00' dir
2555            Geotag images in "dir" using CreateDate with the specified
2556            timezone.  If CreateDate already contained a timezone, then the
2557            timezone specified on the command line is ignored.
2558
2559       exiftool -geotag= a.jpg
2560            Delete GPS tags which may have been added by the geotag feature.
2561            Note that this does not remove all GPS tags -- to do this instead
2562            use "-gps:all=".
2563
2564       exiftool -xmp:geotag= a.jpg
2565            Delete XMP GPS tags which were added by the geotag feature.
2566
2567       exiftool -xmp:geotag=track.log a.jpg
2568            Geotag an image with XMP tags, using the time from
2569            DateTimeOriginal.
2570
2571       exiftool -geotag a.log -geotag b.log -r dir
2572            Combine multiple track logs and geotag an entire directory tree of
2573            images.
2574
2575       exiftool -geotag 'tracks/*.log' -r dir
2576            Read all track logs from the "tracks" directory.
2577
2578       exiftool -p gpx.fmt -d %Y-%m-%dT%H:%M:%SZ dir > out.gpx
2579            Generate a GPX track log from all images in directory "dir".  This
2580            example uses the "gpx.fmt" file included in the full ExifTool
2581            distribution package and assumes that the images in "dir" have all
2582            been previously geotagged.
2583

PIPING EXAMPLES

2585       cat a.jpg | exiftool -
2586            Extract information from stdin.
2587
2588       exiftool image.jpg -thumbnailimage -b | exiftool -
2589            Extract information from an embedded thumbnail image.
2590
2591       cat a.jpg | exiftool -iptc:keywords+=fantastic - > b.jpg
2592            Add an IPTC keyword in a pipeline, saving output to a new file.
2593
2594       curl -s http://a.domain.com/bigfile.jpg | exiftool -fast -
2595            Extract information from an image over the internet using the cURL
2596            utility.  The -fast option prevents exiftool from scanning for
2597            trailer information, so only the meta information header is
2598            transferred.
2599
2600       exiftool a.jpg -thumbnailimage -b | exiftool -comment=wow - | exiftool
2601       a.jpg -thumbnailimage'<=-'
2602            Add a comment to an embedded thumbnail image.  (Why anyone would
2603            want to do this I don't know, but I've included this as an example
2604            to illustrate the flexibility of ExifTool.)
2605

EXIT STATUS

2607       The exiftool application exits with a status of 0 on success, or 1 if
2608       an error occurred, or 2 if all files failed the -if condition (for any
2609       of the commands if -execute was used).
2610

AUTHOR

2612       Copyright 2003-2020, Phil Harvey
2613
2614       This is free software; you can redistribute it and/or modify it under
2615       the same terms as Perl itself.
2616

SEE ALSO

2618       Image::ExifTool(3pm), Image::ExifTool::TagNames(3pm),
2619       Image::ExifTool::Shortcuts(3pm), Image::ExifTool::Shift.pl
2620
2621
2622
2623perl v5.30.1                      2020-01-31                       EXIFTOOL(1)
Impressum