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

OPTIONS

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

WINDOWS UNICODE FILE NAMES

2247       In Windows, command-line arguments are specified using the current code
2248       page and are recoded automatically to the system code page.  This
2249       recoding is not done for arguments in ExifTool arg files, so by default
2250       filenames in arg files use the system code page.  Unfortunately, these
2251       code pages are not complete character sets, so not all file names may
2252       be represented.
2253
2254       ExifTool 9.79 and later allow the file name encoding to be specified
2255       with "-charset filename=CHARSET", where "CHARSET" is the name of a
2256       valid ExifTool character set, preferably "UTF8" (see the -charset
2257       option for a complete list).  Setting this triggers the use of Windows
2258       wide-character i/o routines, thus providing support for most Unicode
2259       file names (see note 4).  But note that it is not trivial to pass
2260       properly encoded file names on the Windows command line (see
2261       <https://exiftool.org/faq.html#Q18> for details), so placing them in a
2262       UTF-8 encoded -@ argfile and using "-charset filename=utf8" is
2263       recommended if possible.
2264
2265       A warning is issued if a specified filename contains special characters
2266       and the filename character set was not provided.  However, the warning
2267       may be disabled by setting "-charset filename=""", and ExifTool may
2268       still function correctly if the system code page matches the character
2269       set used for the file names.
2270
2271       When a directory name is provided, the file name encoding need not be
2272       specified (unless the directory name contains special characters), and
2273       ExifTool will automatically use wide-character routines to scan the
2274       directory.
2275
2276       The filename character set applies to the FILE arguments as well as
2277       filename arguments of -@, -geotag, -o, -p, -srcfile, -tagsFromFile,
2278       -csv=, -j= and -TAG<=.  However, it does not apply to the -config
2279       filename, which always uses the system character set.  The "-charset
2280       filename=" option must come before the -@ option to be effective, but
2281       the order doesn't matter with respect to other options.
2282
2283       Notes:
2284
2285       1) FileName and Directory tag values still use the same encoding as
2286       other tag values, and are converted to/from the filename character set
2287       when writing/reading if specified.
2288
2289       2) Unicode support is not yet implemented for other Windows-based
2290       systems like Cygwin.
2291
2292       3) See "WRITING READ-ONLY FILES" below for a note about editing read-
2293       only files with Unicode names.
2294
2295       4) Unicode file names with surrogate pairs (code points over U+FFFF)
2296       still cause problems.
2297

WRITING READ-ONLY FILES

2299       In general, ExifTool may be used to write metadata to read-only files
2300       provided that the user has write permission in the directory.  However,
2301       there are three cases where file write permission is also required:
2302
2303       1) When using the -overwrite_original_in_place option.
2304
2305       2) When writing only pseudo System tags (eg. FileModifyDate).
2306
2307       3) On Windows if the file has Unicode characters in its name, and a)
2308       the -overwrite_original option is used, or b) the "_original" backup
2309       already exists.
2310
2311       Hidden files in Windows behave as read-only files when attempting to
2312       write any real tags to the file -- an error is generated when using the
2313       -overwrite_original_in_place, otherwise writing should be successful
2314       and the hidden attribute will be removed.  But the -if option may be
2315       used to avoid processing hidden files (provided Win32API::File is
2316       available):
2317
2318           exiftool -if "$fileattributes !~ /Hidden/" ...
2319

READING EXAMPLES

