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

NAME

6       exiftool - Read and write meta information in files
7

SYNOPSIS

9       exiftool [OPTIONS] [-TAG...] [--TAG...] FILE...
10       exiftool [OPTIONS] -TAG[+-<]=[VALUE]... FILE...
11       exiftool [OPTIONS] -tagsFromFile SRCFILE [-SRCTAG[>DSTTAG]...] FILE...
12       exiftool [ -ver | -list[w|f|wf|g[NUM]|d|x] ]
13
14       For specific examples, see the EXAMPLES sections below.
15

DESCRIPTION

17       A command-line interface to Image::ExifTool, used for reading and
18       writing meta information in image, audio and video files.  FILE is one
19       or more source file names, directory names, or "-" for the standard
20       input.  Information is read from the source files and output in
21       readable form to the console (or written to output text files with -w).
22
23       To write, copy or delete information in each FILE, specify new tag
24       values with the -TAG=[VALUE] syntax or the -tagsFromFile or -geotag
25       options.  By default the original files are preserved with "_original"
26       appended to their names -- be sure to verify that the new files are OK
27       before erasing the originals.  Once in write mode, exiftool will ignore
28       any read-specific options.
29
30       Note:  If FILE is a directory name then only supported file types in
31       the directory are processed (in write mode only writable types are
32       processed).  However, files may be specified by name, or the -ext
33       option may be used to force processing of files with any extension.
34
35       Below is a list of file types and meta information formats currently
36       supported by ExifTool (r = read, w = write, c = create):
37
38         File Types
39         ------------+-------------+-------------+-------------+------------
40         3FR   r     | DVB   r     | M4A/V r     | PBM   r/w   | RWZ   r
41         3G2   r     | DYLIB r     | MEF   r/w   | PDF   r/w   | RM    r
42         3GP   r     | EIP   r     | MIE   r/w/c | PEF   r/w   | SO    r
43         ACR   r     | EPS   r/w   | MIFF  r     | PFA   r     | SR2   r/w
44         AFM   r     | ERF   r/w   | MKA   r     | PFB   r     | SRF   r
45         AI    r/w   | EXE   r     | MKS   r     | PFM   r     | SRW   r/w
46         AIFF  r     | EXIF  r/w/c | MKV   r     | PGF   r     | SVG   r
47         APE   r     | F4A/V r     | MNG   r/w   | PGM   r/w   | SWF   r
48         ARW   r/w   | FLA   r     | MOS   r/w   | PICT  r     | THM   r/w
49         ASF   r     | FLAC  r     | MOV   r     | PMP   r     | TIFF  r/w
50         AVI   r     | FLV   r     | MP3   r     | PNG   r/w   | TTC   r
51         BMP   r     | FPX   r     | MP4   r     | PPM   r/w   | TTF   r
52         BTF   r     | GIF   r/w   | MPC   r     | PPT   r     | VRD   r/w/c
53         CHM   r     | GZ    r     | MPG   r     | PPTX  r     | VSD   r
54         COS   r     | HDP   r/w   | MPO   r/w   | PS    r/w   | WAV   r
55         CR2   r/w   | HTML  r     | MQV   r     | PSB   r/w   | WDP   r/w
56         CRW   r/w   | ICC   r/w/c | MRW   r/w   | PSD   r/w   | WEBP  r
57         CS1   r/w   | IIQ   r/w   | MXF   r     | PSP   r     | WEBM  r
58         DCM   r     | IND   r/w   | NEF   r/w   | QTIF  r     | WMA   r
59         DCP   r/w   | ITC   r     | NRW   r/w   | RA    r     | WMV   r
60         DCR   r     | J2C   r     | NUMBERS r   | RAF   r/w   | X3F   r/w
61         DFONT r     | JNG   r/w   | ODP   r     | RAM   r     | XCF   r
62         DIVX  r     | JP2   r/w   | ODS   r     | RAR   r     | XLS   r
63         DJVU  r     | JPEG  r/w   | ODT   r     | RAW   r/w   | XLSX  r
64         DLL   r     | K25   r     | OGG   r     | RIFF  r     | XMP   r/w/c
65         DNG   r/w   | KDC   r     | OGV   r     | RSRC  r     | ZIP   r
66         DOC   r     | KEY   r     | ORF   r/w   | RTF   r     |
67         DOCX  r     | LNK   r     | OTF   r     | RW2   r/w   |
68         DV    r     | M2TS  r     | PAGES r     | RWL   r/w   |
69
70         Meta Information
71         ----------------------+----------------------+---------------------
72         EXIF           r/w/c  |  CIFF           r/w  |  Ricoh RMETA    r
73         GPS            r/w/c  |  AFCP           r/w  |  Picture Info   r
74         IPTC           r/w/c  |  Kodak Meta     r/w  |  Adobe APP14    r
75         XMP            r/w/c  |  FotoStation    r/w  |  MPF            r
76         MakerNotes     r/w/c  |  PhotoMechanic  r/w  |  Stim           r
77         Photoshop IRB  r/w/c  |  JPEG 2000      r    |  APE            r
78         ICC Profile    r/w/c  |  DICOM          r    |  Vorbis         r
79         MIE            r/w/c  |  Flash          r    |  SPIFF          r
80         JFIF           r/w/c  |  FlashPix       r    |  DjVu           r
81         Ducky APP12    r/w/c  |  QuickTime      r    |  M2TS           r
82         PDF            r/w/c  |  Matroska       r    |  PE/COFF        r
83         PNG            r/w/c  |  GeoTIFF        r    |  AVCHD          r
84         Canon VRD      r/w/c  |  PrintIM        r    |  ZIP            r
85         Nikon Capture  r/w/c  |  ID3            r    |  (and more)
86

OPTIONS

