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         360   r/w   | DR4   r/w/c | JNG   r/w   | ODP   r     | RIFF  r
55         3FR   r     | DSS   r     | JP2   r/w   | ODS   r     | RSRC  r
56         3G2   r/w   | DV    r     | JPEG  r/w   | ODT   r     | RTF   r
57         3GP   r/w   | DVB   r/w   | JSON  r     | OFR   r     | RW2   r/w
58         A     r     | DVR-MS r    | JXL   r     | OGG   r     | RWL   r/w
59         AA    r     | DYLIB r     | K25   r     | OGV   r     | RWZ   r
60         AAE   r     | EIP   r     | KDC   r     | ONP   r     | RM    r
61         AAX   r/w   | EPS   r/w   | KEY   r     | OPUS  r     | SEQ   r
62         ACR   r     | EPUB  r     | LA    r     | ORF   r/w   | SKETCH r
63         AFM   r     | ERF   r/w   | LFP   r     | ORI   r/w   | SO    r
64         AI    r/w   | EXE   r     | LIF   r     | OTF   r     | SR2   r/w
65         AIFF  r     | EXIF  r/w/c | LNK   r     | PAC   r     | SRF   r
66         APE   r     | EXR   r     | LRV   r/w   | PAGES r     | SRW   r/w
67         ARQ   r/w   | EXV   r/w/c | M2TS  r     | PBM   r/w   | SVG   r
68         ARW   r/w   | F4A/V r/w   | M4A/V r/w   | PCD   r     | SWF   r
69         ASF   r     | FFF   r/w   | MACOS r     | PCX   r     | THM   r/w
70         AVI   r     | FITS  r     | MAX   r     | PDB   r     | TIFF  r/w
71         AVIF  r/w   | FLA   r     | MEF   r/w   | PDF   r/w   | TORRENT r
72         AZW   r     | FLAC  r     | MIE   r/w/  | PEF   r/w   | TTC   r
73         BMP   r     | FLIF  r/w   | MIFF  r   c | PFA   r     | TTF   r
74         BPG   r     | FLV   r     | MKA   r     | PFB   r     | TXT   r
75         BTF   r     | FPF   r     | MKS   r     | PFM   r     | VCF   r
76         CHM   r     | FPX   r     | MKV   r     | PGF   r     | VRD   r/w/c
77         COS   r     | GIF   r/w   | MNG   r/w   | PGM   r/w   | VSD   r
78         CR2   r/w   | GPR   r/w   | MOBI  r     | PLIST r     | WAV   r
79         CR3   r/w   | GZ    r     | MODD  r     | PICT  r     | WDP   r/w
80         CRM   r/w   | HDP   r/w   | MOI   r     | PMP   r     | WEBP  r
81         CRW   r/w   | HDR   r     | MOS   r/w   | PNG   r/w   | WEBM  r
82         CS1   r/w   | HEIC  r/w   | MOV   r/w   | PPM   r/w   | WMA   r
83         CSV   r     | HEIF  r/w   | MP3   r     | PPT   r     | WMV   r
84         CZI   r     | HTML  r     | MP4   r/w   | PPTX  r     | WTV   r
85         DCM   r     | ICC   r/w/c | MPC   r     | PS    r/w   | WV    r
86         DCP   r/w   | ICS   r     | MPG   r     | PSB   r/w   | X3F   r/w
87         DCR   r     | IDML  r     | MPO   r/w   | PSD   r/w   | XCF   r
88         DFONT r     | IIQ   r/w   | MQV   r/w   | PSP   r     | XLS   r
89         DIVX  r     | IND   r/w   | MRC   r     | QTIF  r/w   | XLSX  r
90         DJVU  r     | INSP  r/w   | MRW   r/w   | R3D   r     | XMP   r/w/c
91         DLL   r     | INSV  r     | MXF   r     | RA    r     | ZIP   r
92         DNG   r/w   | INX   r     | NEF   r/w   | RAF   r/w   |
93         DOC   r     | ISO   r     | NRW   r/w   | RAM   r     |
94         DOCX  r     | ITC   r     | NUMBERS r   | RAR   r     |
95         DPX   r     | J2C   r     | O     r     | RAW   r/w   |
96
97         Meta Information
98         ----------------------+----------------------+---------------------
99         EXIF           r/w/c  |  CIFF           r/w  |  Ricoh RMETA    r
100         GPS            r/w/c  |  AFCP           r/w  |  Picture Info   r
101         IPTC           r/w/c  |  Kodak Meta     r/w  |  Adobe APP14    r
102         XMP            r/w/c  |  FotoStation    r/w  |  MPF            r
103         MakerNotes     r/w/c  |  PhotoMechanic  r/w  |  Stim           r
104         Photoshop IRB  r/w/c  |  JPEG 2000      r    |  DPX            r
105         ICC Profile    r/w/c  |  DICOM          r    |  APE            r
106         MIE            r/w/c  |  Flash          r    |  Vorbis         r
107         JFIF           r/w/c  |  FlashPix       r    |  SPIFF          r
108         Ducky APP12    r/w/c  |  QuickTime      r    |  DjVu           r
109         PDF            r/w/c  |  Matroska       r    |  M2TS           r
110         PNG            r/w/c  |  MXF            r    |  PE/COFF        r
111         Canon VRD      r/w/c  |  PrintIM        r    |  AVCHD          r
112         Nikon Capture  r/w/c  |  FLAC           r    |  ZIP            r
113         GeoTIFF        r/w/c  |  ID3            r    |  (and more)
114