2321       Note: Beware when cutting and pasting these examples into your
2322       terminal!  Some characters such as single and double quotes and hyphens
2323       may have been changed into similar-looking yet functionally-different
2324       characters by the text formatter used to display this documentation.
2325       Also note that Windows users must use double quotes instead of single
2326       quotes as below around arguments containing special characters.
2327
2328       exiftool -a -u -g1 a.jpg
2329            Print all meta information in an image, including duplicate and
2330            unknown tags, sorted by group (for family 1).  For performance
2331            reasons, this command may not extract all available metadata.
2332            (Metadata in embedded documents, metadata extracted by external
2333            utilities, and metadata requiring excessive processing time may
2334            not be extracted).  Add "-ee3" and "-api RequestAll=3" to the
2335            command to extract absolutely everything available.
2336
2337       exiftool -common dir
2338            Print common meta information for all images in "dir".  "-common"
2339            is a shortcut tag representing common EXIF meta information.
2340
2341       exiftool -T -createdate -aperture -shutterspeed -iso dir > out.txt
2342            List specified meta information in tab-delimited column form for
2343            all images in "dir" to an output text file named "out.txt".
2344
2345       exiftool -s -ImageSize -ExposureTime b.jpg
2346            Print ImageSize and ExposureTime tag names and values.
2347
2348       exiftool -l -canon c.jpg d.jpg
2349            Print standard Canon information from two image files.
2350
2351       exiftool -r -w .txt -common pictures
2352            Recursively extract common meta information from files in
2353            "pictures" directory, writing text output to ".txt" files with the
2354            same names.
2355
2356       exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg
2357            Save thumbnail image from "image.jpg" to a file called
2358            "thumbnail.jpg".
2359
2360       exiftool -b -JpgFromRaw -w _JFR.JPG -ext NEF -r .
2361            Recursively extract JPG image from all Nikon NEF files in the
2362            current directory, adding "_JFR.JPG" for the name of the output
2363            JPG files.
2364
2365       exiftool -a -b -W %d%f_%t%-c.%s -preview:all dir
2366            Extract all types of preview images (ThumbnailImage, PreviewImage,
2367            JpgFromRaw, etc.) from files in directory "dir", adding the tag
2368            name to the output preview image file names.
2369
2370       exiftool -d '%r %a, %B %e, %Y' -DateTimeOriginal -S -s -ext jpg .
2371            Print formatted date/time for all JPG files in the current
2372            directory.
2373
2374       exiftool -IFD1:XResolution -IFD1:YResolution image.jpg
2375            Extract image resolution from EXIF IFD1 information (thumbnail
2376            image IFD).
2377
2378       exiftool '-*resolution*' image.jpg
2379            Extract all tags with names containing the word "Resolution" from
2380            an image.
2381
2382       exiftool -xmp:author:all -a image.jpg
2383            Extract all author-related XMP information from an image.
2384
2385       exiftool -xmp -b a.jpg > out.xmp
2386            Extract complete XMP data record intact from "a.jpg" and write it
2387            to "out.xmp" using the special "XMP" tag (see the Extra tags in
2388            Image::ExifTool::TagNames).
2389
2390       exiftool -p '$filename has date $dateTimeOriginal' -q -f dir
2391            Print one line of output containing the file name and
2392            DateTimeOriginal for each image in directory "dir".
2393
2394       exiftool -ee3 -p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts
2395            Extract all GPS positions from an AVCHD video.
2396
2397       exiftool -icc_profile -b -w icc image.jpg
2398            Save complete ICC_Profile from an image to an output file with the
2399            same name and an extension of ".icc".
2400
2401       exiftool -htmldump -w tmp/%f_%e.html t/images
2402            Generate HTML pages from a hex dump of EXIF information in all
2403            images from the "t/images" directory.  The output HTML files are
2404            written to the "tmp" directory (which is created if it didn't
2405            exist), with names of the form 'FILENAME_EXT.html'.
2406
2407       exiftool -a -b -ee -embeddedimage -W Image_%.3g3.%s file.pdf
2408            Extract embedded JPG and JP2 images from a PDF file.  The output
2409            images will have file names like "Image_#.jpg" or "Image_#.jp2",
2410            where "#" is the ExifTool family 3 embedded document number for
2411            the image.
2412

WRITING EXAMPLES