88       Case is not significant for any command-line option (including tag and
89       group names), except for single-character options when the
90       corresponding upper-case option exists.  Many single-character options
91       have equivalent long-name versions (shown in brackets), and some
92       options have inverses which are invoked with a leading double-dash.
93       Note that multiple single-character options may NOT be combined into
94       one argument because this would be interpreted as a tag name.
95
96   Option Summary
97       Tag operations
98
99         -TAG or --TAG                    Extract or exclude specified tag
100         -TAG[+-]=[VALUE]                 Write new value for tag
101         -TAG[+-]<=DATFILE                Write tag value from contents of file
102         -TAG[+-]<SRCTAG                  Copy tag value (see -tagsFromFile)
103
104         -tagsFromFile SRCFILE            Copy tag values from file
105         -x TAG      (-exclude)           Exclude specified tag
106
107       Input-output text formatting
108
109         -args       (-argFormat)         Output data as exiftool arguments
110         -b          (-binary)            Output data in binary format
111         -c FMT      (-coordFormat)       Set format for GPS coordinates
112         -charset [[TYPE=]CHARSET]        Specify encoding for special characters
113         -csv[=CSVFILE]                   Export/import tags in CSV format
114         -d FMT      (-dateFormat)        Set format for date/time values
115         -D          (-decimal)           Show tag ID numbers in decimal
116         -E, -ex     (-escape(HTML|XML))  Escape values for HTML (-E) or XML (-ex)
117         -f          (-forcePrint)        Force printing of all specified tags
118         -g[NUM...]  (-groupHeadings)     Organize output by tag group
119         -G[NUM...]  (-groupNames)        Print group name for each tag
120         -h          (-htmlFormat)        Use HMTL formatting for output
121         -H          (-hex)               Show tag ID number in hexadecimal
122         -htmlDump[OFFSET]                Generate HTML-format binary dump
123         -j[=JSONFILE] (-json)            Export/import tags in JSON format
124         -l          (-long)              Use long 2-line output format
125         -L          (-latin)             Use Windows Latin1 encoding
126         -lang [LANG]                     Set current language
127         -n          (--printConv)        Disable print conversion
128         -p FMTFILE  (-printFormat)       Print output in specified format
129         -s[NUM]     (-short)             Short output format
130         -S          (-veryShort)         Very short output format
131         -sep STR    (-separator)         Set separator string for list items
132         -struct                          Enable output of structured information
133         -t          (-tab)               Output in tab-delimited list format
134         -T          (-table)             Output in tabular format
135         -v[NUM]     (-verbose)           Print verbose messages
136         -w[!] EXT   (-textOut)           Write output text files
137         -X          (-xmlFormat)         Use RDF/XML output format
138
139       Processing control
140
141         -a          (-duplicates)        Allow duplicate tags to be extracted
142         -e          (--composite)        Do not calculate composite tags
143         -ee         (-extractEmbedded)   Extract information from embedded files
144         -ext EXT    (-extension)         Process files with specified extension
145         -F[OFFSET]  (-fixBase)           Fix the base for maker notes offsets
146         -fast[NUM]                       Increase speed for slow devices
147         -fileOrder [-]TAG                Set file processing order
148         -i DIR      (-ignore)            Ignore specified directory name
149         -if EXPR                         Conditionally process files
150         -m          (-ignoreMinorErrors) Ignore minor errors and warnings
151         -o OUTFILE  (-out)               Set output file or directory name
152         -overwrite_original              Overwrite original by renaming tmp file
153         -overwrite_original_in_place     Overwrite original by copying tmp file
154         -P          (-preserve)          Preserve date/time of original file
155         -password PASSWD                 Password for processing protected files
156         -q          (-quiet)             Quiet processing
157         -r          (-recurse)           Recursively process subdirectories
158         -scanForXMP                      Brute force XMP scan
159         -u          (-unknown)           Extract unknown tags
160         -U          (-unknown2)          Extract unknown binary tags too
161         -z          (-zip)               Read/write compressed information
162
163       Special features
164
165         -geotag TRKFILE                  Geotag images from specified GPS log
166         -use MODULE                      Add features from plug-in module
167
168       Utilities
169
170         -delete_original[!]              Delete "_original" backups
171         -restore_original                Restore from "_original" backups
172
173       Other options
174
175         -@ ARGFILE                       Read command-line arguments from file
176         -k          (-pause)             Pause before terminating
177         -list[w|f|wf|g[NUM]|d|x]         List various exiftool attributes
178         -ver                             Print exiftool version number
179
180       Advanced options
181
182         -common_args                     Define common arguments
183         -config CFGFILE                  Specify configuration file name
184         -execute[NUM]                    Execute multiple commands on one line
185         -srcfile FMT                     Set different source file name
186         -stay_open FLAG                  Keep reading -@ argfile even after EOF
187
188   Option Details
189       Tag operations
190
191       -TAG Extract information for specified tag (ie. "-CreateDate").  A tag
192            name is the handle by which a piece of information is referenced.
193            See Image::ExifTool::TagNames for documentation on available tag
194            names.  A tag name may include leading group names separated by
195            colons (ie. "-EXIF:CreateDate", or "-Doc1:XMP:Creator"), and each
196            group name may be prefixed by a digit to specify family number
197            (ie.  "-1IPTC:City").  Use the -listg option to list available
198            group names by family.
199
200            A special tag name of "All" may be used to indicate all meta
201            information.  This is particularly useful when a group name is
202            specified to extract all information in a group (but beware that
203            unless the -a option is also used, some tags in the group may be
204            suppressed by same-named tags in other groups).  The wildcard
205            characters "?" and "*" may be used in a tag name to match any
206            single character and zero or more characters respectively.  These
207            may not be used in a group name, with the exception that a group
208            name of "*" (or "All") may be used to extract all instances of a
209            tag (as if -a was used).  Note that arguments containing wildcards
210            must be quoted on the command line of most systems to prevent
211            shell globbing, and wildcards may not be used when
212            writing/deleting tags.
213
214            A "#" may be appended to the tag name to disable the print
215            conversion on a per-tag basis (see the -n option).  This may also
216            be used when writing or copying tags.
217
218            If no tags are specified, all available information is extracted
219            (as if "-All" had been specified).
220
221            Note:  Descriptions, not tag names, are shown by default when
222            extracting information.  Use the -s option to see the tag names
223            instead.
224
225       --TAG
226            Exclude specified tag from extracted information.  Same as the -x
227            option.  May also be used following a -tagsFromFile option to
228            exclude tags from being copied, or to exclude groups from being
229            deleted when deleting all information (ie. "-all= --exif:all"
230            deletes all but EXIF information).  But note that this will not
231            exclude individual tags from a group delete.  Instead, the tags
232            must be recovered using the -tagsFromFile option (ie.  "-all=
233            -tagsfromfile @ -artist").  Wildcards are permitted as described
234            above for -TAG.
235
236       -TAG[+-]=[VALUE]
237            Write a new value for the specified tag (ie. "-comment=wow"), or
238            delete the tag if no VALUE is given (ie. "-comment="). "+=" and
239            "-=" are used to add or remove existing entries from a list, or to
240            shift date/time values (see Image::ExifTool::Shift.pl for
241            details).  "+=" may also be used to increment numerical values,
242            and "-=" may be used to conditionally delete or replace a tag (see
243            "WRITING EXAMPLES" for examples).
244
245            TAG may contain a leading family 0 or 1 group name separated by a
246            colon.  If no group name is specified, the tag is created in the
247            preferred group, and updated in any other location where a same-
248            named tag already exists.  The preferred group is the first group
249            in the following list where TAG is valid: 1) EXIF, 2) IPTC, 3)
250            XMP.
251
252            The special "All" tag may be used in this syntax only if a VALUE
253            is NOT given.  This causes all meta information to be deleted (or
254            all information in a group if "-GROUP:All=" is used).  Note that
255            not all groups are deletable.  Use the -listd option for a
256            complete list of deletable groups.  Also, within an image some
257            groups may be contained within others, and these groups are
258            removed if the containing group is deleted:
259
260              JPEG Image:
261              - Deleting EXIF or IFD0 also deletes ExifIFD, GlobParamIFD,
262                GPS, IFD1, InteropIFD, MakerNotes, PrintIM and SubIFD.
263              - Deleting ExifIFD also deletes InteropIFD and MakerNotes.
264              - Deleting Photoshop also deletes IPTC.
265
266              TIFF Image:
267              - Deleting EXIF only removes ExifIFD which also deletes
268                InteropIFD and MakerNotes.
269
270            Note:  MakerNotes tags may be edited, but not created or deleted
271            individually.  This avoids many potential problems including the
272            inevitable compatibility problems with OEM software which may be
273            very inflexible about the information it expects to find in the
274            maker notes.
275
276            Special feature:  Integer values may be specified in hexadecimal
277            with a leading "0x", and simple rational values may be specified
278            as fractions.
279
280       -TAG<=DATFILE or -TAG<=FMT
281            Set the value of a tag from the contents of file DATFILE.  The
282            file name may also be given by a FMT string where %d, %f and %e
283            represent the directory, file name and extension of the original
284            FILE (see the -w option for more details).  Note that quotes are
285            required around this argument to prevent shell redirection since
286            it contains a "<" symbol.  "+<=" or "-<=" may also be used to add
287            or delete specific list entries, or to shift date/time values.
288
289       -tagsFromFile SRCFILE or FMT
290            Copy tag values from SRCFILE to FILE.  Tag names on the command
291            line after this option specify the tags to be copied, or excluded
292            from the copy.  If no tags are specified, then all possible tags
293            (see note 1 below) from the source file are copied (the same as
294            specifying "-all").  More than one -tagsFromFile option may be
295            used to copy tags from multiple files.
296
297            By default, this option will commute information between same-
298            named tags in different groups and write each tag to the preferred
299            group.  This allows some information to be automatically
300            translated when copying between images of different formats.
301            However, if a group name is specified for a tag then the
302            information is written to the original group (unless redirected to
303            another group, see below).  This works even if "All" is used as a
304            group name, so "-All:All" is used to specify that all information
305            be copied to the same group in the destination file.
306
307            SRCFILE may be the same as FILE to move information around within
308            a file.  In this case, "@" may be used to represent the source
309            file (ie.  "-tagsFromFile @"), permitting this feature to be used
310            for batch processing multiple files (see note 4 below).  Specified
311            tags are then copied from each file in turn as it is rewritten.
312            For advanced batch use, the source file name may also be specified
313            using a FMT string in which %d, %f and %e represent the directory,
314            file name and extension of FILE.  See -w option for FMT string
315            examples.
316
317            A powerful redirection feature allows a destination tag to be
318            specified for each extracted tag.  With this feature, information
319            may be written to a tag with a different name or group.  This is
320            done using "'-SRCTAG>DSTTAG'" or "'-DSTTAG<SRCTAG'" on the command
321            line after -tagsFromFile, and causes the value of SRCTAG to be
322            copied from SRCFILE and written to DSTTAG in FILE.  Note that this
323            argument must be quoted to prevent shell redirection, and there is
324            no "=" sign as when assigning new values.  Both source and
325            destination tags may be prefixed by a group name, and "All" or "*"
326            may be used as a tag or group name.  If no destination group is
327            specified, the information is written to the preferred group.  As
328            a convenience, "-tagsFromFile @" is assumed for any redirected
329            tags which are specified without a prior -tagsFromFile option.
330            Copied tags may also be added or deleted from a list with
331            arguments of the form "'-SRCTAG+>DSTTAG'" or "'-SRCTAG->DSTTAG'".
332
333            An extension of the redirection feature allows strings involving
334            tag names to be used on the right hand side of the "<" symbol with
335            the syntax "'-DSTTAG<STR'", where tag names in STR are prefixed
336            with a "$" symbol.  See the -p option for more details about this
337            syntax.  Strings starting with a "=" sign must insert a single
338            space after the "<" to avoid confusion with the "<=" syntax which
339            would otherwise attempt to set the tag value from the contents of
340            a file.  A single space at the start of the string is removed if
341            it exists, but all other whitespace is preserved.
342
343            See "COPYING EXAMPLES" for examples using -tagsFromFile.
344
345            Notes:
346
347            1) Some tags (generally tags which may affect the appearance of
348            the image) are considered "unsafe" to write, and are only copied
349            if specified explicitly.  See the tag name documentation for more
350            details about "unsafe" tags.
351
352            2) Be aware of the difference between excluding a tag from being
353            copied (--TAG), and deleting a tag (-TAG=).  Excluding a tag
354            prevents it from being copied to the destination image, but
355            deleting will remove a pre-existing tag from the image.
356
357            3) The maker note information is copied as a block, so it isn't
358            affected like other information by subsequent tag assignments on
359            the command line.  Also, since the PreviewImage referenced from
360            the maker notes may be rather large, it is not copied, and must be
361            transferred separately if desired.
362
363            4) When performing complex batch processing, it is important to
364            note that the order of operations is different for tags copied in
365            batch mode.  In general, tags are copied from batch-mode files
366            after all other command-line arguments have been applied.  For
367            example, the following two commands are not equivalent:
368
369                # (not batch mode):  Sets xmp:title to 'NEW'
370                exiftool -tagsfromfile a.jpg -xmp:title -xmp:title=NEW a.jpg
371
372                # (batch mode):  Preserves original title if it exists
373                exiftool -tagsfromfile @ -xmp:title -xmp:title=NEW a.jpg
374
375            5) The normal behaviour of copied tags differs subtly from that of
376            assigned tags for list-type tags.  When copying to a list, each
377            copied tag overrides any previous operations on the list.  While
378            this avoids duplicate list items when copying groups of tags from
379            a file containing redundant information, it also prevents values
380            of different tags from being copied into the same list when this
381            is the intent.  So a -addTagsFromFile option is provided which
382            allows copying of multiple tags into the same list.  ie)
383
384                exiftool -addtagsfromfile @ '-subject<make' '-subject<model' ...
385
386            Other than this difference, the -tagsFromFile and -addTagsFromFile
387            options are equivalent.
388
389            6) The -a option (allow duplicate tags) is always in effect when
390            reading tags from SRCFILE.
391
392            7) The -struct option is in effect by default when copying tags,
393            but this may be disabled with --struct on the command line.  See
394            the -struct option for details.
395
396       -x TAG (-exclude)
397            Exclude the specified tag.  There may be multiple -x options.
398            This has the same effect as --TAG on the command line.  May also
399            be used following a -tagsFromFile option to exclude tags from
400            being copied.
401
402       Input-output text formatting
403
404       -args (-argFormat)
405            Output information in the form of exiftool arguments, suitable for
406            use with the -@ option when writing.  May be combined with the -G
407            option to include group names.  This feature may be used to
408            effectively copy tags between images, but allows the metadata to
409            be altered by editing the intermediate file ("out.args" in this
410            example):
411
412                exiftool -args -G1 --filename --directory src.jpg > out.args
413                exiftool -@ out.args dst.jpg
414
415            Note:  Be careful when copying information with this technique
416            since it is easy to write tags which are normally considered
417            "unsafe".  For instance, the FileName and Directory tags are
418            excluded in the example above to avoid renaming and moving the
419            destination file.  Also note that the second command above will
420            produce warning messages for any tags which are not writable.
421
422       -b (-binary)
423            Output requested data in binary format without tag names or
424            descriptions.  This option is mainly used for extracting embedded
425            images or other binary data, but it may also be useful for some
426            text strings since control characters (such as newlines) are not
427            replaced by '.' as they are in the default output.  List items are
428            separated by a newline when extracted with the -b option.  May be
429            combined with "-X" to extract binary data in XML format.
430
431       -c FMT (-coordFormat)
432            Set the print format for GPS coordinates.  FMT uses the same
433            syntax as the "printf" format string.  The specifiers correspond
434            to degrees, minutes and seconds in that order, but minutes and
435            seconds are optional.  For example, the following table gives the
436            output for the same coordinate using various formats:
437
438                        FMT                  Output
439                -------------------    ------------------
440                "%d deg %d' %.2f"\"    54 deg 59' 22.80"  (default for reading)
441                "%d %d %.8f"           54 59 22.80000000  (default for copying)
442                "%d deg %.4f min"      54 deg 59.3800 min
443                "%.6f degrees"         54.989667 degrees
444
445            Notes:
446
447            1) To avoid loss of precision, the default coordinate format is
448            different when copying tags using the -tagsFromFile option.
449
450            2) This print formatting may be disabled with the -n option to
451            extract coordinates as signed decimal degrees.
452
453       -charset [[TYPE=]CHARSET]
454            If TYPE is "ExifTool" or not specified, this option sets the
455            ExifTool character encoding for output tag values when reading and
456            input values when writing.  The default ExifTool encoding is
457            "UTF8".  If no CHARSET is given, a list of available character
458            sets is returned.  Valid CHARSET values are:
459
460                CHARSET     Alias(es)        Description
461                ----------  ---------------  ----------------------------------
462                UTF8        cp65001, UTF-8   UTF-8 characters (default)
463                Latin       cp1252, Latin1   Windows Latin1 (West European)
464                Latin2      cp1250           Windows Latin2 (Central European)
465                Cyrillic    cp1251, Russian  Windows Cyrillic
466                Greek       cp1253           Windows Greek
467                Turkish     cp1254           Windows Turkish
468                Hebrew      cp1255           Windows Hebrew
469                Arabic      cp1256           Windows Arabic
470                Baltic      cp1257           Windows Baltic
471                Vietnam     cp1258           Windows Vietnamese
472                Thai        cp874            Windows Thai
473                MacRoman    cp10000, Roman   Macintosh Roman
474                MacLatin2   cp10029          Macintosh Latin2 (Central Europe)
475                MacCyrillic cp10007          Macintosh Cyrillic
476                MacGreek    cp10006          Macintosh Greek
477                MacTurkish  cp10081          Macintosh Turkish
478                MacRomanian cp10010          Macintosh Romanian
479                MacIceland  cp10079          Macintosh Icelandic
480                MacCroatian cp10082          Macintosh Croatian
481
482            Other values of TYPE listed below are used to specify the internal
483            encoding of various meta information formats.
484
485                TYPE       Description                                  Default
486                ---------  -------------------------------------------  -------
487                ID3        Internal encoding of ID3v1 information       Latin
488                IPTC       Internal IPTC encoding to assume when        Latin
489                            IPTC:CodedCharacterSet is not defined
490                Photoshop  Internal encoding of Photoshop IRB strings   Latin
491
492            See <http://owl.phy.queensu.ca/~phil/exiftool/faq.html#Q10> for
493            more information about coded character sets.
494
495       -csv[=CSVFILE]
496            Export information in as a CSV file, or import information if
497            CSVFILE is specified.  The first row of the CSVFILE must be the
498            ExifTool tag names (with optional group names) for each column of
499            the file.  A special "SourceFile" column specifies the files
500            associated with each row of information (a SourceFile of "*" may
501            be used to apply the information to all target images). The
502            following examples demonstrate basic use of this option:
503
504                # generate CSV file with common tags from all images in a directory
505                exiftool -common -csv dir > out.csv
506
507                # update metadata for all images in a directory from CSV file
508                exiftool -csv=a.csv dir
509
510            Empty values are ignored when importing.  To force a tag to be
511            deleted, use the -f option and set the value to "-" in the CSV
512            file.  May be combined with the -g or -G option to add group names
513            to the tags.  Note that list-type tags are stored as simple
514            strings in a CSV file, but the -sep option may be used to split
515            them back into separate items when importing.
516
517            Special feature:  -csv+=CSVFILE may be used to add items to
518            existing lists. This affects only list-type tags.  Also applies to
519            the -j option.
520
521       -d FMT (-dateFormat)
522            Set the format for date/time tag values.  The specifics of the FMT
523            syntax are system dependent -- consult the "strftime" man page on
524            your system for details.  The default format is equivalent to
525            "%Y:%m:%d %H:%M:%S".  This option has no effect on date-only or
526            time-only tags and ignores timezone information if present.  Only
527            one -d option may be used per command.  The inverse operation (ie.
528            un-formatting a date/time value) is currently not applied when
529            writing a date/time tag.
530
531       -D (-decimal)
532            Show tag ID number in decimal when extracting information.
533
534       -E, -ex (-escapeHTML, -escapeXML)
535            Escape characters in output values for HTML (-E) or XML (-ex).
536            For HTML, all characters with Unicode code points above U+007F are
537            escaped as well as the following 5 characters: & (&amp;) ' (&#39;)
538            " (&quot;) > (&gt;) and < (&lt;).  For XML, only these 5
539            characters are escaped.  The -E option is implied with -h, and -ex
540            is implied with -X.  The inverse conversion is applied when
541            writing tags.
542
543       -f (-forcePrint)
544            Force printing of tags even if their values are not found.  This
545            option only applies when tag names are specified.  May also be
546            used to add a 'flags' attribute to the -listx output, or to allow
547            tags to be deleted with the -csv option.
548
549       -g[NUM][:NUM...] (-groupHeadings)
550            Organize output by tag group.  NUM specifies a group family
551            number, and may be 0 (general location), 1 (specific location), 2
552            (category), 3 (document number) or 4 (instance number).  Multiple
553            families may be specified by separating them with colons.  By
554            default the resulting group name is simplified by removing any
555            leading "Main:" and collapsing adjacent identical group names, but
556            this can be avoided by placing a colon before the first family
557            number (ie. -g:3:1).  If NUM is not specified, -g0 is assumed.
558            Use the -listg option to list group names for a specified family.
559
560       -G[NUM][:NUM...] (-groupNames)
561            Same as -g but print group name for each tag.
562
563       -h (-htmlFormat)
564            Use HTML table formatting for output.  Implies the -E option.  The
565            formatting options -D, -H, -g, -G, -l and -s may be used in
566            combination with -h to influence the HTML format.
567
568       -H (-hex)
569            Show tag ID number in hexadecimal when extracting information.
570
571       -htmlDump[OFFSET]
572            Generate a dynamic web page containing a hex dump of the EXIF
573            information.  This can be a very powerful tool for low-level
574            analysis of EXIF information.  The -htmlDump option is also
575            invoked if the -v and -h options are used together.  The verbose
576            level controls the maximum length of the blocks dumped.  An OFFSET
577            may be given to specify the base for displayed offsets.  If not
578            provided, the EXIF/TIFF base offset is used.  Use -htmlDump0 for
579            absolute offsets.  Currently only EXIF/TIFF and JPEG information
580            is dumped, but the -u option can be used to give a raw hex dump of
581            other file formats.
582
583       -j[=JSONFILE] (-json)
584            Use JSON (JavaScript Object Notation) formatting for console
585            output, or import JSON file if JSONFILE is specified.  This option
586            may be combined with -g to organize the output into objects by
587            group, or -G to add group names to each tag.  List-type tags with
588            multiple items are output as JSON arrays unless -sep is used.  By
589            default XMP structures are flattened into individual tags in the
590            JSON output, but the original structure may be preserved with the
591            -struct option (this also causes all list-type XMP tags to be
592            output as JSON arrays, otherwise single-item lists would be output
593            as simple strings).  The -a option is implied if the -g or -G
594            options are used, otherwise it is ignored and duplicate tags are
595            suppressed.  The -b, -L and -charset options have no effect on the
596            JSON output.
597
598            If JSONFILE is specified, the file is imported and the tag
599            definitions from the file are used to set tag values on a per-file
600            basis.  The special "SourceFile" entry in each JSON object
601            associates the information with a specific target file (see the
602            -csv option for details).  The imported JSON file must have the
603            same format as the exported JSON files with the exception that the
604            -g option is not compatible with the import file format (use -G
605            instead).  Additionally, tag names in the input JSON file may be
606            suffixed with a "#" to disable print conversion.
607
608       -l (-long)
609            Use long 2-line Canon-style output format.  Adds a description and
610            unconverted value to the XML output when -X is used.
611
612       -L (-latin)
613            Use Windows Latin1 encoding (cp1252) for output tag values instead
614            of the default UTF-8.  When writing, -L specifies that input text
615            values are Latin1 instead of UTF-8.  Equivalent to "-charset
616            latin".
617
618       -lang [LANG]
619            Set current language for tag descriptions and converted values.
620            LANG is "de", "fr", "ja", etc.  Use -lang with no other arguments
621            to get a list of available languages.  The default language is
622            "en" if -lang is not specified.  Note that tag/group names are
623            always English, independent of the -lang setting, and translation
624            of warning/error messages has not yet been implemented.
625
626            By default, ExifTool uses UTF-8 encoding for special characters,
627            but the the -L or -charset option may be used to invoke other
628            encodings.
629
630            Currently, the language support is not complete, but users are
631            welcome to help improve this by submitting their own translations.
632            To submit a set of translations, first use the -listx option and
633            redirect the output to a file to generate an XML tag database,
634            then add entries for other languages, zip this file, and email it
635            to phil at owl.phy.queensu.ca for inclusion in ExifTool.
636
637       -n (--printConv)
638            Read and write values as numbers instead of words.  By default,
639            extracted values are converted to a more human-readable format for
640            printing, but the -n option disables this print conversion for all
641            tags.  For example:
642
643                > exiftool -Orientation -S a.jpg
644                Orientation: Rotate 90 CW
645                > exiftool -Orientation -S -n a.jpg
646                Orientation: 6
647
648            The print conversion may also be disabled on a per-tag basis by
649            suffixing the tag name with a "#" character:
650
651                > exiftool -Orientation# -Orientation -S a.jpg
652                Orientation: 6
653                Orientation: Rotate 90 CW
654
655            These techniques may also be used to disable the inverse print
656            conversion when writing.  For example, the following commands all
657            have the same effect:
658
659                > exiftool -Orientation='Rotate 90 CW' a.jpg
660                > exiftool -Orientation=6 -n a.jpg
661                > exiftool -Orientation#=6 a.jpg
662
663       -p FMTFILE or STR (-printFormat)
664            Print output in the format specified by the given file or string
665            (and ignore other format options).  Tag names in the format file
666            or string begin with a "$" symbol and may contain a leading group
667            name and/or a trailing "#".  Case is not significant.  Braces "{}"
668            may be used around the tag name to separate it from subsequent
669            text.  Use $$ to represent a "$" symbol, and $/ for a newline.
670            Multiple -p options may be used, each contributing a line of text
671            to the output.  Lines beginning with "#[HEAD]" and "#[TAIL]" are
672            output only for the first and last processed files respectively.
673            Lines beginning with "#[BODY]" and lines not beginning with "#"
674            are output for each processed file.  Other lines beginning with
675            "#" are ignored.  For example, this format file:
676
677                # this is a comment line
678                #[HEAD]# Generated by ExifTool $exifToolVersion
679                File: $FileName - $DateTimeOriginal
680                (f/$Aperture, ${ShutterSpeed}s, ISO $EXIF:ISO)
681                #[TAIL]# end
682
683            with this command:
684
685                exiftool -p test.fmt a.jpg b.jpg
686
687            produces output like this:
688
689                # Generated by ExifTool 8.10
690                File: a.jpg - 2003:10:31 15:44:19
691                (f/5.6, 1/60s, ISO 100)
692                File: b.jpg - 2006:05:23 11:57:38
693                (f/8.0, 1/13s, ISO 100)
694                # end
695
696            When -ee (-extractEmbedded) is combined with -p, embedded
697            documents are effectively processed as separate input files.
698
699            If a specified tag does not exist, a minor warning is issued and
700            the line with the missing tag is not printed.  However, the -f
701            option may be used to set the value of missing tags to '-', or the
702            -m option may be used to ignore minor warnings and leave the
703            missing values empty.
704
705       -s[NUM] (-short)
706            Short output format.  Prints tag names instead of descriptions.
707            Add NUM or up to 3 -s options for even shorter formats:
708
709                -s1 or -s        - print tag names instead of descriptions
710                -s2 or -s -s     - no extra spaces to column-align values
711                -s3 or -s -s -s  - print values only
712
713            Also effective when combined with -t, -h, -X or -listx options.
714
715       -S (-veryShort)
716            Very short format.  The same as -s2 (or two -s options).  Tag
717            names are printed instead of descriptions, and no extra spaces are
718            added to column-align values.
719
720       -sep STR (-separator)
721            Specify separator string for items in list-type tags.  When
722            reading, the default is ", ".  When writing, this option causes
723            values assigned to list-type tags to be split into individual
724            items at each substring matching specified separator.  Space
725            characters in the separator string match zero or more whitespace
726            characters.
727
728       -struct, --struct
729            Output structured XMP information instead of flattening to
730            individual tags.  This option works well when combined with the
731            XML (-X) and JSON (-j) output formats.  For other output formats,
732            the structures are serialized into the same format as when writing
733            structured information (see
734            <http://owl.phy.queensu.ca/~phil/exiftool/struct.html> for
735            details).  This option is enabled by default when copying tags to
736            allow the preservation of complex structures, but this feature may
737            be disabled with --struct. These options have no effect when
738            assigning new values since both flattened tags and structured tags
739            may always be written.
740
741       -t (-tab)
742            Output a tab-delimited list of description/values (useful for
743            database import).  May be combined with -s to print tag names
744            instead of descriptions, or -S to print tag values only, tab-
745            delimited on a single line.  The -t option may also be used to add
746            tag table information to the -X option output.
747
748       -T (-table)
749            Output tag values in table form.  Equivalent to -t -S -q -f.
750
751       -v[NUM] (-verbose)
752            Print verbose messages.  NUM specifies the level of verbosity in
753            the range 0-5, with higher numbers being more verbose.  If NUM is
754            not given, then each -v option increases the level of verbosity by
755            1.  With any level greater than 0, most other options are ignored
756            and normal console output is suppressed unless specific tags are
757            extracted.  Using -v0 causes the console output buffer to be
758            flushed after each line (which may be useful to avoid delays when
759            piping exiftool output), and prints the name of each processed
760            file when writing.
761
762       -w[!] EXT or FMT (-textOut)
763            Write console output to files with names ending in EXT, one for
764            each source file.  The output file name is obtained by replacing
765            the source file extension (including the '.') with the specified
766            extension (and a '.' is added to the start of EXT if it doesn't
767            already contain one).  Alternatively, a FMT string may be used to
768            give more control over the output file name and directory.  In the
769            format string, %d, %f and %e represent the directory, filename and
770            extension of the source file, and %c represents a copy number
771            which is automatically incremented if the file already exists.  %d
772            includes the trailing '/' if necessary, but %e does not include
773            the leading '.'.  For example:
774
775                -w %d%f.txt       # same effect as "-w txt"
776                -w dir/%f_%e.out  # write files to "dir" as "FILE_EXT.out"
777                -w dir2/%d%f.txt  # write to "dir2", keeping dir structure
778                -w a%c.txt        # write to "a.txt" or "a1.txt" or "a2.txt"...
779
780            Existing files will not be overwritten unless an exclamation point
781            is added to the option name (ie. -w! or -textOut!).  Output
782            directories are created automatically if necessary.
783
784            Notes:
785
786            1) In a Windows BAT file the "%" character is represented by "%%",
787            so an argument like "%d%f.txt" is written as "%%d%%f.txt".
788
789            2) It is not possible to specify a simple filename as an argument
790            for -w.  Instead, this simple case is accomplished using shell
791            redirection:
792
793                exiftool FILE > out.txt
794
795            Advanced features:  A substring of the original file name,
796            directory or extension may be taken by specifying a field width
797            immediately following the '%' character.  If the width is
798            negative, the substring is taken from the end.  The substring
799            position (characters to ignore at the start or end of the string)
800            may be given by a second optional value after a decimal point.
801            For example:
802
803                Input File Name     Format Specifier    Output File Name
804                ----------------    ----------------    ----------------
805                Picture-123.jpg     %7f.txt             Picture.txt
806                Picture-123.jpg     %-.4f.out           Picture.out
807                Picture-123.jpg     %7f.%-3f            Picture.123
808                Picture-123a.jpg    Meta%-3.1f.txt      Meta123.txt
809
810            For %c, these modifiers have a different effects.  If a field
811            width is given, the copy number is padded with zeros to the
812            specified width.  A leading '-' adds a dash before the copy
813            number, and a '+' adds an underline.  By default, a copy number of
814            zero is omitted, but this can be changed by adding a decimal point
815            to the modifier.  For example:
816
817                -w A%-cZ.txt      # AZ.txt, A-1Z.txt, A-2Z.txt ...
818                -w B%5c.txt       # B.txt, B00001.txt, B00002.txt ...
819                -w C%.c.txt       # C0.txt, C1.txt, C2.txt ...
820                -w D%-.c.txt      # D-0.txt, D-1.txt, D-2.txt ...
821                -w E%-.4c.txt     # E-0000.txt, E-0001.txt, E-0002.txt ...
822                -w F%-.4nc.txt    # F-0001.txt, F-0002.txt, F-0003.txt ...
823                -w G%+c.txt       # G.txt, G_1.txt G_2.txt ...
824                -w H%-lc.txt      # H.txt, H-b.txt, H-c.txt ...
825
826            A special feature allows the copy number to be incremented for
827            each processed file by using %C (upper case) instead of %c.  This
828            allows a sequential number to be added to output file names, even
829            if the names are different.  For %C, the number before the decimal
830            place gives the starting index, and the number after the decimal
831            place gives the field width.  The following examples show the
832            output filenames when used with the command "exiftool rose.jpg
833            star.jpg jet.jpg ...":
834
835                -w %C%f.txt       # 0rose.txt, 1star.txt, 2jet.txt
836                -w %f-%10C.txt    # rose-10.txt, star-11.txt, jet-12.txt
837                -w %.3C-%f.txt    # 000-rose.txt, 001-star.txt, 002-jet.txt
838                -w %57.4C%f.txt   # 0057rose.txt, 0058star.txt, 0059jet.txt
839
840            All format codes may be modified by 'l' or 'u' to specify lower or
841            upper case respectively (ie. %le for a lower case file extension).
842            When used to modify %c or %C, the numbers are changed to an
843            alphabetical base (see example H above).  Also, %c may be modified
844            by 'n' to count using natural numbers starting from 1, instead of
845            0 (see example F).
846
847            This same FMT syntax is used with the -o and -tagsFromFile
848            options, although %c is only valid for output file names.
849
850       -X (-xmlFormat)
851            Use RDF/XML formatting for console output.  Implies the -a option,
852            so duplicate tags are extracted.  The formatting options -b, -D,
853            -H, -l, -s, -sep, -struct and -t may be used in combination with
854            -X to affect the output, but note that the tag ID (-D, -H and -t),
855            binary data (-b) and structured output (-struct) options are not
856            effective for the short output (-s).  Another restriction of -s is
857            that only one tag with a given group and name may appear in the
858            output.  Note that the tag ID options (-D, -H and -t) will produce
859            non-standard RDF/XML unless the -l option is also used.  By
860            default, list-type tags with multiple values are formatted as an
861            RDF Bag, but they are combined into a single string when -s or
862            -sep is used.  Using -L changes the XML encoding from "UTF-8" to
863            "windows-1252".  Other -charset settings change the encoding only
864            if there is a corresponding standard XML character set.  The -b
865            option causes binary data values to be written, encoded in base64
866            if necessary.  The -t option adds tag table information to the
867            output (table "name", decimal tag "id", and "index" for cases
868            where multiple conditional tags exist with the same ID).
869
870       Processing control
871
872       -a, --a (-duplicates, --duplicates)
873            Allow (-a) or suppress (--a) duplicate tag names to be extracted.
874            By default, duplicate tags are suppressed unless the -ee or -X
875            options are used or the Duplicates option is enabled in the
876            configuration file.
877
878       -e (--composite)
879            Extract existing tags only -- don't calculate composite tags.
880
881       -ee (-extractEmbedded)
882            Extract information from embedded documents in EPS and PDF files,
883            embedded MPF images in JPEG and MPO files, streaming metadata in
884            AVCHD videos, and the resource fork of Mac OS files.  Implies the
885            -a option.  Use -g3 or -G3 to identify the originating document
886            for extracted information.  Embedded documents containing sub-
887            documents are indicated with dashes in the family 3 group name.
888            (ie. "Doc2-3" is the 3rd sub-document of the 2nd embedded
889            document.)
890
891       -ext EXT, --ext EXT (-extension)
892            Process only files with (-ext) or without (--ext) a specified
893            extension.  There may be multiple -ext and --ext options.
894            Extensions may begin with a leading '.', and case is not
895            significant.  For example:
896
897                exiftool -ext .JPG DIR            # process only JPG files
898                exiftool --ext crw --ext dng DIR  # process all but CRW and DNG
899                exiftool --ext . DIR              # ignore if no extension
900
901            Using this option has two main advantages over specifying "*.EXT"
902            on the command line:  1) It applies to files in subdirectories
903            when combined with the -r option.  2) The -ext option is case-
904            insensitive, which is useful when processing files on case-
905            sensitive filesystems.
906
907       -F[OFFSET] (-fixBase)
908            Fix the base for maker notes offsets.  A common problem with some
909            image editors is that offsets in the maker notes are not adjusted
910            properly when the file is modified.  This may cause the wrong
911            values to be extracted for some maker note entries when reading
912            the edited file.  This option allows an integer OFFSET to be
913            specified for adjusting the maker notes base offset.  If no OFFSET
914            is given, ExifTool takes its best guess at the correct base.  Note
915            that exiftool will automatically fix the offsets for images which
916            store original offset information (ie. newer Canon models).
917            Offsets are fixed permanently if -F is used when writing EXIF to
918            an image. ie)
919
920                exiftool -F -exif:resolutionunit=inches image.jpg
921
922       -fast[NUM]
923            Increase speed of extracting information from JPEG images.  With
924            this option, ExifTool will not scan to the end of a JPEG image to
925            check for an AFCP or PreviewImage trailer, or past the first
926            comment in GIF images or the audio/video data in WAV/AVI files to
927            search for additional metadata.  These speed benefits are small
928            when reading images directly from disk, but can be substantial if
929            piping images through a network connection.  For more substantial
930            speed benefits, -fast2 also causes exiftool to avoid extracting
931            any EXIF MakerNote information.
932
933       -fileOrder [-]TAG
934            Set file processing order according to the sorted value of the
935            specified TAG.  For example, to process files in order of date:
936
937                exiftool -fileOrder DateTimeOriginal DIR
938
939            Additional -fileOrder options may be added as secondary sort keys.
940            Floating point values are sorted numerically, and all other values
941            are sorted alphabetically.  The sort order may be reversed by
942            prefixing the tag name with a "-" (ie. "-fileOrder -createdate").
943            A "#" may be appended to the tag name to disable print conversion
944            for the sorted values.  Note that this option has a large
945            performance impact since it involves an additional processing pass
946            of each file.
947
948       -i DIR (-ignore)
949            Ignore specified directory name.  Use multiple -i options to
950            ignore more than one directory name.  A special DIR value of
951            "SYMLINKS" (case sensitive) may be specified to ignore symbolic
952            links when the -r option is used.
953
954       -if EXPR
955            Specify a condition to be evaluated before processing each FILE.
956            EXPR is a Perl-like expression containing tag names prefixed by
957            "$" symbols.  It is evaluated with the tags from each FILE in
958            turn, and the file is processed only if the expression returns
959            true.  Unlike Perl variable names, tag names are not case
960            sensitive and may contain a hyphen.  As well, tag names may have a
961            leading group name separated by a colon, and/or a trailing "#"
962            character to disable print conversion.  When multiple -if options
963            are used, all conditions must be satisfied to process the file.
964            Returns an exit status of 1 if all files fail the condition.
965            Below are a few examples:
966
967                # extract shutterspeed from all Canon images in a directory
968                exiftool -shutterspeed -if '$make eq "Canon"' dir
969
970                # add one hour to all images created on or after Apr. 2, 2006
971                exiftool -alldates+=1 -if '$CreateDate ge "2006:04:02"' dir
972
973                # set EXIF ISO value if possible, unless it is set already
974                exiftool '-exif:iso<iso' -if 'not $exif:iso' dir
975
976                # find images containing a specific keyword (case insensitive)
977                exiftool -if '$keywords =~ /harvey/i' -filename dir
978
979       -m (-ignoreMinorErrors)
980            Ignore minor errors and warnings.  This enables writing to files
981            with minor errors and disables some validation checks which could
982            result in minor warnings.  Generally, minor errors/warnings
983            indicate a problem which usually won't result in loss of metadata
984            if ignored.  However, there are exceptions, so ExifTool leaves it
985            up to you to make the final decision.
986
987       -o OUTFILE or FMT (-out)
988            Set the output file or directory name when writing information.
989            (Without this option, the original file is renamed to
990            "FILE_original" and output is written to FILE.)  OUTFILE may be
991            "-" to write to stdout.  The output file name may also be
992            specified using a FMT string in which %d, %f and %e represent the
993            directory, file name and extension of FILE.  Also, %c may be used
994            to add a copy number.  See the -w option for FMT string examples.
995
996            The output file is taken to be a directory name if it already
997            exists as a directory or if the name ends with '/'.  Output
998            directories are created if necessary.  Existing files will not be
999            overwritten.  Combining the -overwrite_original option with -o
1000            causes the original source file to be erased after the output file
1001            is successfully written.
1002
1003            A special feature of this option allows the creation of certain
1004            types of files from scratch.  Currently, this can be done with
1005            XMP, ICC/ICM, MIE, VRD and EXIF files by specifying the
1006            appropriate extension for OUTFILE.  The file is then created from
1007            a combination of information in FILE (as if the -tagsFromFile
1008            option was used), and tag values assigned on the command line.  If
1009            no FILE is specified, the output file may be created from scratch
1010            using only tags assigned on the command line.
1011
1012       -overwrite_original
1013            Overwrite the original FILE (instead of preserving it by adding
1014            "_original" to the file name) when writing information to an
1015            image.  Caution: This option should only be used if you already
1016            have separate backup copies of your image files.  The overwrite is
1017            implemented by renaming a temporary file to replace the original.
1018            This deletes the original file and replaces it with the edited
1019            version in a single operation.  When combined with -o, this option
1020            causes the original file to be deleted if the output file was
1021            successfully written.
1022
1023       -overwrite_original_in_place
1024            Similar to -overwrite_original except that an extra step is added
1025            to allow the original file attributes to be preserved.  For
1026            example, on a Mac this causes the original file creation date,
1027            ownership, type, creator, label color, icon and hard links to the
1028            file to be preserved.  This is implemented by opening the original
1029            file in update mode and replacing its data with a copy of a
1030            temporary file before deleting the temporary.  The extra step
1031            results in slower performance, so the -overwrite_original option
1032            should be used instead unless necessary.
1033
1034       -P (-preserve)
1035            Preserve the filesystem modification date/time of the original
1036            file ("FileModifyDate") when writing.  Note that some filesystems
1037            (ie. Mac and Windows) store a creation date which is not preserved
1038            by this option.  For these systems, the
1039            -overwrite_original_in_place option may be used to preserve the
1040            creation date.
1041
1042       -password PASSWD
1043            Specify password to allow processing of password-protected PDF
1044            documents.  If a password is required but not given, a warning is
1045            issued and the document is not processed.  Ignored if a password
1046            is not required.
1047
1048       -q (-quiet)
1049            Quiet processing.  One -q suppresses normal informational
1050            messages, and a second -q suppresses warnings as well.  Error
1051            messages can not be suppressed, although minor errors may be
1052            downgraded to warnings with the -m option.
1053
1054       -r (-recurse)
1055            Recursively process files in subdirectories.  Only meaningful if
1056            FILE is a directory name.  By default, exiftool will also follow
1057            symbolic links to directories if supported by the system, but this
1058            may be disabled with "-i SYMLINKS" (see the -i option for
1059            details).
1060
1061       -scanForXMP
1062            Scan all files (even unsupported formats) for XMP information
1063            unless found already.  When combined with the -fast option, only
1064            unsupported file types are scanned.  Warning: It can be time
1065            consuming to scan large files.
1066
1067       -u (-unknown)
1068            Extract values of unknown tags.  Add another -u to also extract
1069            unknown information from binary data blocks.  This option applies
1070            to tags with numerical tag ID's, and causes tag names like
1071            "Exif_0xc5d9" to be generated for unknown information.  It has no
1072            effect on information types which have human-readable tag ID's
1073            (such as XMP), since unknown tags are extracted automatically from
1074            these formats.
1075
1076       -U (-unknown2)
1077            Extract values of unknown tags as well as unknown information from
1078            some binary data blocks.  This is the same as two -u options.
1079
1080       -z (-zip)
1081            When reading, causes information to be extracted from .gz and .bz2
1082            compressed images.  (Only one image per archive.  Requires gzip
1083            and bzip2 to be installed on the system.)  When writing, causes
1084            compressed information to be written if supported by the image
1085            format.  (ie. The PNG format supports compressed text.)
1086
1087       Special features
1088
1089       -geotag TRKFILE
1090            Geotag images from the specified GPS track log file.  Using the
1091            -geotag option is equivalent to writing a value to the "Geotag"
1092            tag.  After the -geotag option has been specified, the value of
1093            the "Geotime" tag is written to define a date/time for the
1094            position interpolation.  If "Geotime" is not specified, the value
1095            is copied from "DateTimeOriginal".  For example, the following two
1096            commands are equivalent:
1097
1098                exiftool -geotag track.log image.jpg
1099                exiftool -geotag "-Geotime<DateTimeOriginal" image.jpg
1100
1101            When the "Geotime" value is converted to UTC, the local system
1102            timezone is assumed unless the date/time value contains a
1103            timezone.  Writing "Geotime" causes the following 8 EXIF tags to
1104            be created:  GPSLatitude, GPSLatitudeRef, GPSLongitude,
1105            GPSLongitudeRef, GPSAltitude, GPSAltitudeRef, GPSDateStamp and
1106            GPSTimeStamp.  Alternately "XMP:Geotime" may be written to create
1107            the following 5 XMP tags: GPSLatitude, GPSLongitude, GPSAltitude,
1108            GPSAltitudeRef and GPSDateTime.
1109
1110            The "Geosync" tag may be used to specify a time correction which
1111            is applied to each "Geotime" value for synchronization with GPS
1112            time.  For example, the following command compensates for image
1113            times which are 1 minute and 20 seconds behind GPS:
1114
1115                exiftool -geosync=+1:20 -geotag a.log DIR
1116
1117            "Geosync" must be set before "Geotime" (if specified) to be
1118            effective.  Advanced "Geosync" features allow a linear time drift
1119            correction and synchronization from previously geotagged images.
1120            See "geotag.html" in the full ExifTool distribution for more
1121            information.
1122
1123            Multiple -geotag options may be used to concatinate GPS track log
1124            data.  Also, a single -geotag option may be used to load multiple
1125            track log files by using wildcards in the TRKFILE name, but note
1126            that in this case TRKFILE must be quoted on most systems (with the
1127            notable exception of Windows) to prevent filename expansion.  For
1128            example:
1129
1130                exiftool -geotag "TRACKDIR/*.log" IMAGEDIR
1131
1132            Currently supported track file formats are GPX, NMEA RMC/GGA/GLL,
1133            KML, IGC, Garmin XML and TCX, and Magellan PMGNTRK.  See
1134            "GEOTAGGING EXAMPLES" for examples.  Also see "geotag.html" in the
1135            full ExifTool distribution and the Image::ExifTool Options for
1136            more details and for information about geotag configuration
1137            options.
1138
1139       -use MODULE
1140            Add features from specified plug-in MODULE.  Currently, the MWG
1141            module is the only plug-in module distributed with exiftool.  This
1142            module adds read/write support for tags as recommended by the
1143            Metadata Working Group.  To save typing, "-use MWG" is assumed if
1144            the "MWG" group is specified for any tag on the command line.  See
1145            the MWG Tags documentation for more details.
1146
1147       Utilities
1148
1149       -restore_original
1150       -delete_original[!]
1151            These utility options automate the maintenance of the "_original"
1152            files created by exiftool.  They have no effect on files without
1153            an "_original" copy.  The -restore_original option restores the
1154            specified files from their original copies by renaming the
1155            "_original" files to replace the edited versions.  For example,
1156            the following command restores the originals of all .jpeg images
1157            in directory "DIR":
1158
1159                exiftool -restore_original -ext jpg DIR
1160
1161            The -delete_original option deletes the "_original" copies of all
1162            files specified on the command line.  Without a trailing "!" this
1163            option prompts for confirmation before continuing.  For example,
1164            the following command deletes "a.jpg_original" if it exists, after
1165            asking "Are you sure?":
1166
1167                exiftool -delete_original a.jpg
1168
1169            These options may not be used with other options to read or write
1170            tag values in the same command, but may be combined with options
1171            such -ext, -if, -r, -q and -v.
1172
1173       Other options
1174
1175       -@ ARGFILE
1176            Read command-line arguments from the specified file.  The file
1177            contains one argument per line (NOT one option per line -- some
1178            options require additional arguments, and all arguments must be
1179            placed on separate lines).  Blank lines and lines beginning with
1180            "#" and are ignored.  Normal shell processing of arguments is not
1181            performed, which among other things means that arguments should
1182            not be quoted.  ARGFILE may exist relative to either the current
1183            directory or the exiftool directory unless an absolute pathname is
1184            given.
1185
1186            For example, the following ARGFILE will set the value of Copyright
1187            to "Copyright YYYY, Phil Harvey", where "YYYY" is the year of
1188            CreateDate:
1189
1190                -d
1191                %Y
1192                -copyright<Copyright $createdate, Phil Harvey
1193
1194       -k (-pause)
1195            Pause with the message "-- press any key --" or "-- press RETURN
1196            --" (depending on your system) before terminating.  This option is
1197            used to prevent the command window from closing when run as a
1198            Windows drag and drop application.
1199
1200       -list, -listw, -listf, -listr, -listwf, -listg[NUM], -listd, -listx
1201            Print a list of all valid tag names (-list), all writable tag
1202            names (-listw), all supported file extensions (-listff), all
1203            recognized file extensions (-listr), all writable file extensions
1204            (-listwf), all tag groups [in a specified family] (-listg[NUM]),
1205            all deletable tag groups (-listd), or an XML database of tag
1206            details (-listx).  The -list, -listw and -listx options may be
1207            followed by an additional argument of the form "-GROUP:All" to
1208            list all tags in a specific group, where "GROUP" is one or more
1209            family 0-2 group names (excepting EXIF IFD groups) separated by
1210            colons.  With -listg, NUM may be given to specify the group
1211            family, otherwise family 0 is assumed.  When combined with -listx,
1212            the -s option shortens the output by omitting the descriptions and
1213            values, and -f adds a 'flags' attribute.  Here are some examples:
1214
1215                -list               # list all tag names
1216                -list -EXIF:All     # list all EXIF tags
1217                -list -xmp:time:all # list all XMP tags relating to time
1218                -listw -XMP-dc:All  # list all writable XMP-dc tags
1219                -listf              # list all supported file extensions
1220                -listr              # list all recognized file extensions
1221                -listwf             # list all writable file extensions
1222                -listg1             # list all groups in family 1
1223                -listd              # list all deletable groups
1224                -listx -EXIF:All    # list database of EXIF tags in XML format
1225                -listx -XMP:All -s  # list short XML database of XMP tags
1226
1227            Note that none of the -list options require an input FILE.
1228
1229       -ver Print exiftool version number.
1230
1231       Advanced options
1232
1233       Among other things, the advanced options allow complex processing to be
1234       performed from a single command without the need for additional
1235       scripting.  This may be particularly useful for implementations such as
1236       Windows drag-and-drop applications.  These options may also be used to
1237       improve performance in multi-pass processing by reducing the overhead
1238       required to load exiftool for each invocation.
1239
1240       -common_args
1241            Specifies that all arguments following this option are common to
1242            all executed commands when -execute is used.  This and the -config
1243            option are the only options that may not be used inside a -@
1244            ARGFILE.
1245
1246       -config CFGFILE
1247            Load specified configuration file instead of the default
1248            ".ExifTool_config".  If used, this option must come before all
1249            other arguments on the command line.  The CFGFILE name may contain
1250            a directory specification (otherwise the file must exist in the
1251            current directory), or may be set to an empty string ("") to
1252            disable loading of the config file.  See the sample configuration
1253            file and "config.html" in the full ExifTool distribution for more
1254            information about the ExifTool configuration file.
1255
1256       -execute[NUM]
1257            Execute command for all arguments up to this point on the command
1258            line.  Allows multiple commands to be executed from a single
1259            command line.  NUM is an optional number that is echoed in the
1260            "{ready}" message when using the -stay_open feature.
1261
1262       -srcfile FMT
1263            Specify a different source file to be processed based on the name
1264            of the original FILE.  This may be useful in some special
1265            situations for processing related preview images or sidecar files.
1266            See the -w option for a description of the FMT syntax.  Note that
1267            file name FMT strings for all options are based on the original
1268            FILE specified from the command line, not the name of the source
1269            file specified by -srcfile.
1270
1271       -stay_open FLAG
1272            If FLAG is 1 or "True", causes exiftool keep reading from the -@
1273            ARGFILE even after reaching the end of file.  This feature allows
1274            calling applications to pre-load exiftool, thus avoiding the
1275            overhead of loading exiftool for each command.  The procedure is
1276            as follows:
1277
1278            1) Execute "exiftool -stay_open True -@ ARGFILE", where ARGFILE is
1279            the name of an existing (possibly empty) argument file or "-" to
1280            pipe arguments from the standard input.
1281
1282            2) Write exiftool command-line arguments to ARGFILE, one argument
1283            per line (see the -@ option for details).
1284
1285            3) Write "-execute\n" to ARGFILE, where "\n" represents a newline
1286            sequence.  (Note: You may need to flush your write buffers here if
1287            using buffered output.)  Exiftool will then execute the command
1288            with the arguments received up to this point, send a "{ready}"
1289            message to stdout when done (unless the -q option is used), and
1290            continue trying to read arguments for the next command from
1291            ARGFILE.  To aid in command/response synchronization, any number
1292            appended to the "-execute" option is echoed in the "{ready}"
1293            message.  For example, "-execute613" results in "{ready613}".
1294
1295            4) Repeat steps 2 and 3 for each command.
1296
1297            5) Write "-stay_open\nFalse\n" to ARGFILE when done.  This will
1298            cause exiftool to process any remaining arguments then exit
1299            normally.
1300
1301            The input ARGFILE may be changed at any time before step 5 above
1302            by writing the following lines to the currently open ARGFILE:
1303
1304                -stay_open
1305                True
1306                -@
1307                NEWARGFILE
1308
1309            This causes ARGFILE to be closed, and NEWARGFILE to be kept open.
1310            (Without the -stay_open here, exiftool would have returned to
1311            reading arguments from ARGFILE after reaching the end of
1312            NEWARGFILE.)
1313