OPTIONS

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

WINDOWS UNICODE FILE NAMES

2182       In Windows, command-line arguments are specified using the current code
2183       page and are recoded automatically to the system code page.  This
2184       recoding is not done for arguments in ExifTool arg files, so by default
2185       filenames in arg files use the system code page.  Unfortunately, these
2186       code pages are not complete character sets, so not all file names may
2187       be represented.
2188
2189       ExifTool 9.79 and later allow the file name encoding to be specified
2190       with "-charset filename=CHARSET", where "CHARSET" is the name of a
2191       valid ExifTool character set, preferably "UTF8" (see the -charset
2192       option for a complete list).  Setting this triggers the use of Windows
2193       wide-character i/o routines, thus providing support for most Unicode
2194       file names (see note 4).  But note that it is not trivial to pass
2195       properly encoded file names on the Windows command line (see
2196       <https://exiftool.org/faq.html#Q18> for details), so placing them in a
2197       UTF-8 encoded -@ argfile and using "-charset filename=utf8" is
2198       recommended if possible.
2199
2200       A warning is issued if a specified filename contains special characters
2201       and the filename character set was not provided.  However, the warning
2202       may be disabled by setting "-charset filename=""", and ExifTool may
2203       still function correctly if the system code page matches the character
2204       set used for the file names.
2205
2206       When a directory name is provided, the file name encoding need not be
2207       specified (unless the directory name contains special characters), and
2208       ExifTool will automatically use wide-character routines to scan the
2209       directory.
2210
2211       The filename character set applies to the FILE arguments as well as
2212       filename arguments of -@, -geotag, -o, -p, -srcfile, -tagsFromFile,
2213       -csv=, -j= and -TAG<=.  However, it does not apply to the -config
2214       filename, which always uses the system character set.  The "-charset
2215       filename=" option must come before the -@ option to be effective, but
2216       the order doesn't matter with respect to other options.
2217
2218       Notes:
2219
2220       1) FileName and Directory tag values still use the same encoding as
2221       other tag values, and are converted to/from the filename character set
2222       when writing/reading if specified.
2223
2224       2) Unicode support is not yet implemented for other Windows-based
2225       systems like Cygwin.
2226
2227       3) See "WRITING READ-ONLY FILES" below for a note about editing read-
2228       only files with Unicode names.
2229
2230       4) Unicode file names with surrogate pairs (code points over U+FFFF)
2231       still cause problems.
2232

WRITING READ-ONLY FILES