2414       Note that quotes are necessary around arguments which contain certain
2415       special characters such as ">", "<" or any white space.  These quoting
2416       techniques are shell dependent, but the examples below will work for
2417       most Unix shells.  With the Windows cmd shell however, double quotes
2418       should be used (eg. -Comment="This is a new comment").
2419
2420       exiftool -Comment='This is a new comment' dst.jpg
2421            Write new comment to a JPG image (replaces any existing comment).
2422
2423       exiftool -comment= -o newdir -ext jpg .
2424            Remove comment from all JPG images in the current directory,
2425            writing the modified images to a new directory.
2426
2427       exiftool -keywords=EXIF -keywords=editor dst.jpg
2428            Replace existing keyword list with two new keywords ("EXIF" and
2429            "editor").
2430
2431       exiftool -Keywords+=word -o newfile.jpg src.jpg
2432            Copy a source image to a new file, and add a keyword ("word") to
2433            the current list of keywords.
2434
2435       exiftool -exposurecompensation+=-0.5 a.jpg
2436            Decrement the value of ExposureCompensation by 0.5 EV.  Note that
2437            += with a negative value is used for decrementing because the -=
2438            operator is used for conditional deletion (see next example).
2439
2440       exiftool -credit-=xxx dir
2441            Delete Credit information from all files in a directory where the
2442            Credit value was "xxx".
2443
2444       exiftool -xmp:description-de='k&uuml;hl' -E dst.jpg
2445            Write alternate language for XMP:Description, using HTML character
2446            escaping to input special characters.
2447
2448       exiftool -all= dst.jpg
2449            Delete all meta information from an image.  Note: You should NOT
2450            do this to RAW images (except DNG) since proprietary RAW image
2451            formats often contain information in the makernotes that is
2452            necessary for converting the image.
2453
2454       exiftool -all= -comment='lonely' dst.jpg
2455            Delete all meta information from an image and add a comment back
2456            in.  (Note that the order is important: "-comment='lonely' -all="
2457            would also delete the new comment.)
2458
2459       exiftool -all= --jfif:all dst.jpg
2460            Delete all meta information except JFIF group from an image.
2461
2462       exiftool -Photoshop:All= dst.jpg
2463            Delete Photoshop meta information from an image (note that the
2464            Photoshop information also includes IPTC).
2465
2466       exiftool -r -XMP-crss:all= DIR
2467            Recursively delete all XMP-crss information from images in a
2468            directory.
2469
2470       exiftool '-ThumbnailImage<=thumb.jpg' dst.jpg
2471            Set the thumbnail image from specified file (Note: The quotes are
2472            necessary to prevent shell redirection).
2473
2474       exiftool '-JpgFromRaw<=%d%f_JFR.JPG' -ext NEF -r .
2475            Recursively write JPEG images with filenames ending in "_JFR.JPG"
2476            to the JpgFromRaw tag of like-named files with extension ".NEF" in
2477            the current directory.  (This is the inverse of the "-JpgFromRaw"
2478            command of the "READING EXAMPLES" section above.)
2479
2480       exiftool -DateTimeOriginal-='0:0:0 1:30:0' dir
2481            Adjust original date/time of all images in directory "dir" by
2482            subtracting one hour and 30 minutes.  (This is equivalent to
2483            "-DateTimeOriginal-=1.5".  See Image::ExifTool::Shift.pl for
2484            details.)
2485
2486       exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg
2487            Add 3 hours to the CreateDate and ModifyDate timestamps of two
2488            images.
2489
2490       exiftool -AllDates+=1:30 -if '$make eq "Canon"' dir
2491            Shift the values of DateTimeOriginal, CreateDate and ModifyDate
2492            forward by 1 hour and 30 minutes for all Canon images in a
2493            directory.  (The AllDates tag is provided as a shortcut for these
2494            three tags, allowing them to be accessed via a single tag.)
2495
2496       exiftool -xmp:city=Kingston image1.jpg image2.nef
2497            Write a tag to the XMP group of two images.  (Without the "xmp:"
2498            this tag would get written to the IPTC group since "City" exists
2499            in both, and IPTC is preferred by default.)
2500
2501       exiftool -LightSource-='Unknown (0)' dst.tiff
2502            Delete "LightSource" tag only if it is unknown with a value of 0.
2503
2504       exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg
2505            Set "WhiteBalance" to "Tungsten" only if it was previously "Auto".
2506
2507       exiftool -comment-= -comment='new comment' a.jpg
2508            Write a new comment only if the image doesn't have one already.
2509
2510       exiftool -o %d%f.xmp dir
2511            Create XMP meta information data files for all images in "dir".
2512
2513       exiftool -o test.xmp -owner=Phil -title='XMP File'
2514            Create an XMP data file only from tags defined on the command
2515            line.
2516
2517       exiftool '-ICC_Profile<=%d%f.icc' image.jpg
2518            Write ICC_Profile to an image from a ".icc" file of the same name.
2519
2520       exiftool -hierarchicalkeywords='{keyword=one,children={keyword=B}}'
2521            Write structured XMP information.  See
2522            <https://exiftool.org/struct.html> for more details.
2523
2524       exiftool -trailer:all= image.jpg
2525            Delete any trailer found after the end of image (EOI) in a JPEG
2526            file.  A number of digital cameras store a large PreviewImage
2527            after the JPEG EOI, and the file size may be reduced significantly
2528            by deleting this trailer.  See the JPEG Tags documentation for a
2529            list of recognized JPEG trailers.
2530