READING EXAMPLES

1315       Note: Beware when cutting and pasting these examples into your
1316       terminal!  Some characters such as single and double quotes and hyphens
1317       may have been changed into similar-looking but functionally-different
1318       characters by the text formatter used to display this documentation.
1319       Also note that Windows users must use double quotes instead of single
1320       quotes as below around arguments containing special characters.
1321
1322       exiftool -a -u -g1 a.jpg
1323            Print all meta information in an image, including duplicate and
1324            unknown tags, sorted by group (for family 1).
1325
1326       exiftool -common dir
1327            Print common meta information for all images in "dir".
1328
1329       exiftool -T -createdate -aperture -shutterspeed -iso dir > out.txt
1330            List specified meta information in tab-delimited column form for
1331            all images in "dir" to an output text file named "out.txt".
1332
1333       exiftool -s -ImageSize -ExposureTime b.jpg
1334            Print ImageSize and ExposureTime tag names and values.
1335
1336       exiftool -l -canon c.jpg d.jpg
1337            Print standard Canon information from two image files.
1338
1339       exiftool -r -w .txt -common pictures
1340            Recursively extract common meta information from files in
1341            "pictures" directory, writing text output to ".txt" files with the
1342            same names.
1343
1344       exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg
1345            Save thumbnail image from "image.jpg" to a file called
1346            "thumbnail.jpg".
1347
1348       exiftool -b -JpgFromRaw -w _JFR.JPG -ext CRW -r .
1349            Recursively extract JPG image from all Canon CRW files in the
1350            current directory, adding "_JFR.JPG" for the name of the output
1351            JPG files.
1352
1353       exiftool -d '%r %a, %B %e, %Y' -DateTimeOriginal -S -s *.jpg
1354            Print formatted date/time for all JPG files in the current
1355            directory.
1356
1357       exiftool -IFD1:XResolution -IFD1:YResolution image.jpg
1358            Extract image resolution from EXIF IFD1 information (thumbnail
1359            image IFD).
1360
1361       exiftool '-*resolution*' image.jpg
1362            Extract all tags with names containing the word "Resolution" from
1363            an image.
1364
1365       exiftool -xmp:author:all -a image.jpg
1366            Extract all author-related XMP information from an image.
1367
1368       exiftool -xmp -b a.jpg > out.xmp
1369            Extract complete XMP data record intact from "a.jpg" and write it
1370            to "out.xmp" using the special "XMP" tag (see the Extra tags in
1371            Image::ExifTool::TagNames).
1372
1373       exiftool -p '$filename has date $dateTimeOriginal' -q -f dir
1374            Print one line of output containing the file name and
1375            DateTimeOriginal for each image in directory "dir".
1376
1377       exiftool -ee -p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts
1378            Extract all GPS positions from an AVCHD video.
1379
1380       exiftool -icc_profile -b -w icc image.jpg
1381            Save complete ICC_Profile from an image to an output file with the
1382            same name and an extension of ".icc".
1383
1384       exiftool -htmldump -w tmp/%f_%e.html t/images
1385            Generate HTML pages from a hex dump of EXIF information in all
1386            images from the "t/images" directory.  The output HTML files are
1387            written to the "tmp" directory (which is created if it didn't
1388            exist), with names of the form 'FILENAME_EXT.html'.
1389

