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

OPTIONS

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

WINDOWS UNICODE FILE NAMES

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

WRITING READ-ONLY FILES

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

READING EXAMPLES

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

WRITING EXAMPLES

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

COPYING EXAMPLES

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

RENAMING EXAMPLES

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

GEOTAGGING EXAMPLES

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

PIPING EXAMPLES

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

INTERRUPTING EXIFTOOL

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

EXIT STATUS

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

AUTHOR

2736       Copyright 2003-2022, Phil Harvey
2737
2738       This is free software; you can redistribute it and/or modify it under
2739       the same terms as Perl itself.
2740

SEE ALSO

2742       Image::ExifTool(3pm), Image::ExifTool::TagNames(3pm),
2743       Image::ExifTool::Shortcuts(3pm), Image::ExifTool::Shift.pl
2744
2745
2746
2747perl v5.36.0                      2022-07-22                       EXIFTOOL(1)
Impressum