COPYING EXAMPLES

2532       These examples demonstrate the ability to copy tag values between
2533       files.
2534
2535       exiftool -tagsFromFile src.cr2 dst.jpg
2536            Copy the values of all writable tags from "src.cr2" to "dst.jpg",
2537            writing the information to same-named tags in the preferred
2538            groups.
2539
2540       exiftool -TagsFromFile src.jpg -all:all dst.jpg
2541            Copy the values of all writable tags from "src.jpg" to "dst.jpg",
2542            preserving the original tag groups.
2543
2544       exiftool -all= -tagsfromfile src.jpg -exif:all dst.jpg
2545            Erase all meta information from "dst.jpg" image, then copy EXIF
2546            tags from "src.jpg".
2547
2548       exiftool -exif:all= -tagsfromfile @ -all:all -unsafe bad.jpg
2549            Rebuild all EXIF meta information from scratch in an image.  This
2550            technique can be used in JPEG images to repair corrupted EXIF
2551            information which otherwise could not be written due to errors.
2552            The "Unsafe" tag is a shortcut for unsafe EXIF tags in JPEG images
2553            which are not normally copied.  See the tag name documentation for
2554            more details about unsafe tags.
2555
2556       exiftool -Tagsfromfile a.jpg out.xmp
2557            Copy meta information from "a.jpg" to an XMP data file.  If the
2558            XMP data file "out.xmp" already exists, it will be updated with
2559            the new information.  Otherwise the XMP data file will be created.
2560            Only metadata-only files may be created like this (files
2561            containing images may be edited but not created).  See "WRITING
2562            EXAMPLES" above for another technique to generate XMP files.
2563
2564       exiftool -tagsFromFile a.jpg -XMP:All= -ThumbnailImage= -m b.jpg
2565            Copy all meta information from "a.jpg" to "b.jpg", deleting all
2566            XMP information and the thumbnail image from the destination.
2567
2568       exiftool -TagsFromFile src.jpg -title -author=Phil dst.jpg
2569            Copy title from one image to another and set a new author name.
2570
2571       exiftool -TagsFromFile a.jpg -ISO -TagsFromFile b.jpg -comment dst.jpg
2572            Copy ISO from one image and Comment from another image to a
2573            destination image.
2574
2575       exiftool -tagsfromfile src.jpg -exif:all --subifd:all dst.jpg
2576            Copy only the EXIF information from one image to another,
2577            excluding SubIFD tags.
2578
2579       exiftool '-FileModifyDate<DateTimeOriginal' dir
2580            Use the original date from the meta information to set the same
2581            file's filesystem modification date for all images in a directory.
2582            (Note that "-TagsFromFile @" is assumed if no other -TagsFromFile
2583            is specified when redirecting information as in this example.)
2584
2585       exiftool -TagsFromFile src.jpg '-xmp:all<all' dst.jpg
2586            Copy all possible information from "src.jpg" and write in XMP
2587            format to "dst.jpg".
2588
2589       exiftool '-Description<${FileName;s/\.[^.]*$//}' dir
2590            Set the image Description from the file name after removing the
2591            extension.  This example uses the "Advanced formatting feature" to
2592            perform a substitution operation to remove the last dot and
2593            subsequent characters from the file name.
2594
2595       exiftool -@ iptc2xmp.args -iptc:all= a.jpg
2596            Translate IPTC information to XMP with appropriate tag name
2597            conversions, and delete the original IPTC information from an
2598            image.  This example uses iptc2xmp.args, which is a file included
2599            with the ExifTool distribution that contains the required
2600            arguments to convert IPTC information to XMP format.  Also
2601            included with the distribution are xmp2iptc.args (which performs
2602            the inverse conversion) and a few more .args files for other
2603            conversions between EXIF, IPTC and XMP.
2604
2605       exiftool -tagsfromfile %d%f.CR2 -r -ext JPG dir
2606            Recursively rewrite all "JPG" images in "dir" with information
2607            copied from the corresponding "CR2" images in the same
2608            directories.
2609
2610       exiftool '-keywords+<make' image.jpg
2611            Add camera make to list of keywords.
2612
2613       exiftool '-comment<ISO=$exif:iso Exposure=${shutterspeed}' dir
2614            Set the Comment tag of all images in "dir" from the values of the
2615            EXIF:ISO and ShutterSpeed tags.  The resulting comment will be in
2616            the form "ISO=100 Exposure=1/60".
2617
2618       exiftool -TagsFromFile src.jpg -icc_profile dst.jpg
2619            Copy ICC_Profile from one image to another.
2620
2621       exiftool -TagsFromFile src.jpg -all:all dst.mie
2622            Copy all meta information in its original form from a JPEG image
2623            to a MIE file.  The MIE file will be created if it doesn't exist.
2624            This technique can be used to store the metadata of an image so it
2625            can be inserted back into the image (with the inverse command)
2626            later in a workflow.
2627
2628       exiftool -o dst.mie -all:all src.jpg
2629            This command performs exactly the same task as the command above,
2630            except that the -o option will not write to an output file that
2631            already exists.
2632
2633       exiftool -b -jpgfromraw -w %d%f_%ue.jpg -execute -b -previewimage -w
2634       %d%f_%ue.jpg -execute -tagsfromfile @ -srcfile %d%f_%ue.jpg
2635       -overwrite_original -common_args --ext jpg DIR
2636            [Advanced] Extract JpgFromRaw or PreviewImage from all but JPG
2637            files in DIR, saving them with file names like "image_EXT.jpg",
2638            then add all meta information from the original files to the
2639            extracted images.  Here, the command line is broken into three
2640            sections (separated by -execute options), and each is executed as
2641            if it were a separate command.  The -common_args option causes the
2642            "--ext jpg DIR" arguments to be applied to all three commands, and
2643            the -srcfile option allows the extracted JPG image to be the
2644            source file for the third command (whereas the RAW files are the
2645            source files for the other two commands).
2646

