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

NAME

6       exiftool - Read and write meta information in files
7

SYNOPSIS

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

DESCRIPTION

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

OPTIONS

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

WINDOWS UNICODE FILE NAMES

2054       In Windows, command-line arguments are specified using the current code
2055       page and are recoded automatically to the system code page.  This
2056       recoding is not done for arguments in ExifTool arg files, so by default
2057       filenames in arg files use the system code page.  Unfortunately, these
2058       code pages are not complete character sets, so not all file names may
2059       be represented.
2060
2061       ExifTool 9.79 and later allow the file name encoding to be specified
2062       with "-charset filename=CHARSET", where "CHARSET" is the name of a
2063       valid ExifTool character set, preferably "UTF8" (see the -charset
2064       option for a complete list).  Setting this triggers the use of Windows
2065       wide-character i/o routines, thus providing support for most Unicode
2066       file names (see note 4).  But note that it is not trivial to pass
2067       properly encoded file names on the Windows command line (see
2068       <http://owl.phy.queensu.ca/~phil/exiftool/faq.html#Q18> for details),
2069       so placing them in a UTF-8 encoded -@ argfile and using "-charset
2070       filename=utf8" is recommended if possible.
2071
2072       A warning is issued if a specified filename contains special characters
2073       and the filename character set was not provided.  However, the warning
2074       may be disabled by setting "-charset filename=""", and ExifTool may
2075       still function correctly if the system code page matches the character
2076       set used for the file names.
2077
2078       When a directory name is provided, the file name encoding need not be
2079       specified (unless the directory name contains special characters), and
2080       ExifTool will automatically use wide-character routines to scan the
2081       directory.
2082
2083       The filename character set applies to the FILE arguments as well as
2084       filename arguments of -@, -geotag, -o, -p, -srcfile, -tagsFromFile,
2085       -csv=, -j= and -TAG<=.  However, it does not apply to the -config
2086       filename, which always uses the system character set.  The "-charset
2087       filename=" option must come before the -@ option to be effective, but
2088       the order doesn't matter with respect to other options.
2089
2090       Notes:
2091
2092       1) FileName and Directory tag values still use the same encoding as
2093       other tag values, and are converted to/from the filename character set
2094       when writing/reading if specified.
2095
2096       2) Unicode support is not yet implemented for other Windows-based
2097       systems like Cygwin.
2098
2099       3) See "WRITING READ-ONLY FILES" below for a note about editing read-
2100       only files with Unicode names.
2101
2102       4) Unicode file names with surrogate pairs (code points over U+FFFF)
2103       still cause problems.
2104

WRITING READ-ONLY FILES

2106       In general, ExifTool may be used to write metadata to read-only files
2107       provided that the user has write permission in the directory.  However,
2108       there are three cases where file write permission is also required:
2109
2110       1) When using the -overwrite_original_in_place option.
2111
2112       2) When writing only pseudo System tags (eg. FileModifyDate).
2113
2114       3) On Windows if the file has Unicode characters in its name, and a)
2115       the -overwrite_original option is used, or b) the "_original" backup
2116       already exists.
2117

READING EXAMPLES