WRITING EXAMPLES

1391       Note that quotes are necessary around arguments which contain certain
1392       special characters such as ">", "<" or any white space.  These quoting
1393       techniques are shell dependent, but the examples below will work for
1394       most Unix shells.  With the Windows cmd shell however, double quotes
1395       should be used (ie. -Comment="This is a new comment").
1396
1397       exiftool -Comment='This is a new comment' dst.jpg
1398            Write new comment to a JPG image (replaces any existing comment).
1399
1400       exiftool -comment= -o newdir *.jpg
1401            Remove comment from all JPG images in the current directory,
1402            writing the modified images to a new directory.
1403
1404       exiftool -keywords=EXIF -keywords=editor dst.jpg
1405            Replace existing keyword list with two new keywords ("EXIF" and
1406            "editor").
1407
1408       exiftool -Keywords+=word -o newfile.jpg src.jpg
1409            Copy a source image to a new file, and add a keyword ("word") to
1410            the current list of keywords.
1411
1412       exiftool -exposurecompensation+=-0.5 a.jpg
1413            Decrement the value of ExposureCompensation by 0.5 EV.  Note that
1414            += with a negative value is used for decrementing because the -=
1415            operator is used for conditional deletion (see next example).
1416
1417       exiftool -credit-=xxx dir
1418            Delete Credit information from all files in a directory where the
1419            Credit value was ("xxx").
1420
1421       exiftool -xmp:description-de='k&uuml;hl' -E dst.jpg
1422            Write alternate language for XMP:Description, using HTML character
1423            escaping to input special characters.
1424
1425       exiftool -all= dst.jpg
1426            Delete all meta information from an image.  Note: You should NOT
1427            do this to RAW images (except DNG) since proprietary RAW image
1428            formats often contain information in the makernotes that is
1429            necessary for converting the image.
1430
1431       exiftool -all= -comment='lonely' dst.jpg
1432            Delete all meta information from an image and add a comment back
1433            in.  (Note that the order is important: "-comment='lonely' -all="
1434            would also delete the new comment.)
1435
1436       exiftool -all= --jfif:all dst.jpg
1437            Delete all meta information except JFIF group from an image.
1438
1439       exiftool -Photoshop:All= dst.jpg
1440            Delete Photoshop meta information from an image (note that the
1441            Photoshop information also includes IPTC).
1442
1443       exiftool -r -XMP-crss:all= DIR
1444            Recursively delete all XMP-crss information from images in a
1445            directory.
1446
1447       exiftool '-ThumbnailImage<=thumb.jpg' dst.jpg
1448            Set the thumbnail image from specified file (Note: The quotes are
1449            neccessary to prevent shell redirection).
1450
1451       exiftool '-JpgFromRaw<=%d%f_JFR.JPG' -ext CRW -r .
1452            Recursively write JPEG images with filenames ending in "_JFR.JPG"
1453            to the JpgFromRaw tag of like-named files with extension ".CRW" in
1454            the current directory.  (This is the inverse of the "-JpgFromRaw"
1455            command of the "READING EXAMPLES" section above.)
1456
1457       exiftool -DateTimeOriginal-='0:0:0 1:30:0' dir
1458            Adjust original date/time of all images in directory "dir" by
1459            subtracting one hour and 30 minutes.  (This is equivalent to
1460            "-DateTimeOriginal-=1.5".  See Image::ExifTool::Shift.pl for
1461            details.)
1462
1463       exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg
1464            Add 3 hours to the CreateDate and ModifyDate timestamps of two
1465            images.
1466
1467       exiftool -AllDates+=1:30 -if '$make eq "Canon"' dir
1468            Shift the values of DateTimeOriginal, CreateDate and ModifyDate
1469            forward by 1 hour and 30 minutes for all Canon images in a
1470            directory.  (The AllDates tag is provided as a shortcut for these
1471            three tags, allowing them to be accessed via a single tag.)
1472
1473       exiftool -xmp:city=Kingston image1.jpg image2.nef
1474            Write a tag to the XMP group of two images.  (Without the "xmp:"
1475            this tag would get written to the IPTC group since "City" exists
1476            in both, and IPTC is preferred by default.)
1477
1478       exiftool -LightSource-='Unknown (0)' dst.tiff
1479            Delete "LightSource" tag only if it is unknown with a value of 0.
1480
1481       exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg
1482            Set "WhiteBalance" to "Tungsten" only if it was previously "Auto".
1483
1484       exiftool -comment-= -comment='new comment' a.jpg
1485            Write a new comment only if the image doesn't have one already.
1486
1487       exiftool -o %d%f.xmp dir
1488            Create XMP meta information data files for all images in "dir".
1489
1490       exiftool -o test.xmp -owner=Phil -title='XMP File'
1491            Create an XMP data file only from tags defined on the command
1492            line.
1493
1494       exiftool '-ICC_Profile<=%d%f.icc' image.jpg
1495            Write ICC_Profile to an image from a ".icc" file of the same name.
1496
1497       exiftool -hierarchicalkeywords='{keyword=one,children={keyword=B}}'
1498            Write structured XMP information.
1499
1500       exiftool -trailer:all= image.jpg
1501            Delete any trailer found after the end of image (EOI) in a JPEG
1502            file.  A number of digital cameras store a large PreviewImage
1503            after the JPEG EOI, and the file size may be reduced significantly
1504            by deleting this trailer.  See the JPEG Tags documentation for a
1505            list of recognized JPEG trailers.
1506