RENAMING EXAMPLES

2648       By writing the "FileName" and "Directory" tags, files are renamed
2649       and/or moved to new directories.  This can be particularly useful and
2650       powerful for organizing files by date when combined with the -d option.
2651       New directories are created as necessary, but existing files will not
2652       be overwritten.  The format codes %d, %f and %e may be used in the new
2653       file name to represent the directory, name and extension of the
2654       original file, and %c may be used to add a copy number if the file
2655       already exists (see the -w option for details).  Note that if used
2656       within a date format string, an extra '%' must be added to pass these
2657       codes through the date/time parser.  (And further note that in a
2658       Windows batch file, all '%' characters must also be escaped, so in this
2659       extreme case '%%%%f' is necessary to pass a simple '%f' through the two
2660       levels of parsing.)  See <https://exiftool.org/filename.html> for
2661       additional documentation and examples.
2662
2663       exiftool -filename=new.jpg dir/old.jpg
2664            Rename "old.jpg" to "new.jpg" in directory "dir".
2665
2666       exiftool -directory=%e dir
2667            Move all files from directory "dir" into directories named by the
2668            original file extensions.
2669
2670       exiftool '-Directory<DateTimeOriginal' -d %Y/%m/%d dir
2671            Move all files in "dir" into a directory hierarchy based on year,
2672            month and day of "DateTimeOriginal".  eg) This command would move
2673            the file "dir/image.jpg" with a "DateTimeOriginal" of "2005:10:12
2674            16:05:56" to "2005/10/12/image.jpg".
2675
2676       exiftool -o . '-Directory<DateTimeOriginal' -d %Y/%m/%d dir
2677            Same effect as above except files are copied instead of moved.
2678
2679       exiftool '-filename<%f_${model;}.%e' dir
2680            Rename all files in "dir" by adding the camera model name to the
2681            file name.  The semicolon after the tag name inside the braces
2682            causes characters which are invalid in Windows file names to be
2683            deleted from the tag value (see the "Advanced formatting feature"
2684            for an explanation).
2685
2686       exiftool '-FileName<CreateDate' -d %Y%m%d_%H%M%S%%-c.%%e dir
2687            Rename all images in "dir" according to the "CreateDate" date and
2688            time, adding a copy number with leading '-' if the file already
2689            exists ("%-c"), and preserving the original file extension (%e).
2690            Note the extra '%' necessary to escape the filename codes (%c and
2691            %e) in the date format string.
2692
2693       exiftool -r '-FileName<CreateDate' -d %Y-%m-%d/%H%M_%%f.%%e dir
2694            Both the directory and the filename may be changed together via
2695            the "FileName" tag if the new "FileName" contains a '/'.  The
2696            example above recursively renames all images in a directory by
2697            adding a "CreateDate" timestamp to the start of the filename, then
2698            moves them into new directories named by date.
2699
2700       exiftool '-FileName<${CreateDate}_$filenumber.jpg' -d %Y%m%d -ext jpg .
2701            Set the filename of all JPG images in the current directory from
2702            the CreateDate and FileNumber tags, in the form
2703            "20060507_118-1861.jpg".
2704