2234       In general, ExifTool may be used to write metadata to read-only files
2235       provided that the user has write permission in the directory.  However,
2236       there are three cases where file write permission is also required:
2237
2238       1) When using the -overwrite_original_in_place option.
2239
2240       2) When writing only pseudo System tags (eg. FileModifyDate).
2241
2242       3) On Windows if the file has Unicode characters in its name, and a)
2243       the -overwrite_original option is used, or b) the "_original" backup
2244       already exists.
2245
2246       Hidden files in Windows behave as read-only files when attempting to
2247       write any real tags to the file -- an error is generated when using the
2248       -overwrite_original_in_place, otherwise writing should be successful
2249       and the hidden attribute will be removed.  But the -if option may be
2250       used to avoid processing hidden files (provided Win32API::File is
2251       available):
2252
2253           exiftool -if "$fileattributes !~ /Hidden/" ...
2254

READING EXAMPLES

2256       Note: Beware when cutting and pasting these examples into your
2257       terminal!  Some characters such as single and double quotes and hyphens
2258       may have been changed into similar-looking yet functionally-different
2259       characters by the text formatter used to display this documentation.
2260       Also note that Windows users must use double quotes instead of single
2261       quotes as below around arguments containing special characters.
2262
2263       exiftool -a -u -g1 a.jpg
2264            Print all meta information in an image, including duplicate and
2265            unknown tags, sorted by group (for family 1).  For performance
2266            reasons, this command may not extract all available metadata.
2267            (Metadata in embedded documents, metadata extracted by external
2268            utilities, and metadata requiring excessive processing time may
2269            not be extracted).  Add "-ee3" and "-api RequestAll=3" to the
2270            command to extract absolutely everything available.
2271
2272       exiftool -common dir
2273            Print common meta information for all images in "dir".  "-common"
2274            is a shortcut tag representing common EXIF meta information.
2275
2276       exiftool -T -createdate -aperture -shutterspeed -iso dir > out.txt
2277            List specified meta information in tab-delimited column form for
2278            all images in "dir" to an output text file named "out.txt".
2279
2280       exiftool -s -ImageSize -ExposureTime b.jpg
2281            Print ImageSize and ExposureTime tag names and values.
2282
2283       exiftool -l -canon c.jpg d.jpg
2284            Print standard Canon information from two image files.
2285
2286       exiftool -r -w .txt -common pictures
2287            Recursively extract common meta information from files in
2288            "pictures" directory, writing text output to ".txt" files with the
2289            same names.
2290
2291       exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg
2292            Save thumbnail image from "image.jpg" to a file called
2293            "thumbnail.jpg".
2294
2295       exiftool -b -JpgFromRaw -w _JFR.JPG -ext NEF -r .
2296            Recursively extract JPG image from all Nikon NEF files in the
2297            current directory, adding "_JFR.JPG" for the name of the output
2298            JPG files.
2299
2300       exiftool -a -b -W %d%f_%t%-c.%s -preview:all dir
2301            Extract all types of preview images (ThumbnailImage, PreviewImage,
2302            JpgFromRaw, etc.) from files in directory "dir", adding the tag
2303            name to the output preview image file names.
2304
2305       exiftool -d '%r %a, %B %e, %Y' -DateTimeOriginal -S -s -ext jpg .
2306            Print formatted date/time for all JPG files in the current
2307            directory.
2308
2309       exiftool -IFD1:XResolution -IFD1:YResolution image.jpg
2310            Extract image resolution from EXIF IFD1 information (thumbnail
2311            image IFD).
2312
2313       exiftool '-*resolution*' image.jpg
2314            Extract all tags with names containing the word "Resolution" from
2315            an image.
2316
2317       exiftool -xmp:author:all -a image.jpg
2318            Extract all author-related XMP information from an image.
2319
2320       exiftool -xmp -b a.jpg > out.xmp
2321            Extract complete XMP data record intact from "a.jpg" and write it
2322            to "out.xmp" using the special "XMP" tag (see the Extra tags in
2323            Image::ExifTool::TagNames).
2324
2325       exiftool -p '$filename has date $dateTimeOriginal' -q -f dir
2326            Print one line of output containing the file name and
2327            DateTimeOriginal for each image in directory "dir".
2328
2329       exiftool -ee3 -p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts
2330            Extract all GPS positions from an AVCHD video.
2331
2332       exiftool -icc_profile -b -w icc image.jpg
2333            Save complete ICC_Profile from an image to an output file with the
2334            same name and an extension of ".icc".
2335
2336       exiftool -htmldump -w tmp/%f_%e.html t/images
2337            Generate HTML pages from a hex dump of EXIF information in all
2338            images from the "t/images" directory.  The output HTML files are
2339            written to the "tmp" directory (which is created if it didn't
2340            exist), with names of the form 'FILENAME_EXT.html'.
2341
2342       exiftool -a -b -ee -embeddedimage -W Image_%.3g3.%s file.pdf
2343            Extract embedded JPG and JP2 images from a PDF file.  The output
2344            images will have file names like "Image_#.jpg" or "Image_#.jp2",
2345            where "#" is the ExifTool family 3 embedded document number for
2346            the image.
2347