2119       Note: Beware when cutting and pasting these examples into your
2120       terminal!  Some characters such as single and double quotes and hyphens
2121       may have been changed into similar-looking yet functionally-different
2122       characters by the text formatter used to display this documentation.
2123       Also note that Windows users must use double quotes instead of single
2124       quotes as below around arguments containing special characters.
2125
2126       exiftool -a -u -g1 a.jpg
2127            Print all meta information in an image, including duplicate and
2128            unknown tags, sorted by group (for family 1).  For performance
2129            reasons, this command may not extract all available metadata.
2130            (Metadata in embedded documents, metadata extracted by external
2131            utilities, and metadata requiring excessive processing time may
2132            not be extracted).  Add "-ee" and "-api RequestAll=3" to the
2133            command to extract absolutely everything available.
2134
2135       exiftool -common dir
2136            Print common meta information for all images in "dir".  "-common"
2137            is a shortcut tag representing common EXIF meta information.
2138
2139       exiftool -T -createdate -aperture -shutterspeed -iso dir > out.txt
2140            List specified meta information in tab-delimited column form for
2141            all images in "dir" to an output text file named "out.txt".
2142
2143       exiftool -s -ImageSize -ExposureTime b.jpg
2144            Print ImageSize and ExposureTime tag names and values.
2145
2146       exiftool -l -canon c.jpg d.jpg
2147            Print standard Canon information from two image files.
2148
2149       exiftool -r -w .txt -common pictures
2150            Recursively extract common meta information from files in
2151            "pictures" directory, writing text output to ".txt" files with the
2152            same names.
2153
2154       exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg
2155            Save thumbnail image from "image.jpg" to a file called
2156            "thumbnail.jpg".
2157
2158       exiftool -b -JpgFromRaw -w _JFR.JPG -ext NEF -r .
2159            Recursively extract JPG image from all Nikon NEF files in the
2160            current directory, adding "_JFR.JPG" for the name of the output
2161            JPG files.
2162
2163       exiftool -a -b -W %d%f_%t%-c.%s -preview:all dir
2164            Extract all types of preview images (ThumbnailImage, PreviewImage,
2165            JpgFromRaw, etc.) from files in directory "dir", adding the tag
2166            name to the output preview image file names.
2167
2168       exiftool -d '%r %a, %B %e, %Y' -DateTimeOriginal -S -s -ext jpg .
2169            Print formatted date/time for all JPG files in the current
2170            directory.
2171
2172       exiftool -IFD1:XResolution -IFD1:YResolution image.jpg
2173            Extract image resolution from EXIF IFD1 information (thumbnail
2174            image IFD).
2175
2176       exiftool '-*resolution*' image.jpg
2177            Extract all tags with names containing the word "Resolution" from
2178            an image.
2179
2180       exiftool -xmp:author:all -a image.jpg
2181            Extract all author-related XMP information from an image.
2182
2183       exiftool -xmp -b a.jpg > out.xmp
2184            Extract complete XMP data record intact from "a.jpg" and write it
2185            to "out.xmp" using the special "XMP" tag (see the Extra tags in
2186            Image::ExifTool::TagNames).
2187
2188       exiftool -p '$filename has date $dateTimeOriginal' -q -f dir
2189            Print one line of output containing the file name and
2190            DateTimeOriginal for each image in directory "dir".
2191
2192       exiftool -ee -p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts
2193            Extract all GPS positions from an AVCHD video.
2194
2195       exiftool -icc_profile -b -w icc image.jpg
2196            Save complete ICC_Profile from an image to an output file with the
2197            same name and an extension of ".icc".
2198
2199       exiftool -htmldump -w tmp/%f_%e.html t/images
2200            Generate HTML pages from a hex dump of EXIF information in all
2201            images from the "t/images" directory.  The output HTML files are
2202            written to the "tmp" directory (which is created if it didn't
2203            exist), with names of the form 'FILENAME_EXT.html'.
2204
2205       exiftool -a -b -ee -embeddedimage -W Image_%.3g3.%s file.pdf
2206            Extract embedded JPG and JP2 images from a PDF file.  The output
2207            images will have file names like "Image_#.jpg" or "Image_#.jp2",
2208            where "#" is the ExifTool family 3 embedded document number for
2209            the image.
2210

WRITING EXAMPLES

