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

OPTIONS

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

WINDOWS UNICODE FILE NAMES

2141       In Windows, command-line arguments are specified using the current code
2142       page and are recoded automatically to the system code page.  This
2143       recoding is not done for arguments in ExifTool arg files, so by default
2144       filenames in arg files use the system code page.  Unfortunately, these
2145       code pages are not complete character sets, so not all file names may
2146       be represented.
2147
2148       ExifTool 9.79 and later allow the file name encoding to be specified
2149       with "-charset filename=CHARSET", where "CHARSET" is the name of a
2150       valid ExifTool character set, preferably "UTF8" (see the -charset
2151       option for a complete list).  Setting this triggers the use of Windows
2152       wide-character i/o routines, thus providing support for most Unicode
2153       file names (see note 4).  But note that it is not trivial to pass
2154       properly encoded file names on the Windows command line (see
2155       <https://exiftool.org/faq.html#Q18> for details), so placing them in a
2156       UTF-8 encoded -@ argfile and using "-charset filename=utf8" is
2157       recommended if possible.
2158
2159       A warning is issued if a specified filename contains special characters
2160       and the filename character set was not provided.  However, the warning
2161       may be disabled by setting "-charset filename=""", and ExifTool may
2162       still function correctly if the system code page matches the character
2163       set used for the file names.
2164
2165       When a directory name is provided, the file name encoding need not be
2166       specified (unless the directory name contains special characters), and
2167       ExifTool will automatically use wide-character routines to scan the
2168       directory.
2169
2170       The filename character set applies to the FILE arguments as well as
2171       filename arguments of -@, -geotag, -o, -p, -srcfile, -tagsFromFile,
2172       -csv=, -j= and -TAG<=.  However, it does not apply to the -config
2173       filename, which always uses the system character set.  The "-charset
2174       filename=" option must come before the -@ option to be effective, but
2175       the order doesn't matter with respect to other options.
2176
2177       Notes:
2178
2179       1) FileName and Directory tag values still use the same encoding as
2180       other tag values, and are converted to/from the filename character set
2181       when writing/reading if specified.
2182
2183       2) Unicode support is not yet implemented for other Windows-based
2184       systems like Cygwin.
2185
2186       3) See "WRITING READ-ONLY FILES" below for a note about editing read-
2187       only files with Unicode names.
2188
2189       4) Unicode file names with surrogate pairs (code points over U+FFFF)
2190       still cause problems.
2191

WRITING READ-ONLY FILES

2193       In general, ExifTool may be used to write metadata to read-only files
2194       provided that the user has write permission in the directory.  However,
2195       there are three cases where file write permission is also required:
2196
2197       1) When using the -overwrite_original_in_place option.
2198
2199       2) When writing only pseudo System tags (eg. FileModifyDate).
2200
2201       3) On Windows if the file has Unicode characters in its name, and a)
2202       the -overwrite_original option is used, or b) the "_original" backup
2203       already exists.
2204
2205       Hidden files in Windows behave as read-only files when attempting to
2206       write any real tags to the file -- an error is generated when using the
2207       -overwrite_original_in_place, otherwise writing should be successful
2208       and the hidden attribute will be removed.  But the -if option may be
2209       used to avoid processing hidden files (provided Win32API::File is
2210       available):
2211
2212           exiftool -if "$fileattributes !~ /Hidden/" ...
2213

READING EXAMPLES