GEOTAGGING EXAMPLES

2706       ExifTool implements geotagging from GPS log files via 3 special tags:
2707       Geotag (which for convenience is also implemented as an exiftool
2708       option), Geosync and Geotime. The examples below highlight some
2709       geotagging features.  See <https://exiftool.org/geotag.html> for
2710       additional documentation.  (Note that geotagging from known GPS
2711       coordinates is done by writing the GPS tags directly rather than using
2712       the -geotag option.)
2713
2714       exiftool -geotag track.log a.jpg
2715            Geotag an image ("a.jpg") from position information in a GPS track
2716            log ("track.log").  Since the "Geotime" tag is not specified, the
2717            value of DateTimeOriginal is used for geotagging.  Local system
2718            time is assumed unless DateTimeOriginal contains a timezone.
2719
2720       exiftool -geotag t.log -geotime='2009:04:02 13:41:12-05:00' a.jpg
2721            Geotag an image with the GPS position for a specific time.
2722
2723       exiftool -geotag log.gpx '-xmp:geotime<createdate' dir
2724            Geotag all images in directory "dir" with XMP tags instead of EXIF
2725            tags, based on the image CreateDate.
2726
2727       exiftool -geotag a.log -geosync=-20 dir
2728            Geotag images in directory "dir", accounting for image timestamps
2729            which were 20 seconds ahead of GPS.
2730
2731       exiftool -geotag a.log -geosync=1.jpg -geosync=2.jpg dir
2732            Geotag images using time synchronization from two previously
2733            geotagged images (1.jpg and 2.jpg), synchronizing the image and
2734            GPS times using a linear time drift correction.
2735
2736       exiftool -geotag a.log '-geotime<${createdate}+01:00' dir
2737            Geotag images in "dir" using CreateDate with the specified
2738            timezone.  If CreateDate already contained a timezone, then the
2739            timezone specified on the command line is ignored.
2740
2741       exiftool -geotag= a.jpg
2742            Delete GPS tags which may have been added by the geotag feature.
2743            Note that this does not remove all GPS tags -- to do this instead
2744            use "-gps:all=".
2745
2746       exiftool -xmp:geotag= a.jpg
2747            Delete XMP GPS tags which were added by the geotag feature.
2748
2749       exiftool -xmp:geotag=track.log a.jpg
2750            Geotag an image with XMP tags, using the time from
2751            DateTimeOriginal.
2752
2753       exiftool -geotag a.log -geotag b.log -r dir
2754            Combine multiple track logs and geotag an entire directory tree of
2755            images.
2756
2757       exiftool -geotag 'tracks/*.log' -r dir
2758            Read all track logs from the "tracks" directory.
2759
2760       exiftool -p gpx.fmt dir > out.gpx
2761            Generate a GPX track log from all images in directory "dir".  This
2762            example uses the "gpx.fmt" file included in the full ExifTool
2763            distribution package and assumes that the images in "dir" have all
2764            been previously geotagged.
2765