2212       Note that quotes are necessary around arguments which contain certain
2213       special characters such as ">", "<" or any white space.  These quoting
2214       techniques are shell dependent, but the examples below will work for
2215       most Unix shells.  With the Windows cmd shell however, double quotes
2216       should be used (eg. -Comment="This is a new comment").
2217
2218       exiftool -Comment='This is a new comment' dst.jpg
2219            Write new comment to a JPG image (replaces any existing comment).
2220
2221       exiftool -comment= -o newdir -ext jpg .
2222            Remove comment from all JPG images in the current directory,
2223            writing the modified images to a new directory.
2224
2225       exiftool -keywords=EXIF -keywords=editor dst.jpg
2226            Replace existing keyword list with two new keywords ("EXIF" and
2227            "editor").
2228
2229       exiftool -Keywords+=word -o newfile.jpg src.jpg
2230            Copy a source image to a new file, and add a keyword ("word") to
2231            the current list of keywords.
2232
2233       exiftool -exposurecompensation+=-0.5 a.jpg
2234            Decrement the value of ExposureCompensation by 0.5 EV.  Note that
2235            += with a negative value is used for decrementing because the -=
2236            operator is used for conditional deletion (see next example).
2237
2238       exiftool -credit-=xxx dir
2239            Delete Credit information from all files in a directory where the
2240            Credit value was "xxx".
2241
2242       exiftool -xmp:description-de='k&uuml;hl' -E dst.jpg
2243            Write alternate language for XMP:Description, using HTML character
2244            escaping to input special characters.
2245
2246       exiftool -all= dst.jpg
2247            Delete all meta information from an image.  Note: You should NOT
2248            do this to RAW images (except DNG) since proprietary RAW image
2249            formats often contain information in the makernotes that is
2250            necessary for converting the image.
2251
2252       exiftool -all= -comment='lonely' dst.jpg
2253            Delete all meta information from an image and add a comment back
2254            in.  (Note that the order is important: "-comment='lonely' -all="
2255            would also delete the new comment.)
2256
2257       exiftool -all= --jfif:all dst.jpg
2258            Delete all meta information except JFIF group from an image.
2259
2260       exiftool -Photoshop:All= dst.jpg
2261            Delete Photoshop meta information from an image (note that the
2262            Photoshop information also includes IPTC).
2263
2264       exiftool -r -XMP-crss:all= DIR
2265            Recursively delete all XMP-crss information from images in a
2266            directory.
2267
2268       exiftool '-ThumbnailImage<=thumb.jpg' dst.jpg
2269            Set the thumbnail image from specified file (Note: The quotes are
2270            necessary to prevent shell redirection).
2271
2272       exiftool '-JpgFromRaw<=%d%f_JFR.JPG' -ext NEF -r .
2273            Recursively write JPEG images with filenames ending in "_JFR.JPG"
2274            to the JpgFromRaw tag of like-named files with extension ".NEF" in
2275            the current directory.  (This is the inverse of the "-JpgFromRaw"
2276            command of the "READING EXAMPLES" section above.)
2277
2278       exiftool -DateTimeOriginal-='0:0:0 1:30:0' dir
2279            Adjust original date/time of all images in directory "dir" by
2280            subtracting one hour and 30 minutes.  (This is equivalent to
2281            "-DateTimeOriginal-=1.5".  See Image::ExifTool::Shift.pl for
2282            details.)
2283
2284       exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg
2285            Add 3 hours to the CreateDate and ModifyDate timestamps of two
2286            images.
2287
2288       exiftool -AllDates+=1:30 -if '$make eq "Canon"' dir
2289            Shift the values of DateTimeOriginal, CreateDate and ModifyDate
2290            forward by 1 hour and 30 minutes for all Canon images in a
2291            directory.  (The AllDates tag is provided as a shortcut for these
2292            three tags, allowing them to be accessed via a single tag.)
2293
2294       exiftool -xmp:city=Kingston image1.jpg image2.nef
2295            Write a tag to the XMP group of two images.  (Without the "xmp:"
2296            this tag would get written to the IPTC group since "City" exists
2297            in both, and IPTC is preferred by default.)
2298
2299       exiftool -LightSource-='Unknown (0)' dst.tiff
2300            Delete "LightSource" tag only if it is unknown with a value of 0.
2301
2302       exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg
2303            Set "WhiteBalance" to "Tungsten" only if it was previously "Auto".
2304
2305       exiftool -comment-= -comment='new comment' a.jpg
2306            Write a new comment only if the image doesn't have one already.
2307
2308       exiftool -o %d%f.xmp dir
2309            Create XMP meta information data files for all images in "dir".
2310
2311       exiftool -o test.xmp -owner=Phil -title='XMP File'
2312            Create an XMP data file only from tags defined on the command
2313            line.
2314
2315       exiftool '-ICC_Profile<=%d%f.icc' image.jpg
2316            Write ICC_Profile to an image from a ".icc" file of the same name.
2317
2318       exiftool -hierarchicalkeywords='{keyword=one,children={keyword=B}}'
2319            Write structured XMP information.  See
2320            <http://owl.phy.queensu.ca/~phil/exiftool/struct.html> for more
2321            details.
2322
2323       exiftool -trailer:all= image.jpg
2324            Delete any trailer found after the end of image (EOI) in a JPEG
2325            file.  A number of digital cameras store a large PreviewImage
2326            after the JPEG EOI, and the file size may be reduced significantly
2327            by deleting this trailer.  See the JPEG Tags documentation for a
2328            list of recognized JPEG trailers.
2329

COPYING EXAMPLES