WRITING EXAMPLES

2349       Note that quotes are necessary around arguments which contain certain
2350       special characters such as ">", "<" or any white space.  These quoting
2351       techniques are shell dependent, but the examples below will work for
2352       most Unix shells.  With the Windows cmd shell however, double quotes
2353       should be used (eg. -Comment="This is a new comment").
2354
2355       exiftool -Comment='This is a new comment' dst.jpg
2356            Write new comment to a JPG image (replaces any existing comment).
2357
2358       exiftool -comment= -o newdir -ext jpg .
2359            Remove comment from all JPG images in the current directory,
2360            writing the modified images to a new directory.
2361
2362       exiftool -keywords=EXIF -keywords=editor dst.jpg
2363            Replace existing keyword list with two new keywords ("EXIF" and
2364            "editor").
2365
2366       exiftool -Keywords+=word -o newfile.jpg src.jpg
2367            Copy a source image to a new file, and add a keyword ("word") to
2368            the current list of keywords.
2369
2370       exiftool -exposurecompensation+=-0.5 a.jpg
2371            Decrement the value of ExposureCompensation by 0.5 EV.  Note that
2372            += with a negative value is used for decrementing because the -=
2373            operator is used for conditional deletion (see next example).
2374
2375       exiftool -credit-=xxx dir
2376            Delete Credit information from all files in a directory where the
2377            Credit value was "xxx".
2378
2379       exiftool -xmp:description-de='k&uuml;hl' -E dst.jpg
2380            Write alternate language for XMP:Description, using HTML character
2381            escaping to input special characters.
2382
2383       exiftool -all= dst.jpg
2384            Delete all meta information from an image.  Note: You should NOT
2385            do this to RAW images (except DNG) since proprietary RAW image
2386            formats often contain information in the makernotes that is
2387            necessary for converting the image.
2388
2389       exiftool -all= -comment='lonely' dst.jpg
2390            Delete all meta information from an image and add a comment back
2391            in.  (Note that the order is important: "-comment='lonely' -all="
2392            would also delete the new comment.)
2393
2394       exiftool -all= --jfif:all dst.jpg
2395            Delete all meta information except JFIF group from an image.
2396
2397       exiftool -Photoshop:All= dst.jpg
2398            Delete Photoshop meta information from an image (note that the
2399            Photoshop information also includes IPTC).
2400
2401       exiftool -r -XMP-crss:all= DIR
2402            Recursively delete all XMP-crss information from images in a
2403            directory.
2404
2405       exiftool '-ThumbnailImage<=thumb.jpg' dst.jpg
2406            Set the thumbnail image from specified file (Note: The quotes are
2407            necessary to prevent shell redirection).
2408
2409       exiftool '-JpgFromRaw<=%d%f_JFR.JPG' -ext NEF -r .
2410            Recursively write JPEG images with filenames ending in "_JFR.JPG"
2411            to the JpgFromRaw tag of like-named files with extension ".NEF" in
2412            the current directory.  (This is the inverse of the "-JpgFromRaw"
2413            command of the "READING EXAMPLES" section above.)
2414
2415       exiftool -DateTimeOriginal-='0:0:0 1:30:0' dir
2416            Adjust original date/time of all images in directory "dir" by
2417            subtracting one hour and 30 minutes.  (This is equivalent to
2418            "-DateTimeOriginal-=1.5".  See Image::ExifTool::Shift.pl for
2419            details.)
2420
2421       exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg
2422            Add 3 hours to the CreateDate and ModifyDate timestamps of two
2423            images.
2424
2425       exiftool -AllDates+=1:30 -if '$make eq "Canon"' dir
2426            Shift the values of DateTimeOriginal, CreateDate and ModifyDate
2427            forward by 1 hour and 30 minutes for all Canon images in a
2428            directory.  (The AllDates tag is provided as a shortcut for these
2429            three tags, allowing them to be accessed via a single tag.)
2430
2431       exiftool -xmp:city=Kingston image1.jpg image2.nef
2432            Write a tag to the XMP group of two images.  (Without the "xmp:"
2433            this tag would get written to the IPTC group since "City" exists
2434            in both, and IPTC is preferred by default.)
2435
2436       exiftool -LightSource-='Unknown (0)' dst.tiff
2437            Delete "LightSource" tag only if it is unknown with a value of 0.
2438
2439       exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg
2440            Set "WhiteBalance" to "Tungsten" only if it was previously "Auto".
2441
2442       exiftool -comment-= -comment='new comment' a.jpg
2443            Write a new comment only if the image doesn't have one already.
2444
2445       exiftool -o %d%f.xmp dir
2446            Create XMP meta information data files for all images in "dir".
2447
2448       exiftool -o test.xmp -owner=Phil -title='XMP File'
2449            Create an XMP data file only from tags defined on the command
2450            line.
2451
2452       exiftool '-ICC_Profile<=%d%f.icc' image.jpg
2453            Write ICC_Profile to an image from a ".icc" file of the same name.
2454
2455       exiftool -hierarchicalkeywords='{keyword=one,children={keyword=B}}'
2456            Write structured XMP information.  See
2457            <https://exiftool.org/struct.html> for more details.
2458
2459       exiftool -trailer:all= image.jpg
2460            Delete any trailer found after the end of image (EOI) in a JPEG
2461            file.  A number of digital cameras store a large PreviewImage
2462            after the JPEG EOI, and the file size may be reduced significantly
2463            by deleting this trailer.  See the JPEG Tags documentation for a
2464            list of recognized JPEG trailers.
2465