2215       Note: Beware when cutting and pasting these examples into your
2216       terminal!  Some characters such as single and double quotes and hyphens
2217       may have been changed into similar-looking yet functionally-different
2218       characters by the text formatter used to display this documentation.
2219       Also note that Windows users must use double quotes instead of single
2220       quotes as below around arguments containing special characters.
2221
2222       exiftool -a -u -g1 a.jpg
2223            Print all meta information in an image, including duplicate and
2224            unknown tags, sorted by group (for family 1).  For performance
2225            reasons, this command may not extract all available metadata.
2226            (Metadata in embedded documents, metadata extracted by external
2227            utilities, and metadata requiring excessive processing time may
2228            not be extracted).  Add "-ee" and "-api RequestAll=3" to the
2229            command to extract absolutely everything available.
2230
2231       exiftool -common dir
2232            Print common meta information for all images in "dir".  "-common"
2233            is a shortcut tag representing common EXIF meta information.
2234
2235       exiftool -T -createdate -aperture -shutterspeed -iso dir > out.txt
2236            List specified meta information in tab-delimited column form for
2237            all images in "dir" to an output text file named "out.txt".
2238
2239       exiftool -s -ImageSize -ExposureTime b.jpg
2240            Print ImageSize and ExposureTime tag names and values.
2241
2242       exiftool -l -canon c.jpg d.jpg
2243            Print standard Canon information from two image files.
2244
2245       exiftool -r -w .txt -common pictures
2246            Recursively extract common meta information from files in
2247            "pictures" directory, writing text output to ".txt" files with the
2248            same names.
2249
2250       exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg
2251            Save thumbnail image from "image.jpg" to a file called
2252            "thumbnail.jpg".
2253
2254       exiftool -b -JpgFromRaw -w _JFR.JPG -ext NEF -r .
2255            Recursively extract JPG image from all Nikon NEF files in the
2256            current directory, adding "_JFR.JPG" for the name of the output
2257            JPG files.
2258
2259       exiftool -a -b -W %d%f_%t%-c.%s -preview:all dir
2260            Extract all types of preview images (ThumbnailImage, PreviewImage,
2261            JpgFromRaw, etc.) from files in directory "dir", adding the tag
2262            name to the output preview image file names.
2263
2264       exiftool -d '%r %a, %B %e, %Y' -DateTimeOriginal -S -s -ext jpg .
2265            Print formatted date/time for all JPG files in the current
2266            directory.
2267
2268       exiftool -IFD1:XResolution -IFD1:YResolution image.jpg
2269            Extract image resolution from EXIF IFD1 information (thumbnail
2270            image IFD).
2271
2272       exiftool '-*resolution*' image.jpg
2273            Extract all tags with names containing the word "Resolution" from
2274            an image.
2275
2276       exiftool -xmp:author:all -a image.jpg
2277            Extract all author-related XMP information from an image.
2278
2279       exiftool -xmp -b a.jpg > out.xmp
2280            Extract complete XMP data record intact from "a.jpg" and write it
2281            to "out.xmp" using the special "XMP" tag (see the Extra tags in
2282            Image::ExifTool::TagNames).
2283
2284       exiftool -p '$filename has date $dateTimeOriginal' -q -f dir
2285            Print one line of output containing the file name and
2286            DateTimeOriginal for each image in directory "dir".
2287
2288       exiftool -ee -p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts
2289            Extract all GPS positions from an AVCHD video.
2290
2291       exiftool -icc_profile -b -w icc image.jpg
2292            Save complete ICC_Profile from an image to an output file with the
2293            same name and an extension of ".icc".
2294
2295       exiftool -htmldump -w tmp/%f_%e.html t/images
2296            Generate HTML pages from a hex dump of EXIF information in all
2297            images from the "t/images" directory.  The output HTML files are
2298            written to the "tmp" directory (which is created if it didn't
2299            exist), with names of the form 'FILENAME_EXT.html'.
2300
2301       exiftool -a -b -ee -embeddedimage -W Image_%.3g3.%s file.pdf
2302            Extract embedded JPG and JP2 images from a PDF file.  The output
2303            images will have file names like "Image_#.jpg" or "Image_#.jp2",
2304            where "#" is the ExifTool family 3 embedded document number for
2305            the image.
2306

WRITING EXAMPLES

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

COPYING EXAMPLES

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

RENAMING EXAMPLES