2331       These examples demonstrate the ability to copy tag values between
2332       files.
2333
2334       exiftool -tagsFromFile src.cr2 dst.jpg
2335            Copy the values of all writable tags from "src.cr2" to "dst.jpg",
2336            writing the information to same-named tags in the preferred
2337            groups.
2338
2339       exiftool -TagsFromFile src.jpg -all:all dst.jpg
2340            Copy the values of all writable tags from "src.jpg" to "dst.jpg",
2341            preserving the original tag groups.
2342
2343       exiftool -all= -tagsfromfile src.jpg -exif:all dst.jpg
2344            Erase all meta information from "dst.jpg" image, then copy EXIF
2345            tags from "src.jpg".
2346
2347       exiftool -exif:all= -tagsfromfile @ -all:all -unsafe bad.jpg
2348            Rebuild all EXIF meta information from scratch in an image.  This
2349            technique can be used in JPEG images to repair corrupted EXIF
2350            information which otherwise could not be written due to errors.
2351            The "Unsafe" tag is a shortcut for unsafe EXIF tags in JPEG images
2352            which are not normally copied.  See the tag name documentation for
2353            more details about unsafe tags.
2354
2355       exiftool -Tagsfromfile a.jpg out.xmp
2356            Copy meta information from "a.jpg" to an XMP data file.  If the
2357            XMP data file "out.xmp" already exists, it will be updated with
2358            the new information.  Otherwise the XMP data file will be created.
2359            Only metadata-only files may be created like this (files
2360            containing images may be edited but not created).  See "WRITING
2361            EXAMPLES" above for another technique to generate XMP files.
2362
2363       exiftool -tagsFromFile a.jpg -XMP:All= -ThumbnailImage= -m b.jpg
2364            Copy all meta information from "a.jpg" to "b.jpg", deleting all
2365            XMP information and the thumbnail image from the destination.
2366
2367       exiftool -TagsFromFile src.jpg -title -author=Phil dst.jpg
2368            Copy title from one image to another and set a new author name.
2369
2370       exiftool -TagsFromFile a.jpg -ISO -TagsFromFile b.jpg -comment dst.jpg
2371            Copy ISO from one image and Comment from another image to a
2372            destination image.
2373
2374       exiftool -tagsfromfile src.jpg -exif:all --subifd:all dst.jpg
2375            Copy only the EXIF information from one image to another,
2376            excluding SubIFD tags.
2377
2378       exiftool '-FileModifyDate<DateTimeOriginal' dir
2379            Use the original date from the meta information to set the same
2380            file's filesystem modification date for all images in a directory.
2381            (Note that "-TagsFromFile @" is assumed if no other -TagsFromFile
2382            is specified when redirecting information as in this example.)
2383
2384       exiftool -TagsFromFile src.jpg '-xmp:all<all' dst.jpg
2385            Copy all possible information from "src.jpg" and write in XMP
2386            format to "dst.jpg".
2387
2388       exiftool '-Description<${FileName;s/\.[^.]*$//}' dir
2389            Set the image Description from the file name after removing the
2390            extension.  This example uses the "Advanced formatting feature" to
2391            perform a substitution operation to remove the last dot and
2392            subsequent characters from the file name.
2393
2394       exiftool -@ iptc2xmp.args -iptc:all= a.jpg
2395            Translate IPTC information to XMP with appropriate tag name
2396            conversions, and delete the original IPTC information from an
2397            image.  This example uses iptc2xmp.args, which is a file included
2398            with the ExifTool distribution that contains the required
2399            arguments to convert IPTC information to XMP format.  Also
2400            included with the distribution are xmp2iptc.args (which performs
2401            the inverse conversion) and a few more .args files for other
2402            conversions between EXIF, IPTC and XMP.
2403
2404       exiftool -tagsfromfile %d%f.CR2 -r -ext JPG dir
2405            Recursively rewrite all "JPG" images in "dir" with information
2406            copied from the corresponding "CR2" images in the same
2407            directories.
2408
2409       exiftool '-keywords+<make' image.jpg
2410            Add camera make to list of keywords.
2411
2412       exiftool '-comment<ISO=$exif:iso Exposure=${shutterspeed}' dir
2413            Set the Comment tag of all images in "dir" from the values of the
2414            EXIF:ISO and ShutterSpeed tags.  The resulting comment will be in
2415            the form "ISO=100 Exposure=1/60".
2416
2417       exiftool -TagsFromFile src.jpg -icc_profile dst.jpg
2418            Copy ICC_Profile from one image to another.
2419
2420       exiftool -TagsFromFile src.jpg -all:all dst.mie
2421            Copy all meta information in its original form from a JPEG image
2422            to a MIE file.  The MIE file will be created if it doesn't exist.
2423            This technique can be used to store the metadata of an image so it
2424            can be inserted back into the image (with the inverse command)
2425            later in a workflow.
2426
2427       exiftool -o dst.mie -all:all src.jpg
2428            This command performs exactly the same task as the command above,
2429            except that the -o option will not write to an output file that
2430            already exists.
2431
2432       exiftool -b -jpgfromraw -w %d%f_%ue.jpg -execute -b -previewimage -w
2433       %d%f_%ue.jpg -execute -tagsfromfile @ -srcfile %d%f_%ue.jpg
2434       -overwrite_original -common_args --ext jpg DIR
2435            [Advanced] Extract JpgFromRaw or PreviewImage from all but JPG
2436            files in DIR, saving them with file names like "image_EXT.jpg",
2437            then add all meta information from the original files to the
2438            extracted images.  Here, the command line is broken into three
2439            sections (separated by -execute options), and each is executed as
2440            if it were a separate command.  The -common_args option causes the
2441            "--ext jpg DIR" arguments to be applied to all three commands, and
2442            the -srcfile option allows the extracted JPG image to be the
2443            source file for the third command (whereas the RAW files are the
2444            source files for the other two commands).
2445