COPYING EXAMPLES

2467       These examples demonstrate the ability to copy tag values between
2468       files.
2469
2470       exiftool -tagsFromFile src.cr2 dst.jpg
2471            Copy the values of all writable tags from "src.cr2" to "dst.jpg",
2472            writing the information to same-named tags in the preferred
2473            groups.
2474
2475       exiftool -TagsFromFile src.jpg -all:all dst.jpg
2476            Copy the values of all writable tags from "src.jpg" to "dst.jpg",
2477            preserving the original tag groups.
2478
2479       exiftool -all= -tagsfromfile src.jpg -exif:all dst.jpg
2480            Erase all meta information from "dst.jpg" image, then copy EXIF
2481            tags from "src.jpg".
2482
2483       exiftool -exif:all= -tagsfromfile @ -all:all -unsafe bad.jpg
2484            Rebuild all EXIF meta information from scratch in an image.  This
2485            technique can be used in JPEG images to repair corrupted EXIF
2486            information which otherwise could not be written due to errors.
2487            The "Unsafe" tag is a shortcut for unsafe EXIF tags in JPEG images
2488            which are not normally copied.  See the tag name documentation for
2489            more details about unsafe tags.
2490
2491       exiftool -Tagsfromfile a.jpg out.xmp
2492            Copy meta information from "a.jpg" to an XMP data file.  If the
2493            XMP data file "out.xmp" already exists, it will be updated with
2494            the new information.  Otherwise the XMP data file will be created.
2495            Only metadata-only files may be created like this (files
2496            containing images may be edited but not created).  See "WRITING
2497            EXAMPLES" above for another technique to generate XMP files.
2498
2499       exiftool -tagsFromFile a.jpg -XMP:All= -ThumbnailImage= -m b.jpg
2500            Copy all meta information from "a.jpg" to "b.jpg", deleting all
2501            XMP information and the thumbnail image from the destination.
2502
2503       exiftool -TagsFromFile src.jpg -title -author=Phil dst.jpg
2504            Copy title from one image to another and set a new author name.
2505
2506       exiftool -TagsFromFile a.jpg -ISO -TagsFromFile b.jpg -comment dst.jpg
2507            Copy ISO from one image and Comment from another image to a
2508            destination image.
2509
2510       exiftool -tagsfromfile src.jpg -exif:all --subifd:all dst.jpg
2511            Copy only the EXIF information from one image to another,
2512            excluding SubIFD tags.
2513
2514       exiftool '-FileModifyDate<DateTimeOriginal' dir
2515            Use the original date from the meta information to set the same
2516            file's filesystem modification date for all images in a directory.
2517            (Note that "-TagsFromFile @" is assumed if no other -TagsFromFile
2518            is specified when redirecting information as in this example.)
2519
2520       exiftool -TagsFromFile src.jpg '-xmp:all<all' dst.jpg
2521            Copy all possible information from "src.jpg" and write in XMP
2522            format to "dst.jpg".
2523
2524       exiftool '-Description<${FileName;s/\.[^.]*$//}' dir
2525            Set the image Description from the file name after removing the
2526            extension.  This example uses the "Advanced formatting feature" to
2527            perform a substitution operation to remove the last dot and
2528            subsequent characters from the file name.
2529
2530       exiftool -@ iptc2xmp.args -iptc:all= a.jpg
2531            Translate IPTC information to XMP with appropriate tag name
2532            conversions, and delete the original IPTC information from an
2533            image.  This example uses iptc2xmp.args, which is a file included
2534            with the ExifTool distribution that contains the required
2535            arguments to convert IPTC information to XMP format.  Also
2536            included with the distribution are xmp2iptc.args (which performs
2537            the inverse conversion) and a few more .args files for other
2538            conversions between EXIF, IPTC and XMP.
2539
2540       exiftool -tagsfromfile %d%f.CR2 -r -ext JPG dir
2541            Recursively rewrite all "JPG" images in "dir" with information
2542            copied from the corresponding "CR2" images in the same
2543            directories.
2544
2545       exiftool '-keywords+<make' image.jpg
2546            Add camera make to list of keywords.
2547
2548       exiftool '-comment<ISO=$exif:iso Exposure=${shutterspeed}' dir
2549            Set the Comment tag of all images in "dir" from the values of the
2550            EXIF:ISO and ShutterSpeed tags.  The resulting comment will be in
2551            the form "ISO=100 Exposure=1/60".
2552
2553       exiftool -TagsFromFile src.jpg -icc_profile dst.jpg
2554            Copy ICC_Profile from one image to another.
2555
2556       exiftool -TagsFromFile src.jpg -all:all dst.mie
2557            Copy all meta information in its original form from a JPEG image
2558            to a MIE file.  The MIE file will be created if it doesn't exist.
2559            This technique can be used to store the metadata of an image so it
2560            can be inserted back into the image (with the inverse command)
2561            later in a workflow.
2562
2563       exiftool -o dst.mie -all:all src.jpg
2564            This command performs exactly the same task as the command above,
2565            except that the -o option will not write to an output file that
2566            already exists.
2567
2568       exiftool -b -jpgfromraw -w %d%f_%ue.jpg -execute -b -previewimage -w
2569       %d%f_%ue.jpg -execute -tagsfromfile @ -srcfile %d%f_%ue.jpg
2570       -overwrite_original -common_args --ext jpg DIR
2571            [Advanced] Extract JpgFromRaw or PreviewImage from all but JPG
2572            files in DIR, saving them with file names like "image_EXT.jpg",
2573            then add all meta information from the original files to the
2574            extracted images.  Here, the command line is broken into three
2575            sections (separated by -execute options), and each is executed as
2576            if it were a separate command.  The -common_args option causes the
2577            "--ext jpg DIR" arguments to be applied to all three commands, and
2578            the -srcfile option allows the extracted JPG image to be the
2579            source file for the third command (whereas the RAW files are the
2580            source files for the other two commands).
2581