COPYING EXAMPLES

1508       These examples demonstrate the ability to copy tag values between
1509       files.
1510
1511       exiftool -tagsFromFile src.crw dst.jpg
1512            Copy the values of all writable tags from "src.crw" to "dst.jpg",
1513            writing the information to the preferred groups.
1514
1515       exiftool -TagsFromFile src.jpg -all:all dst.jpg
1516            Copy the values of all writable tags from "src.jpg" to "dst.jpg",
1517            preserving the original tag groups.
1518
1519       exiftool -all= -tagsfromfile src.jpg -exif:all dst.jpg
1520            Erase all meta information from "dst.jpg" image, then copy EXIF
1521            tags from "src.jpg".
1522
1523       exiftool -exif:all= -tagsfromfile @ -all:all -unsafe bad.jpg
1524            Rebuild all EXIF meta information from scratch in an image.  This
1525            technique can be used in JPEG images to repair corrupted EXIF
1526            information which otherwise could not be written due to errors.
1527            The "Unsafe" tag is a shortcut for unsafe EXIF tags in JPEG images
1528            which are not normally copied.  See the tag name documentation for
1529            more details about unsafe tags.
1530
1531       exiftool -Tagsfromfile a.jpg out.xmp
1532            Copy meta information from "a.jpg" to an XMP data file.  If the
1533            XMP data file "out.xmp" already exists, it will be updated with
1534            the new information.  Otherwise the XMP data file will be created.
1535            Only XMP, ICC and MIE files may be created like this (other file
1536            types may be edited but not created).  See "WRITING EXAMPLES"
1537            above for another technique to generate XMP files.
1538
1539       exiftool -tagsFromFile a.jpg -XMP:All= -ThumbnailImage= -m b.jpg
1540            Copy all meta information from "a.jpg" to "b.jpg", deleting all
1541            XMP information and the thumbnail image from the destination.
1542
1543       exiftool -TagsFromFile src.jpg -title -author=Phil dst.jpg
1544            Copy title from one image to another and set a new author name.
1545
1546       exiftool -TagsFromFile a.jpg -ISO -TagsFromFile b.jpg -comment dst.jpg
1547            Copy ISO from one image and Comment from another image to a
1548            destination image.
1549
1550       exiftool -tagsfromfile src.jpg -exif:all --subifd:all dst.jpg
1551            Copy only the EXIF information from one image to another,
1552            excluding SubIFD tags.
1553
1554       exiftool '-DateTimeOriginal>FileModifyDate' dir
1555            Use the original date from the meta information to set the same
1556            file's filesystem modification date for all images in a directory.
1557            (Note that "-TagsFromFile @" is assumed if no other -TagsFromFile
1558            is specified when redirecting information as in this example.)
1559
1560       exiftool -TagsFromFile src.jpg '-all>xmp:all' dst.jpg
1561            Copy all possible information from "src.jpg" and write in XMP
1562            format to "dst.jpg".
1563
1564       exiftool -@ iptc2xmp.args -iptc:all= a.jpg
1565            Translate IPTC information to XMP with appropriate tag name
1566            conversions, and delete the original IPTC information from an
1567            image.  This example uses iptc2xmp.args, which is a file included
1568            with the ExifTool distribution that contains the required
1569            arguments to convert IPTC information to XMP format.  Also
1570            included with the distribution are xmp2iptc.args (which performs
1571            the inverse conversion) and a few more .args files for other
1572            conversions between EXIF, IPTC and XMP.
1573
1574       exiftool -tagsfromfile %d%f.CRW -r -ext JPG dir
1575            Recursively rewrite all "JPG" images in "dir" with information
1576            copied from the corresponding "CRW" images in the same
1577            directories.
1578
1579       exiftool '-make+>keywords' image.jpg
1580            Add camera make to list of keywords.
1581
1582       exiftool '-comment<ISO=$exif:iso Exposure=${shutterspeed}' dir
1583            Set the Comment tag of all images in "dir" from the values of the
1584            EXIF:ISO and ShutterSpeed tags.  The resulting comment will be in
1585            the form "ISO=100 Exposure=1/60".
1586
1587       exiftool -TagsFromFile src.jpg -icc_profile dst.jpg
1588            Copy ICC_Profile from one image to another.
1589
1590       exiftool -TagsFromFile src.jpg -all:all dst.mie
1591            Copy all meta information in its original form from a JPEG image
1592            to a MIE file.  The MIE file will be created if it doesn't exist.
1593            This technique can be used to store the metadata of an image so it
1594            can be inserted back into the image (with the inverse command)
1595            later in a workflow.
1596
1597       exiftool -o dst.mie -all:all src.jpg
1598            This command performs exactly the same task as the command above,
1599            except that the -o option will not write to an output file that
1600            already exists.
1601
1602       exiftool -XMP:Flash="{mode=on,fired=true,return=not}" a.jpg
1603            Write a structured tag.  See
1604            <http://owl.phy.queensu.ca/~phil/exiftool/struct.html> for more
1605            details.
1606
1607       exiftool -if '$jpgfromraw' -b -jpgfromraw -w %d%f_%ue.jpg -execute -if
1608       '$previewimage' -b -previewimage -w %d%f_%ue.jpg -execute -tagsfromfile
1609       @ -srcfile %d%f_%ue.jpg -overwrite_original -common_args --ext jpg DIR
1610            [Advanced] Extract JpgFromRaw or PreviewImage from all but JPG
1611            files in DIR, saving them with file names like "image_EXT.jpg",
1612            then add all meta information from the original files to the
1613            extracted images.  Here, the command line is broken into three
1614            sections (separated by -execute options), and each is executed as
1615            if it were a separate command.  The -common_args option causes the
1616            "--ext jpg DIR" arguments to be applied to all three commands, and
1617            the -srcfile option allows the extracted JPG image to be the
1618            source file for the third command (whereas the RAW files are the
1619            source files for the other two commands).
1620