2542       By writing the "FileName" and "Directory" tags, files are renamed
2543       and/or moved to new directories.  This can be particularly useful and
2544       powerful for organizing files by date when combined with the -d option.
2545       New directories are created as necessary, but existing files will not
2546       be overwritten.  The format codes %d, %f and %e may be used in the new
2547       file name to represent the directory, name and extension of the
2548       original file, and %c may be used to add a copy number if the file
2549       already exists (see the -w option for details).  Note that if used
2550       within a date format string, an extra '%' must be added to pass these
2551       codes through the date/time parser.  (And further note that in a
2552       Windows batch file, all '%' characters must also be escaped, so in this
2553       extreme case '%%%%f' is necessary to pass a simple '%f' through the two
2554       levels of parsing.)  See <https://exiftool.org/filename.html> for
2555       additional documentation and examples.
2556
2557       exiftool -filename=new.jpg dir/old.jpg
2558            Rename "old.jpg" to "new.jpg" in directory "dir".
2559
2560       exiftool -directory=%e dir
2561            Move all files from directory "dir" into directories named by the
2562            original file extensions.
2563
2564       exiftool '-Directory<DateTimeOriginal' -d %Y/%m/%d dir
2565            Move all files in "dir" into a directory hierarchy based on year,
2566            month and day of "DateTimeOriginal".  eg) This command would move
2567            the file "dir/image.jpg" with a "DateTimeOriginal" of "2005:10:12
2568            16:05:56" to "2005/10/12/image.jpg".
2569
2570       exiftool -o . '-Directory<DateTimeOriginal' -d %Y/%m/%d dir
2571            Same effect as above except files are copied instead of moved.
2572
2573       exiftool '-filename<%f_${model;}.%e' dir
2574            Rename all files in "dir" by adding the camera model name to the
2575            file name.  The semicolon after the tag name inside the braces
2576            causes characters which are invalid in Windows file names to be
2577            deleted from the tag value (see the "Advanced formatting feature"
2578            for an explanation).
2579
2580       exiftool '-FileName<CreateDate' -d %Y%m%d_%H%M%S%%-c.%%e dir
2581            Rename all images in "dir" according to the "CreateDate" date and
2582            time, adding a copy number with leading '-' if the file already
2583            exists ("%-c"), and preserving the original file extension (%e).
2584            Note the extra '%' necessary to escape the filename codes (%c and
2585            %e) in the date format string.
2586
2587       exiftool -r '-FileName<CreateDate' -d %Y-%m-%d/%H%M_%%f.%%e dir
2588            Both the directory and the filename may be changed together via
2589            the "FileName" tag if the new "FileName" contains a '/'.  The
2590            example above recursively renames all images in a directory by
2591            adding a "CreateDate" timestamp to the start of the filename, then
2592            moves them into new directories named by date.
2593
2594       exiftool '-FileName<${CreateDate}_$filenumber.jpg' -d %Y%m%d -ext jpg .
2595            Set the filename of all JPG images in the current directory from
2596            the CreateDate and FileNumber tags, in the form
2597            "20060507_118-1861.jpg".
2598

GEOTAGGING EXAMPLES