RENAMING EXAMPLES

2583       By writing the "FileName" and "Directory" tags, files are renamed
2584       and/or moved to new directories.  This can be particularly useful and
2585       powerful for organizing files by date when combined with the -d option.
2586       New directories are created as necessary, but existing files will not
2587       be overwritten.  The format codes %d, %f and %e may be used in the new
2588       file name to represent the directory, name and extension of the
2589       original file, and %c may be used to add a copy number if the file
2590       already exists (see the -w option for details).  Note that if used
2591       within a date format string, an extra '%' must be added to pass these
2592       codes through the date/time parser.  (And further note that in a
2593       Windows batch file, all '%' characters must also be escaped, so in this
2594       extreme case '%%%%f' is necessary to pass a simple '%f' through the two
2595       levels of parsing.)  See <https://exiftool.org/filename.html> for
2596       additional documentation and examples.
2597
2598       exiftool -filename=new.jpg dir/old.jpg
2599            Rename "old.jpg" to "new.jpg" in directory "dir".
2600
2601       exiftool -directory=%e dir
2602            Move all files from directory "dir" into directories named by the
2603            original file extensions.
2604
2605       exiftool '-Directory<DateTimeOriginal' -d %Y/%m/%d dir
2606            Move all files in "dir" into a directory hierarchy based on year,
2607            month and day of "DateTimeOriginal".  eg) This command would move
2608            the file "dir/image.jpg" with a "DateTimeOriginal" of "2005:10:12
2609            16:05:56" to "2005/10/12/image.jpg".
2610
2611       exiftool -o . '-Directory<DateTimeOriginal' -d %Y/%m/%d dir
2612            Same effect as above except files are copied instead of moved.
2613
2614       exiftool '-filename<%f_${model;}.%e' dir
2615            Rename all files in "dir" by adding the camera model name to the
2616            file name.  The semicolon after the tag name inside the braces
2617            causes characters which are invalid in Windows file names to be
2618            deleted from the tag value (see the "Advanced formatting feature"
2619            for an explanation).
2620
2621       exiftool '-FileName<CreateDate' -d %Y%m%d_%H%M%S%%-c.%%e dir
2622            Rename all images in "dir" according to the "CreateDate" date and
2623            time, adding a copy number with leading '-' if the file already
2624            exists ("%-c"), and preserving the original file extension (%e).
2625            Note the extra '%' necessary to escape the filename codes (%c and
2626            %e) in the date format string.
2627
2628       exiftool -r '-FileName<CreateDate' -d %Y-%m-%d/%H%M_%%f.%%e dir
2629            Both the directory and the filename may be changed together via
2630            the "FileName" tag if the new "FileName" contains a '/'.  The
2631            example above recursively renames all images in a directory by
2632            adding a "CreateDate" timestamp to the start of the filename, then
2633            moves them into new directories named by date.
2634
2635       exiftool '-FileName<${CreateDate}_$filenumber.jpg' -d %Y%m%d -ext jpg .
2636            Set the filename of all JPG images in the current directory from
2637            the CreateDate and FileNumber tags, in the form
2638            "20060507_118-1861.jpg".
2639