RENAMING EXAMPLES

1622       By writing the "FileName" and "Directory" tags, files are renamed
1623       and/or moved to new directories.  This can be particularly useful and
1624       powerful for organizing files by date when combined with the -d option.
1625       New directories are created as necessary, but existing files will not
1626       be overwritten.  The format codes %d, %f and %e may be used in the new
1627       file name to represent the directory, name and extension of the
1628       original file, and %c may be used to add a copy number if the file
1629       already exists (see the -w option for details).  Note that if used
1630       within a date format string, an extra '%' must be added to pass these
1631       codes through the date/time parser.  (And further note that in a
1632       Windows batch file, all '%' characters must also be escaped, so in this
1633       extreme case '%%%%f' is necessary to pass a simple '%f' through the two
1634       levels of parsing.)  See
1635       <http://owl.phy.queensu.ca/~phil/exiftool/filename.html> for additional
1636       documentation and examples.
1637
1638       exiftool -filename=new.jpg dir/old.jpg
1639            Rename "old.jpg" to "new.jpg" in directory "dir".
1640
1641       exiftool -directory=%e dir
1642            Move all files from directory "dir" into directories named by the
1643            original file extensions.
1644
1645       exiftool '-Directory<DateTimeOriginal' -d %Y/%m/%d dir
1646            Move all files in "dir" into a directory hierarchy based on year,
1647            month and day of "DateTimeOriginal".  ie) This command would move
1648            the file "dir/image.jpg" with a "DateTimeOriginal" of "2005:10:12
1649            16:05:56" to "2005/10/12/image.jpg".
1650
1651       exiftool -o . '-Directory<DateTimeOriginal' -d %Y/%m/%d dir
1652            Same effect as above except files are copied instead of moved.
1653
1654       exiftool '-filename<%f_${focallength}.%e' dir
1655            Rename all files in "dir" by adding FocalLength to the file name.
1656
1657       exiftool '-FileName<CreateDate' -d %Y%m%d_%H%M%S%%-c.%%e dir
1658            Rename all images in "dir" according to the "CreateDate" date and
1659            time, adding a copy number with leading '-' if the file already
1660            exists ("%-c"), and preserving the original file extension (%e).
1661            Note the extra '%' necessary to escape the filename codes (%c and
1662            %e) in the date format string.
1663
1664       exiftool -r '-FileName<CreateDate' -d %Y-%m-%d/%H%M_%%f.%%e dir
1665            Both the directory and the filename may be changed together via
1666            the "FileName" tag if the new "FileName" contains a '/'.  The
1667            example above recursively renames all images in a directory by
1668            adding a "CreateDate" timestamp to the start of the filename, then
1669            moves them into new directories named by date.
1670
1671       exiftool '-FileName<${CreateDate}_$filenumber.jpg' -d %Y%m%d *.jpg
1672            Set the filename of all JPG images in the current directory from
1673            the CreateDate and FileNumber tags, in the form
1674            "20060507_118-1861.jpg".
1675