RENAMING EXAMPLES

2447       By writing the "FileName" and "Directory" tags, files are renamed
2448       and/or moved to new directories.  This can be particularly useful and
2449       powerful for organizing files by date when combined with the -d option.
2450       New directories are created as necessary, but existing files will not
2451       be overwritten.  The format codes %d, %f and %e may be used in the new
2452       file name to represent the directory, name and extension of the
2453       original file, and %c may be used to add a copy number if the file
2454       already exists (see the -w option for details).  Note that if used
2455       within a date format string, an extra '%' must be added to pass these
2456       codes through the date/time parser.  (And further note that in a
2457       Windows batch file, all '%' characters must also be escaped, so in this
2458       extreme case '%%%%f' is necessary to pass a simple '%f' through the two
2459       levels of parsing.)  See
2460       <http://owl.phy.queensu.ca/~phil/exiftool/filename.html> for additional
2461       documentation and examples.
2462
2463       exiftool -filename=new.jpg dir/old.jpg
2464            Rename "old.jpg" to "new.jpg" in directory "dir".
2465
2466       exiftool -directory=%e dir
2467            Move all files from directory "dir" into directories named by the
2468            original file extensions.
2469
2470       exiftool '-Directory<DateTimeOriginal' -d %Y/%m/%d dir
2471            Move all files in "dir" into a directory hierarchy based on year,
2472            month and day of "DateTimeOriginal".  eg) This command would move
2473            the file "dir/image.jpg" with a "DateTimeOriginal" of "2005:10:12
2474            16:05:56" to "2005/10/12/image.jpg".
2475
2476       exiftool -o . '-Directory<DateTimeOriginal' -d %Y/%m/%d dir
2477            Same effect as above except files are copied instead of moved.
2478
2479       exiftool '-filename<%f_${model;}.%e' dir
2480            Rename all files in "dir" by adding the camera model name to the
2481            file name.  The semicolon after the tag name inside the braces
2482            causes characters which are invalid in Windows file names to be
2483            deleted from the tag value (see the "Advanced formatting feature"
2484            for an explanation).
2485
2486       exiftool '-FileName<CreateDate' -d %Y%m%d_%H%M%S%%-c.%%e dir
2487            Rename all images in "dir" according to the "CreateDate" date and
2488            time, adding a copy number with leading '-' if the file already
2489            exists ("%-c"), and preserving the original file extension (%e).
2490            Note the extra '%' necessary to escape the filename codes (%c and
2491            %e) in the date format string.
2492
2493       exiftool -r '-FileName<CreateDate' -d %Y-%m-%d/%H%M_%%f.%%e dir
2494            Both the directory and the filename may be changed together via
2495            the "FileName" tag if the new "FileName" contains a '/'.  The
2496            example above recursively renames all images in a directory by
2497            adding a "CreateDate" timestamp to the start of the filename, then
2498            moves them into new directories named by date.
2499
2500       exiftool '-FileName<${CreateDate}_$filenumber.jpg' -d %Y%m%d -ext jpg .
2501            Set the filename of all JPG images in the current directory from
2502            the CreateDate and FileNumber tags, in the form
2503            "20060507_118-1861.jpg".
2504

GEOTAGGING EXAMPLES