GEOTAGGING EXAMPLES

2641       ExifTool implements geotagging via 3 special tags: Geotag (which for
2642       convenience is also implemented as an exiftool option), Geosync and
2643       Geotime.  The examples below highlight some geotagging features.  See
2644       <https://exiftool.org/geotag.html> for additional documentation.
2645
2646       exiftool -geotag track.log a.jpg
2647            Geotag an image ("a.jpg") from position information in a GPS track
2648            log ("track.log").  Since the "Geotime" tag is not specified, the
2649            value of DateTimeOriginal is used for geotagging.  Local system
2650            time is assumed unless DateTimeOriginal contains a timezone.
2651
2652       exiftool -geotag t.log -geotime='2009:04:02 13:41:12-05:00' a.jpg
2653            Geotag an image with the GPS position for a specific time.
2654
2655       exiftool -geotag log.gpx '-xmp:geotime<createdate' dir
2656            Geotag all images in directory "dir" with XMP tags instead of EXIF
2657            tags, based on the image CreateDate.
2658
2659       exiftool -geotag a.log -geosync=-20 dir
2660            Geotag images in directory "dir", accounting for image timestamps
2661            which were 20 seconds ahead of GPS.
2662
2663       exiftool -geotag a.log -geosync=1.jpg -geosync=2.jpg dir
2664            Geotag images using time synchronization from two previously
2665            geotagged images (1.jpg and 2.jpg), synchronizing the image and
2666            GPS times using a linear time drift correction.
2667
2668       exiftool -geotag a.log '-geotime<${createdate}+01:00' dir
2669            Geotag images in "dir" using CreateDate with the specified
2670            timezone.  If CreateDate already contained a timezone, then the
2671            timezone specified on the command line is ignored.
2672
2673       exiftool -geotag= a.jpg
2674            Delete GPS tags which may have been added by the geotag feature.
2675            Note that this does not remove all GPS tags -- to do this instead
2676            use "-gps:all=".
2677
2678       exiftool -xmp:geotag= a.jpg
2679            Delete XMP GPS tags which were added by the geotag feature.
2680
2681       exiftool -xmp:geotag=track.log a.jpg
2682            Geotag an image with XMP tags, using the time from
2683            DateTimeOriginal.
2684
2685       exiftool -geotag a.log -geotag b.log -r dir
2686            Combine multiple track logs and geotag an entire directory tree of
2687            images.
2688
2689       exiftool -geotag 'tracks/*.log' -r dir
2690            Read all track logs from the "tracks" directory.
2691
2692       exiftool -p gpx.fmt -d %Y-%m-%dT%H:%M:%SZ dir > out.gpx
2693            Generate a GPX track log from all images in directory "dir".  This
2694            example uses the "gpx.fmt" file included in the full ExifTool
2695            distribution package and assumes that the images in "dir" have all
2696            been previously geotagged.
2697