GEOTAGGING EXAMPLES

1677       ExifTool implements geotagging via 3 special tags: Geotag (which for
1678       convenience is also implemented as an exiftool option), Geosync and
1679       Geotime.  The examples below highlight some geotagging features.  See
1680       <http://owl.phy.queensu.ca/~phil/exiftool/geotag.html> for additional
1681       documentation.
1682
1683       exiftool -geotag track.log a.jpg
1684            Geotag an image ("a.jpg") from position information in a GPS track
1685            log ("track.log").  Since the "Geotime" tag is not specified, the
1686            value of DateTimeOriginal is used for geotagging.  Local system
1687            time is assumed unless DateTimeOriginal contains a timezone.
1688
1689       exiftool -geotag t.log -geotime='2009:04:02 13:41:12-05:00' a.jpg
1690            Geotag an image with the GPS position for a specific time.  (Note
1691            that the "Geotag" tag must be assigned before "Geotime" for the
1692            GPS data to be available when "Geotime" is set.)
1693
1694       exiftool -geotag log.gpx '-xmp:geotime<createdate' dir
1695            Geotag all images in directory "dir" with XMP tags instead of EXIF
1696            tags, based on the image CreateDate.  (In this case, the order of
1697            the arguments doesn't matter because tags with values copied from
1698            other tags are always set after constant values.)
1699
1700       exiftool -geotag a.log -geosync=-20 dir
1701            Geotag images in directory "dir", accounting for image timestamps
1702            which were 20 seconds ahead of GPS.
1703
1704       exiftool -geotag a.log -geosync=1.jpg -geosync=2.jpg dir
1705            Geotag images using time synchronization from two previously
1706            geotagged images (1.jpg and 2.jpg), synchronizing the image and
1707            GPS times using a linear time drift correction.
1708
1709       exiftool -geotag a.log '-geotime<${createdate}+01:00' dir
1710            Geotag images in "dir" using CreateDate with the specified
1711            timezone.  If CreateDate already contained a timezone, then the
1712            timezone specified on the command line is ignored.
1713
1714       exiftool -geotag= a.jpg
1715            Delete GPS tags which may have been added by the geotag feature.
1716            Note that this does not remove all GPS tags -- to do this instead
1717            use "-gps:all=".
1718
1719       exiftool -xmp:geotag= a.jpg
1720            Delete XMP GPS tags which were added by the geotag feature.
1721
1722       exiftool -xmp:geotag=track.log a.jpg
1723            Geotag an image with XMP tags, using the time from
1724            DateTimeOriginal.
1725
1726       exiftool -geotag a.log -geotag b.log -r dir
1727            Combine multiple track logs and geotag an entire directory tree of
1728            images.
1729
1730       exiftool -geotag 'tracks/*.log' -r dir
1731            Read all track logs from the "tracks" directory.
1732
1733       exiftool -p gpx.fmt -d %Y-%m-%dT%H:%M:%SZ dir > out.gpx
1734            Generate a GPX track log from all images in directory "dir".  This
1735            example uses the "gpx.fmt" file included in the full ExifTool
1736            distribution package and assumes that the images in "dir" have all
1737            been previously geotagged.
1738