2506       ExifTool implements geotagging via 3 special tags: Geotag (which for
2507       convenience is also implemented as an exiftool option), Geosync and
2508       Geotime.  The examples below highlight some geotagging features.  See
2509       <http://owl.phy.queensu.ca/~phil/exiftool/geotag.html> for additional
2510       documentation.
2511
2512       exiftool -geotag track.log a.jpg
2513            Geotag an image ("a.jpg") from position information in a GPS track
2514            log ("track.log").  Since the "Geotime" tag is not specified, the
2515            value of DateTimeOriginal is used for geotagging.  Local system
2516            time is assumed unless DateTimeOriginal contains a timezone.
2517
2518       exiftool -geotag t.log -geotime='2009:04:02 13:41:12-05:00' a.jpg
2519            Geotag an image with the GPS position for a specific time.
2520
2521       exiftool -geotag log.gpx '-xmp:geotime<createdate' dir
2522            Geotag all images in directory "dir" with XMP tags instead of EXIF
2523            tags, based on the image CreateDate.
2524
2525       exiftool -geotag a.log -geosync=-20 dir
2526            Geotag images in directory "dir", accounting for image timestamps
2527            which were 20 seconds ahead of GPS.
2528
2529       exiftool -geotag a.log -geosync=1.jpg -geosync=2.jpg dir
2530            Geotag images using time synchronization from two previously
2531            geotagged images (1.jpg and 2.jpg), synchronizing the image and
2532            GPS times using a linear time drift correction.
2533
2534       exiftool -geotag a.log '-geotime<${createdate}+01:00' dir
2535            Geotag images in "dir" using CreateDate with the specified
2536            timezone.  If CreateDate already contained a timezone, then the
2537            timezone specified on the command line is ignored.
2538
2539       exiftool -geotag= a.jpg
2540            Delete GPS tags which may have been added by the geotag feature.
2541            Note that this does not remove all GPS tags -- to do this instead
2542            use "-gps:all=".
2543
2544       exiftool -xmp:geotag= a.jpg
2545            Delete XMP GPS tags which were added by the geotag feature.
2546
2547       exiftool -xmp:geotag=track.log a.jpg
2548            Geotag an image with XMP tags, using the time from
2549            DateTimeOriginal.
2550
2551       exiftool -geotag a.log -geotag b.log -r dir
2552            Combine multiple track logs and geotag an entire directory tree of
2553            images.
2554
2555       exiftool -geotag 'tracks/*.log' -r dir
2556            Read all track logs from the "tracks" directory.
2557
2558       exiftool -p gpx.fmt -d %Y-%m-%dT%H:%M:%SZ dir > out.gpx
2559            Generate a GPX track log from all images in directory "dir".  This
2560            example uses the "gpx.fmt" file included in the full ExifTool
2561            distribution package and assumes that the images in "dir" have all
2562            been previously geotagged.
2563

PIPING EXAMPLES

2565       cat a.jpg | exiftool -
2566            Extract information from stdin.
2567
2568       exiftool image.jpg -thumbnailimage -b | exiftool -
2569            Extract information from an embedded thumbnail image.
2570
2571       cat a.jpg | exiftool -iptc:keywords+=fantastic - > b.jpg
2572            Add an IPTC keyword in a pipeline, saving output to a new file.
2573
2574       curl -s http://a.domain.com/bigfile.jpg | exiftool -fast -
2575            Extract information from an image over the internet using the cURL
2576            utility.  The -fast option prevents exiftool from scanning for
2577            trailer information, so only the meta information header is
2578            transferred.
2579
2580       exiftool a.jpg -thumbnailimage -b | exiftool -comment=wow - | exiftool
2581       a.jpg -thumbnailimage'<=-'
2582            Add a comment to an embedded thumbnail image.  (Why anyone would
2583            want to do this I don't know, but I've included this as an example
2584            to illustrate the flexibility of ExifTool.)
2585

EXIT STATUS

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

AUTHOR

2592       Copyright 2003-2019, Phil Harvey
2593
2594       This is free software; you can redistribute it and/or modify it under
2595       the same terms as Perl itself.
2596

SEE ALSO

2598       Image::ExifTool(3pm), Image::ExifTool::TagNames(3pm),
2599       Image::ExifTool::Shortcuts(3pm), Image::ExifTool::Shift.pl
2600
2601
2602
2603perl v5.30.0                      2019-10-10                       EXIFTOOL(1)
Impressum