PIPING EXAMPLES

2699       cat a.jpg | exiftool -
2700            Extract information from stdin.
2701
2702       exiftool image.jpg -thumbnailimage -b | exiftool -
2703            Extract information from an embedded thumbnail image.
2704
2705       cat a.jpg | exiftool -iptc:keywords+=fantastic - > b.jpg
2706            Add an IPTC keyword in a pipeline, saving output to a new file.
2707
2708       curl -s http://a.domain.com/bigfile.jpg | exiftool -fast -
2709            Extract information from an image over the internet using the cURL
2710            utility.  The -fast option prevents exiftool from scanning for
2711            trailer information, so only the meta information header is
2712            transferred.
2713
2714       exiftool a.jpg -thumbnailimage -b | exiftool -comment=wow - | exiftool
2715       a.jpg -thumbnailimage'<=-'
2716            Add a comment to an embedded thumbnail image.  (Why anyone would
2717            want to do this I don't know, but I've included this as an example
2718            to illustrate the flexibility of ExifTool.)
2719

INTERRUPTING EXIFTOOL

2721       Interrupting exiftool with a CTRL-C or SIGINT will not result in
2722       partially written files or temporary files remaining on the hard disk.
2723       The exiftool application traps SIGINT and defers it until the end of
2724       critical processes if necessary, then does a proper cleanup before
2725       exiting.
2726

EXIT STATUS

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

AUTHOR

2733       Copyright 2003-2021, Phil Harvey
2734
2735       This is free software; you can redistribute it and/or modify it under
2736       the same terms as Perl itself.
2737

SEE ALSO

2739       Image::ExifTool(3pm), Image::ExifTool::TagNames(3pm),
2740       Image::ExifTool::Shortcuts(3pm), Image::ExifTool::Shift.pl
2741
2742
2743
2744perl v5.34.0                      2022-01-25                       EXIFTOOL(1)
Impressum