PIPING EXAMPLES

1740       cat a.jpg | exiftool -
1741            Extract information from stdin.
1742
1743       exiftool image.jpg -thumbnailimage -b | exiftool -
1744            Extract information from an embedded thumbnail image.
1745
1746       cat a.jpg | exiftool -iptc:keywords+=fantastic - > b.jpg
1747            Add an IPTC keyword in a pipeline, saving output to a new file.
1748
1749       wget -qO - http://a.domain.com/bigfile.jpg | exiftool -fast -
1750            Extract information from an image over the internet using the GNU
1751            wget utility.  The -fast option prevents exiftool from scanning
1752            for trailer information, so only the meta information header is
1753            transferred.
1754
1755       exiftool a.jpg -thumbnailimage -b | exiftool -comment=wow - | exiftool
1756       a.jpg -thumbnailimage'<=-'
1757            Add a comment to an embedded thumbnail image.  (Why anyone would
1758            want to do this I don't know, but I've included this as an example
1759            to illustrate the flexibility of ExifTool.)
1760

DIAGNOSTICS

1762       The exiftool application exits with a status of 0 on success, or 1 if
1763       an error occured or if all files failed the -if condition.
1764

AUTHOR

1766       Copyright 2003-2011, Phil Harvey
1767
1768       This is free software; you can redistribute it and/or modify it under
1769       the same terms as Perl itself.
1770

SEE ALSO

1772       Image::ExifTool(3pm), Image::ExifTool::TagNames(3pm),
1773       Image::ExifTool::Shortcuts(3pm), Image::ExifTool::Shift.pl
1774
1775
1776
1777perl v5.12.4                      2011-09-23                       EXIFTOOL(1)
Impressum