2600       ExifTool implements geotagging via 3 special tags: Geotag (which for
2601       convenience is also implemented as an exiftool option), Geosync and
2602       Geotime.  The examples below highlight some geotagging features.  See
2603       <https://exiftool.org/geotag.html> for additional documentation.
2604
2605       exiftool -geotag track.log a.jpg
2606            Geotag an image ("a.jpg") from position information in a GPS track
2607            log ("track.log").  Since the "Geotime" tag is not specified, the
2608            value of DateTimeOriginal is used for geotagging.  Local system
2609            time is assumed unless DateTimeOriginal contains a timezone.
2610
2611       exiftool -geotag t.log -geotime='2009:04:02 13:41:12-05:00' a.jpg
2612            Geotag an image with the GPS position for a specific time.
2613
2614       exiftool -geotag log.gpx '-xmp:geotime<createdate' dir
2615            Geotag all images in directory "dir" with XMP tags instead of EXIF
2616            tags, based on the image CreateDate.
2617
2618       exiftool -geotag a.log -geosync=-20 dir
2619            Geotag images in directory "dir", accounting for image timestamps
2620            which were 20 seconds ahead of GPS.
2621
2622       exiftool -geotag a.log -geosync=1.jpg -geosync=2.jpg dir
2623            Geotag images using time synchronization from two previously
2624            geotagged images (1.jpg and 2.jpg), synchronizing the image and
2625            GPS times using a linear time drift correction.
2626
2627       exiftool -geotag a.log '-geotime<${createdate}+01:00' dir
2628            Geotag images in "dir" using CreateDate with the specified
2629            timezone.  If CreateDate already contained a timezone, then the
2630            timezone specified on the command line is ignored.
2631
2632       exiftool -geotag= a.jpg
2633            Delete GPS tags which may have been added by the geotag feature.
2634            Note that this does not remove all GPS tags -- to do this instead
2635            use "-gps:all=".
2636
2637       exiftool -xmp:geotag= a.jpg
2638            Delete XMP GPS tags which were added by the geotag feature.
2639
2640       exiftool -xmp:geotag=track.log a.jpg
2641            Geotag an image with XMP tags, using the time from
2642            DateTimeOriginal.
2643
2644       exiftool -geotag a.log -geotag b.log -r dir
2645            Combine multiple track logs and geotag an entire directory tree of
2646            images.
2647
2648       exiftool -geotag 'tracks/*.log' -r dir
2649            Read all track logs from the "tracks" directory.
2650
2651       exiftool -p gpx.fmt -d %Y-%m-%dT%H:%M:%SZ dir > out.gpx
2652            Generate a GPX track log from all images in directory "dir".  This
2653            example uses the "gpx.fmt" file included in the full ExifTool
2654            distribution package and assumes that the images in "dir" have all
2655            been previously geotagged.
2656

PIPING EXAMPLES

2658       cat a.jpg | exiftool -
2659            Extract information from stdin.
2660
2661       exiftool image.jpg -thumbnailimage -b | exiftool -
2662            Extract information from an embedded thumbnail image.
2663
2664       cat a.jpg | exiftool -iptc:keywords+=fantastic - > b.jpg
2665            Add an IPTC keyword in a pipeline, saving output to a new file.
2666
2667       curl -s http://a.domain.com/bigfile.jpg | exiftool -fast -
2668            Extract information from an image over the internet using the cURL
2669            utility.  The -fast option prevents exiftool from scanning for
2670            trailer information, so only the meta information header is
2671            transferred.
2672
2673       exiftool a.jpg -thumbnailimage -b | exiftool -comment=wow - | exiftool
2674       a.jpg -thumbnailimage'<=-'
2675            Add a comment to an embedded thumbnail image.  (Why anyone would
2676            want to do this I don't know, but I've included this as an example
2677            to illustrate the flexibility of ExifTool.)
2678

INTERRUPTING EXIFTOOL

2680       Interrupting exiftool with a CTRL-C or SIGINT will not result in
2681       partially written files or temporary files remaining on the hard disk.
2682       The exiftool application traps SIGINT and defers it until the end of
2683       critical processes if necessary, then does a proper cleanup before
2684       exiting.
2685

EXIT STATUS

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

AUTHOR

2692       Copyright 2003-2021, Phil Harvey
2693
2694       This is free software; you can redistribute it and/or modify it under
2695       the same terms as Perl itself.
2696

SEE ALSO

2698       Image::ExifTool(3pm), Image::ExifTool::TagNames(3pm),
2699       Image::ExifTool::Shortcuts(3pm), Image::ExifTool::Shift.pl
2700
2701
2702
2703perl v5.32.1                      2021-04-26                       EXIFTOOL(1)
Impressum