PIPING EXAMPLES

2767       cat a.jpg | exiftool -
2768            Extract information from stdin.
2769
2770       exiftool image.jpg -thumbnailimage -b | exiftool -
2771            Extract information from an embedded thumbnail image.
2772
2773       cat a.jpg | exiftool -iptc:keywords+=fantastic - > b.jpg
2774            Add an IPTC keyword in a pipeline, saving output to a new file.
2775
2776       curl -s http://a.domain.com/bigfile.jpg | exiftool -fast -
2777            Extract information from an image over the internet using the cURL
2778            utility.  The -fast option prevents exiftool from scanning for
2779            trailer information, so only the meta information header is
2780            transferred.
2781
2782       exiftool a.jpg -thumbnailimage -b | exiftool -comment=wow - | exiftool
2783       a.jpg -thumbnailimage'<=-'
2784            Add a comment to an embedded thumbnail image.  (Why anyone would
2785            want to do this I don't know, but I've included this as an example
2786            to illustrate the flexibility of ExifTool.)
2787

INTERRUPTING EXIFTOOL

2789       Interrupting exiftool with a CTRL-C or SIGINT will not result in
2790       partially written files or temporary files remaining on the hard disk.
2791       The exiftool application traps SIGINT and defers it until the end of
2792       critical processes if necessary, then does a proper cleanup before
2793       exiting.
2794

EXIT STATUS

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

AUTHOR

2801       Copyright 2003-2023, Phil Harvey
2802
2803       This is free software; you can redistribute it and/or modify it under
2804       the same terms as Perl itself.
2805

SEE ALSO

2807       Image::ExifTool(3pm), Image::ExifTool::TagNames(3pm),
2808       Image::ExifTool::Shortcuts(3pm), Image::ExifTool::Shift.pl
2809
2810
2811
2812perl v5.38.0                      2023-11-21                       EXIFTOOL(1)
Impressum