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

NAME

6       exiftool - Read and write meta information in files
7

SYNOPSIS

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

DESCRIPTION

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

OPTIONS

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

WINDOWS UNICODE FILE NAMES

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

WRITING READ-ONLY FILES

2215       In general, ExifTool may be used to write metadata to read-only files
2216       provided that the user has write permission in the directory.  However,
2217       there are three cases where file write permission is also required:
2218
2219       1) When using the -overwrite_original_in_place option.
2220
2221       2) When writing only pseudo System tags (eg. FileModifyDate).
2222
2223       3) On Windows if the file has Unicode characters in its name, and a)
2224       the -overwrite_original option is used, or b) the "_original" backup
2225       already exists.
2226
2227       Hidden files in Windows behave as read-only files when attempting to
2228       write any real tags to the file -- an error is generated when using the
2229       -overwrite_original_in_place, otherwise writing should be successful
2230       and the hidden attribute will be removed.  But the -if option may be
2231       used to avoid processing hidden files (provided Win32API::File is
2232       available):
2233
2234           exiftool -if "$fileattributes !~ /Hidden/" ...
2235

READING EXAMPLES

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

WRITING EXAMPLES

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

COPYING EXAMPLES

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

RENAMING EXAMPLES

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

GEOTAGGING EXAMPLES

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

PIPING EXAMPLES

2680       cat a.jpg | exiftool -
2681            Extract information from stdin.
2682
2683       exiftool image.jpg -thumbnailimage -b | exiftool -
2684            Extract information from an embedded thumbnail image.
2685
2686       cat a.jpg | exiftool -iptc:keywords+=fantastic - > b.jpg
2687            Add an IPTC keyword in a pipeline, saving output to a new file.
2688
2689       curl -s http://a.domain.com/bigfile.jpg | exiftool -fast -
2690            Extract information from an image over the internet using the cURL
2691            utility.  The -fast option prevents exiftool from scanning for
2692            trailer information, so only the meta information header is
2693            transferred.
2694
2695       exiftool a.jpg -thumbnailimage -b | exiftool -comment=wow - | exiftool
2696       a.jpg -thumbnailimage'<=-'
2697            Add a comment to an embedded thumbnail image.  (Why anyone would
2698            want to do this I don't know, but I've included this as an example
2699            to illustrate the flexibility of ExifTool.)
2700

INTERRUPTING EXIFTOOL

2702       Interrupting exiftool with a CTRL-C or SIGINT will not result in
2703       partially written files or temporary files remaining on the hard disk.
2704       The exiftool application traps SIGINT and defers it until the end of
2705       critical processes if necessary, then does a proper cleanup before
2706       exiting.
2707

EXIT STATUS

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

AUTHOR

2714       Copyright 2003-2021, Phil Harvey
2715
2716       This is free software; you can redistribute it and/or modify it under
2717       the same terms as Perl itself.
2718

SEE ALSO

2720       Image::ExifTool(3pm), Image::ExifTool::TagNames(3pm),
2721       Image::ExifTool::Shortcuts(3pm), Image::ExifTool::Shift.pl
2722
2723
2724
2725perl v5.34.0                      2021-08-24                       EXIFTOOL(1)
Impressum