Exiftool Manual
Exiftool Manual
59 -- 1
EXIFTOOL(1) User Contributed Perl Documentation EXIFTOOL(1)
NAME
exiftool - Read and write meta information in files
SYNOPSIS
exiftool [_
O_P_
T_IO
__N_
S] [-_
T_A_
G...] [--_T_A_
G...] _ F_I_
L_E...
exiftool [_
O_P_
T_I_
O_N_
S] -_
T_A_
G[+-<]=[_V_
A_L_
U_E]... _ F_I_
L_E...
exiftool [_
O_P_
T_I_
ON__
S] -tagsFromFile _ S_R_
C_F_
I_L_
E [-_ S_
R_C_
TA__
G[>_
D_
S_T_
T_A_
G]...] _
F_I_
L_E...
exiftool [ -ver | -list[w w|f
f|r
r|w
wf|gg[_N_U_
M]|d d|x
x] ]
DESCRIPTION
A command-line interface to Image::ExifTool, used for reading and
writing meta information in a variety of file types. _F_
I_L_
E is one or
more source file names, directory names, or "-" for the standard input.
Metadata is read from source files and printed in readable form to the
console (or written to output text files with -w).
Note: If _FI
__L_
E is a directory name then only supported file types in
the directory are processed (in write mode only writable types are
processed). However, files may be specified by name, or the -ext
option may be used to force processing of files with any extension.
File Types
------------+-------------+-------------+-------------+------------
3FR r | EIP r | LA r | OTF r | RW2 r/w
3G2 r/w | EPS r/w | LNK r | PAC r | RWL r/w
3GP r/w | ERF r/w | M2TS r | PAGES r | RWZ r
ACR r | EXE r | M4A/V r/w | PBM r/w | RM r
AFM r | EXIF r/w/c | MEF r/w | PCD r | SEQ r
AI r/w | EXR r | MIE r/w/c | PDF r/w | SO r
AIFF r | EXV r/w/c | MIFF r | PEF r/w | SR2 r/w
APE r | F4A/V r/w | MKA r | PFA r | SRF r
ARW r/w | FFF r/w | MKS r | PFB r | SRW r/w
ASF r | FLA r | MKV r | PFM r | SVG r
AVI r | FLAC r | MNG r/w | PGF r | SWF r
BMP r | FLV r | MODD r | PGM r/w | THM r/w
BTF r | FPF r | MOS r/w | PLIST r | TIFF r/w
CHM r | FPX r | MOV r/w | PICT r | TORRENT r
COS r | GIF r/w | MP3 r | PMP r | TTC r
CR2 r/w | GZ r | MP4 r/w | PNG r/w | TTF r
CRW r/w | HDP r/w | MPC r | PPM r/w | VRD r/w/c
CS1 r/w | HDR r | MPG r | PPT r | VSD r
DCM r | HTML r | MPO r/w | PPTX r | WAV r
DCP r/w | ICC r/w/c | MQV r/w | PS r/w | WDP r/w
DCR r | IDML r | MRW r/w | PSB r/w | WEBP r
DFONT r | IIQ r/w | MXF r | PSD r/w | WEBM r
DIVX r | IND r/w | NEF r/w | PSP r | WMA r
-- ExifTool 9.59 -- 2
DJVU r | INX r | NRW r/w | QTIF r/w | WMV r
DLL r | ITC r | NUMBERS r | RA r | WV r
DNG r/w | J2C r | ODP r | RAF r/w | X3F r/w
DOC r | JNG r/w | ODS r | RAM r | XCF r
DOCX r | JP2 r/w | ODT r | RAR r | XLS r
DPX r | JPEG r/w | OFR r | RAW r/w | XLSX r
DV r | K25 r | OGG r | RIFF r | XMP r/w/c
DVB r/w | KDC r | OGV r | RSRC r | ZIP r
DYLIB r | KEY r | ORF r/w | RTF r |
Meta Information
----------------------+----------------------+---------------------
EXIF r/w/c | CIFF r/w | Ricoh RMETA r
GPS r/w/c | AFCP r/w | Picture Info r
IPTC r/w/c | Kodak Meta r/w | Adobe APP14 r
XMP r/w/c | FotoStation r/w | MPF r
MakerNotes r/w/c | PhotoMechanic r/w | Stim r
Photoshop IRB r/w/c | JPEG 2000 r | DPX r
ICC Profile r/w/c | DICOM r | APE r
MIE r/w/c | Flash r | Vorbis r
JFIF r/w/c | FlashPix r | SPIFF r
Ducky APP12 r/w/c | QuickTime r | DjVu r
PDF r/w/c | Matroska r | M2TS r
PNG r/w/c | MXF r | PE/COFF r
Canon VRD r/w/c | PrintIM r | AVCHD r
Nikon Capture r/w/c | FLAC r | ZIP r
GeoTIFF r/w/c | ID3 r | (and more)
OPTIONS
Case is not significant for any command-line option (including tag and
group names), except for single-character options when the
corresponding upper-case option exists. Many single-character options
have equivalent long-name versions (shown in brackets), and some
options have inverses which are invoked with a leading double-dash.
Unrecognized options are interpreted as tag names (for this reason,
multiple single-character options may NOT be combined into one
argument). Contrary to standard practice, options may appear after
source file names on the exiftool command line.
Option Summary
Tag operations
Processing control
Special features
Utilities
Other options
Advanced options
Option Details
T_
_ a_
g _
o_pe
__r_
a_t_
i_o_
n_s
-_
T_A_
G Extract information for the specified tag (ie. "-CreateDate").
Multiple tags may be specified in a single command. A tag name is
the handle by which a piece of information is referenced. See
Image::ExifTool::TagNames for documentation on available tag
names. A tag name may include leading group names separated by
colons (ie. "-EXIF:CreateDate", or "-Doc1:XMP:Creator"), and each
group name may be prefixed by a digit to specify family number
(ie. "-1IPTC:City"). Use the -listg option to list available
group names by family.
--T
__A_
G
Exclude specified tag from extracted information. Same as the -x
option. Once excluded from the output, a tag may not be re-
included by a subsequent option. May also be used following a
-tagsFromFile option to exclude tags from being copied (when
redirecting to another tag, it is the source tag that should be
excluded), or to exclude groups from being deleted when deleting
all information (ie. "-all= --exif:all" deletes all but EXIF
information). But note that this will not exclude individual tags
from a group delete (unless a family 2 group is specified, see
note 4 below). Instead, individual tags may be recovered using
the -tagsFromFile option (ie. "-all= -tagsfromfile @ -artist").
Wildcards are permitted as described above for -TAG.
-_
T_A_
G[+-]=
=[_
V_A_
L_UE
_]
Write a new value for the specified tag (ie. "-comment=wow"), or
delete the tag if no V
__A_
L_U_
E is given (ie. "-comment="). "+=" and
-- ExifTool 9.59 -- 5
"-=" are used to add or remove existing entries from a list, or to
shift date/time values (see Image::ExifTool::Shift.pl for
details). "+=" may also be used to increment numerical values,
and "-=" may be used to conditionally delete or replace a tag (see
"WRITING EXAMPLES" for examples).
__
T A_
G may contain one or more leading family 0, 1 or 2 group names,
prefixed by optional family numbers, and separated colons. If no
group name is specified, the tag is created in the preferred
group, and updated in any other location where a same-named tag
already exists. The preferred group is the first group in the
following list where _T_
A_G is valid: 1) EXIF, 2) IPTC, 3) XMP.
The wildcards "*" and "?" may be used in tag names to assign the
same value to multiple tags. When specified with wildcards,
"unsafe" tags are not written. A tag name of "All" is eqivalent
to "*" (except that it doesn’t require quoting, while arguments
with wildcards do on systems with shell globbing), and is often
used when deleting all metadata (ie. "-All=") or an entire group
(ie. "-GROUP:All=", see note 4 below). Note that not all groups
are deletable, and that the JPEG APP14 "Adobe" group is not
removed by default with "-All=" because it may affect the
appearance of the image. However, this will remove color space
information, so the colors may be affected (but this may be
avoided by copying back the tags defined by the ColorSpaceTags
shortcut). Use the -listd option for a complete list of deletable
groups, and see note 5 below regarding the "APP" groups. Also,
within an image some groups may be contained within others, and
these groups are removed if the containing group is deleted:
JPEG Image:
- Deleting EXIF or IFD0 also deletes ExifIFD, GlobParamIFD,
GPS, IFD1, InteropIFD, MakerNotes, PrintIM and SubIFD.
- Deleting ExifIFD also deletes InteropIFD and MakerNotes.
- Deleting Photoshop also deletes IPTC.
TIFF Image:
- Deleting EXIF only removes ExifIFD which also deletes
InteropIFD and MakerNotes.
Notes:
-_
T_A_
G<=_
D_A_
T_F_
I_L_
E or -T
__A_
G<=_
F_M_
T
Set the value of a tag from the contents of file _ D_
A_T_
F_I_
L_E. The
file name may also be given by a _ F_
M_T string where %d, %f and %e
represent the directory, file name and extension of the original
_
F_I_
L_E (see the -w option for more details). Note that quotes are
required around this argument to prevent shell redirection since
it contains a "<" symbol. "+<=" or "-<=" may also be used to add
or delete specific list entries, or to shift date/time values.
-tagsFromFile _
S_R_
CF__
I_L_
E or _
F_M_
T
Copy tag values from _ S_
R_C_
F_I_
L_E to _
F_I_
L_E. Tag names on the command
line after this option specify the tags to be copied, or excluded
from the copy. Wildcards are permitted in these tag names. If no
tags are specified, then all possible tags (see note 1 below) from
the source file are copied to same-named tags in the preferred
location of the output file (the same as specifying "-all"). More
than one -tagsFromFile option may be used to copy tags from
multiple files.
__
S R_
C_F_
I_LE
_ may be the same as _F_
I_L_
E to move information around within
a single file. In this case, "@" may be used to represent the
source file (ie. "-tagsFromFile @"), permitting this feature to be
used for batch processing multiple files. Specified tags are then
copied from each file in turn as it is rewritten. For advanced
batch use, the source file name may also be specified using a _ F_
M_T
string in which %d, %f and %e represent the directory, file name
and extension of F __
I_L_
E. See -w option for _F_
M_T string examples.
Notes:
-x _
T_A_
G (-
-exclude)
Exclude the specified tag. There may be multiple -x options.
This has the same effect as --_
T_A_
G on the command line. May also
be used following a -tagsFromFile option to exclude tags from
being copied.
I_
_ n_
p_u_
t_-o
__u_
tp__
u_t _
te__
x_t _
f_o_
r_m_
a_t_
t_i_
n_g
Note that trailing spaces are removed from extracted values for most
output text formats. The exceptions are "-b", "-csv", "-j" and "-X".
-args (-
-argFormat)
Output information in the form of exiftool arguments, suitable for
use with the -@ option when writing. May be combined with the -G
option to include group names. This feature may be used to
effectively copy tags between images, but allows the metadata to
be altered by editing the intermediate file ("out.args" in this
example):
-b (-
-binary)
Output requested metadata in binary format without tag names or
descriptions. This option is mainly used for extracting embedded
images or other binary data, but it may also be useful for some
text strings since control characters (such as newlines) are not
replaced by ’.’ as they are in the default output. List items are
separated by a newline when extracted with the -b option. May be
combined with "-j", "-php" or "-X" to extract binary data in JSON,
PHP or XML format.
-c _
F_M_
T (-
-coordFormat)
Set the print format for GPS coordinates. _F_
M_T uses the same
syntax as the "printf" format string. The specifiers correspond
to degrees, minutes and seconds in that order, but minutes and
seconds are optional. For example, the following table gives the
output for the same coordinate using various formats:
FMT Output
------------------- ------------------
"%d deg %d’ %.2f"\" 54 deg 59’ 22.80" (default for reading)
"%d %d %.8f" 54 59 22.80000000 (default for copying)
"%d deg %.4f min" 54 deg 59.3800 min
"%.6f degrees" 54.989667 degrees
Notes:
-charset [[_T_Y_
P_E=]_
C_H_
A_R_
S_E_
T]
If _
T_Y_
P_E is "ExifTool" or not specified, this option sets the
ExifTool character encoding for output tag values when reading and
input values when writing. The default ExifTool encoding is
"UTF8". If no _ C_
H_A_
R_S_
E_T is given, a list of available character
sets is returned. Valid _ C_
H_A_
R_S_
E_T values are:
Other values of _
T_Y_
P_E listed below are used to specify the internal
encoding of various meta information formats.
-csv[=_
C_S_
V_F_
I_L_
E]
Export information in CSV format, or import information if _C_S_
V_F_
I_L_
E
is specified. When importing, the CSV file must be in exactly the
same format as the exported file. The first row of the _C_
S_V_
F_I_
L_E
must be the ExifTool tag names (with optional group names) for
each column of the file, and values must be separated by commas.
A special "SourceFile" column specifies the files associated with
each row of information (a SourceFile of "*" may be used to match
any source file name). The following examples demonstrate basic
use of this option:
# generate CSV file with common tags from all images in a directory
exiftool -common -csv dir > out.csv
List-type tags are stored as simple strings in a CSV file, but the
-sep option may be used to split them back into separate items
when importing.
-d _
F_M_
T (-
-dateFormat)
Set the format for date/time tag values. The specifics of the _F_
M_T
syntax are system dependent -- consult the "strftime" man page on
your system for details. The default format is equivalent to
"%Y:%m:%d %H:%M:%S". This option has no effect on date-only or
time-only tags and ignores timezone information if present. Only
one -d option may be used per command. The inverse operation (ie.
un-formatting a date/time value) is currently not applied when
writing a date/time tag.
-D (-
-decimal)
Show tag ID number in decimal when extracting information.
-E, -ex (-
-escapeHTML, -escapeXML)
Escape characters in output values for HTML (-
-E) or XML (-
-ex).
For HTML, all characters with Unicode code points above U+007F are
escaped as well as the following 5 characters: & (&) ’ (')
" (") > (>) and < (<). For XML, only these 5
characters are escaped. The -E option is implied with -h, and -ex
is implied with -X. The inverse conversion is applied when
writing tags.
-f (-
-forcePrint)
Force printing of tags even if their values are not found. This
option only applies when tag names are specified. With this
option, a dash ("-") is printed for the value of any missing tag
(but this may be configured via the API MissingTagValue option).
May also be used to add a ’flags’ attribute to the -listx output,
or to allow tags to be deleted when writing with the -csv=_
C_S_
V_F_
I_L_
E
feature.
-- ExifTool 9.59 -- 11
-g[_
N_U_
M][:_
N_U_
M...] (-
-groupHeadings)
Organize output by tag group. _ N_
U_M specifies a group family
number, and may be 0 (general location), 1 (specific location), 2
(category), 3 (document number) or 4 (instance number). Multiple
families may be specified by separating them with colons. By
default the resulting group name is simplified by removing any
leading "Main:" and collapsing adjacent identical group names, but
this can be avoided by placing a colon before the first family
number (ie. -g:3:1). If _ N_
U_M is not specified, -g0 is assumed.
Use the -listg option to list group names for a specified family.
-G[_
N_UM
_][:_
NU__
M...] (-
-groupNames)
Same as -g but print group name for each tag.
-h (-
-htmlFormat)
Use HTML table formatting for output. Implies the -E option. The
formatting options -D, -H, -g, -G, -l and -s may be used in
combination with -h to influence the HTML format.
-H (-
-hex)
Show tag ID number in hexadecimal when extracting information.
-htmlDump[_
O_F_
F_S_
E_T]
Generate a dynamic web page containing a hex dump of the EXIF
information. This can be a very powerful tool for low-level
analysis of EXIF information. The -htmlDump option is also
invoked if the -v and -h options are used together. The verbose
level controls the maximum length of the blocks dumped. An _O_F_
F_S_
E_T
may be given to specify the base for displayed offsets. If not
provided, the EXIF/TIFF base offset is used. Use -htmlDump0 for
absolute offsets. Currently only EXIF/TIFF and JPEG information
is dumped, but the -u option can be used to give a raw hex dump of
other file formats.
-j[=_
J_S_
ON__
F_IL
__E] (-
-json)
Use JSON (JavaScript Object Notation) formatting for console
output, or import JSON file if J__
S_O_
N_F_
I_L_
E is specified. This option
may be combined with -g to organize the output into objects by
group, or -G to add group names to each tag. List-type tags with
multiple items are output as JSON arrays unless -sep is used. By
default XMP structures are flattened into individual tags in the
JSON output, but the original structure may be preserved with the
-struct option (this also causes all list-type XMP tags to be
output as JSON arrays, otherwise single-item lists are output as
simple strings). The -a option is implied if the -g or -G options
are used, otherwise it is ignored and duplicate tags are
suppressed. Adding the -D or -H option changes tag values to JSON
objects with "val" and "id" fields, and adding -l adds a "desc"
field, and a "num" field if the numerical value is different from
the converted "val". The -b option may be added to output binary
data, encoded in base64 if necessary (indicated by "base64:" as
the first 7 bytes of the value). The -L and -charset options have
no effect on the JSON output.
If _
J_SO
__N_
F_I_
L_E is specified, the file is imported and the tag
definitions from the file are used to set tag values on a per-file
basis. The special "SourceFile" entry in each JSON object
associates the information with a specific target file (see the
-csv option for details). The imported JSON file must have the
same format as the exported JSON files with the exception that the
-g option is not compatible with the import file format (use -G
instead). Additionally, tag names in the input JSON file may be
suffixed with a "#" to disable print conversion.
-- ExifTool 9.59 -- 12
-l (-
-long)
Use long 2-line Canon-style output format. Adds a description and
unconverted value (if it is different from the converted value) to
the XML, JSON or PHP output when -X, -j or -php is used.
-L (-
-latin)
Use Windows Latin1 encoding (cp1252) for output tag values instead
of the default UTF-8. When writing, -L specifies that input text
values are Latin1 instead of UTF-8. Equivalent to "-charset
latin".
-lang [_L_A_
N_G]
Set current language for tag descriptions and converted values.
L_
_ AN
__G is "de", "fr", "ja", etc. Use -lang with no other arguments
to get a list of available languages. The default language is
"en" if -lang is not specified. Note that tag/group names are
always English, independent of the -lang setting, and translation
of warning/error messages has not yet been implemented.
-listItem I
__N_
D_EX
_
For list-type tags, this causes only the item with the specified
index to be extracted. _I_
N_D_
E_X is 0 for the first item in the list.
Has no effect when writing or copying tags, in a -if condition, or
in combination with structured output options.
-n (-
--printConv)
Read and write values as numbers instead of words. By default,
extracted values are converted to a more human-readable format for
printing, but the -n option disables this print conversion for all
tags. For example:
-p _
F_M_
TF__
I_L_
E or _
S_T_
R (-
-printFormat)
Print output in the format specified by the given file or string
(and ignore other format options). Tag names in the format file
-- ExifTool 9.59 -- 13
or string begin with a "$" symbol and may contain a leading group
names and/or a trailing "#". Case is not significant. Braces
"{}" may be used around the tag name to separate it from
subsequent text. Use $$ to represent a "$" symbol, and $/ for a
newline. Multiple -p options may be used, each contributing a
line of text to the output. Lines beginning with "#[HEAD]" and
"#[TAIL]" are output only for the first and last processed files
respectively. Lines beginning with "#[BODY]" and lines not
beginning with "#" are output for each processed file. Other
lines beginning with "#" are ignored. For example, this format
file:
When -ee (-
-extractEmbedded) is combined with -p, embedded
documents are effectively processed as separate input files.
-php Format output as a PHP Array. The -g, -G, -D, -H, -l, -sep and
-struct options combine with -php, and duplicate tags are handled
in the same way as with the -json option. As well, the -b option
may be added to output binary data. Here is a simple example
showing how this could be used in a PHP script:
-- ExifTool 9.59 -- 14
<?php
eval(’$array=’ . ‘exiftool -php -q image.jpg‘);
print_r($array);
?>
-s[_
N_U_
M] (-
-short)
Short output format. Prints tag names instead of descriptions.
Add _
N_U_
M or up to 3 -s options for even shorter formats:
-S (-
-veryShort)
Very short format. The same as -s2 (or two -s options). Tag
names are printed instead of descriptions, and no extra spaces are
added to column-align values.
-sep S
__T_
R (-
-separator)
Specify separator string for items in list-type tags. When
reading, the default is to join list items with ", ". When
writing, this option causes values assigned to list-type tags to
be split into individual items at each substring matching _ S_
T_R
(otherwise they are not split by default). Space characters in
S_
_ T_
R match zero or more whitespace characters in the value.
Note that an empty separator ("") is allowed, and will join items
with no separator when reading, or split the value into individual
characters when writing.
-sort
Sort output by tag description, or by tag name if the -s option is
used. Tags are sorted within each group when combined with the -g
or -G option. When sorting by description, the sort order will
depend on the -lang option setting. Without the -sort option,
tags appear in the order they were specified on the command line,
or if not specified, the order they were extracted from the file.
-struct, --struct
Output structured XMP information instead of flattening to
individual tags. This option works well when combined with the
XML (-
-X) and JSON (-
-j) output formats. For other output formats,
the structures are serialized into the same format as when writing
structured information (see
<http://owl.phy.queensu.ca/˜phil/exiftool/struct.html> for
details). When copying, structured tags are copied by default
unless --struct is used to disable this feature (although
flattened tags may still be copied by specifying them individually
unless -struct is used). These options have no effect when
assigning new values since both flattened and structured tags may
always be used when writing.
-t (-
-tab)
Output a tab-delimited list of description/values (useful for
database import). May be combined with -s to print tag names
instead of descriptions, or -S to print tag values only, tab-
delimited on a single line. The -t option may also be used to add
tag table information to the -X option output.
-T (-
-table)
Output tag values in table form. Equivalent to -t -S -q -f.
-v[_
N_U_
M] (-
-verbose)
-- ExifTool 9.59 -- 15
Print verbose messages. _N_
U_M specifies the level of verbosity in
the range 0-5, with higher numbers being more verbose. If _ N_
U_M is
not given, then each -v option increases the level of verbosity by
1. With any level greater than 0, most other options are ignored
and normal console output is suppressed unless specific tags are
extracted. Using -v0 causes the console output buffer to be
flushed after each line (which may be useful to avoid delays when
piping exiftool output), and prints the name of each processed
file when writing. Also see the -progress option.
-w[+|!] E
__X_
T or _
F_M_
T (-
-textOut)
Write console output to files with names ending in E __
X_T, one for
each source file. The output file name is obtained by replacing
the source file extension (including the ’.’) with the specified
extension (and a ’.’ is added to the start of E__
X_T if it doesn’t
already contain one). Alternatively, a F__
MT_ string may be used to
give more control over the output file name and directory. In the
format string, %d, %f and %e represent the directory, filename and
extension of the source file, and %c represents a copy number
which is automatically incremented if the file already exists. %d
includes the trailing ’/’ if necessary, but %e does not include
the leading ’.’. For example:
Notes:
Advanced features:
(Note that the root directory counts as one level when an absolute
path is used as in the last example above.)
This same _
F_M_
T syntax is used with the -o and -tagsFromFile
options, although %c is only valid for output file names.
-W[!|+] _
F_MT
_ (-
-tagOut)
-- ExifTool 9.59 -- 17
This enhanced version of the -w option allows a separate output
file to be created for each extracted tag. The differences
between -W and -w are as follows:
1) With -W, a new output file is created for each extracted tag.
-Wext E
__X_
T, --Wext _
E_X_
T (-
-tagOutExt)
This option is used to specify the type of output file(s) written
by the -W option. An output file is written only if the suggested
extension matches _ E_X_
T. Multiple -Wext options may be used to
write more than one type of file. Use --Wext to write all but the
specified type(s).
-X (-
-xmlFormat)
Use ExifTool-specific RDF/XML formatting for console output.
Implies the -a option, so duplicate tags are extracted. The
formatting options -b, -D, -H, -l, -s, -sep, -struct and -t may be
used in combination with -X to affect the output, but note that
the tag ID (-
-D, -H and -t), binary data (-
-b) and structured output
(-
-struct) options are not effective for the short output (-
-s).
Another restriction of -s is that only one tag with a given group
and name may appear in the output. Note that the tag ID options
(-
-D, -H and -t) will produce non-standard RDF/XML unless the -l
option is also used. By default, list-type tags with multiple
values are formatted as an RDF Bag, but they are combined into a
single string when -s or -sep is used. Using -L changes the XML
encoding from "UTF-8" to "windows-1252". Other -charset settings
change the encoding only if there is a corresponding standard XML
character set. The -b option causes binary data values to be
written, encoded in base64 if necessary. The -t option adds tag
table information to the output (table "name", decimal tag "id",
and "index" for cases where multiple conditional tags exist with
the same ID).
-a, --a (-
-duplicates, --duplicates)
Allow (-
-a) or suppress (-
--a) duplicate tag names to be extracted.
By default, duplicate tags are suppressed unless the -ee or -X
options are used or the Duplicates option is enabled in the
configuration file.
-e (-
--composite)
Extract existing tags only -- don’t calculate composite tags.
-ee (-
-extractEmbedded)
Extract information from embedded documents in EPS files, embedded
EPS information and JPEG and Jpeg2000 images in PDF files,
embedded MPF images in JPEG and MPO files, streaming metadata in
AVCHD videos, and the resource fork of Mac OS files. Implies the
-a option. Use -g3 or -G3 to identify the originating document
for extracted information. Embedded documents containing sub-
documents are indicated with dashes in the family 3 group name.
(ie. "Doc2-3" is the 3rd sub-document of the 2nd embedded
document.) Note that this option may increase processing time
substantially, especially for PDF files with many embedded images.
-ext E
__X_
T, --ext _
E_X_
T (-
-extension)
Process only files with (- -ext) or without (-
--ext) a specified
extension. There may be multiple -ext and --ext options.
Extensions may begin with a leading ’.’, and case is not
significant. For example:
Using this option has two main advantages over specifying "*.EXT"
on the command line: 1) It applies to files in subdirectories
when combined with the -r option. 2) The -ext option is case-
insensitive, which is useful when processing files on case-
sensitive filesystems.
-F[_
O_F_
F_SE
__T] (-
-fixBase)
Fix the base for maker notes offsets. A common problem with some
image editors is that offsets in the maker notes are not adjusted
properly when the file is modified. This may cause the wrong
values to be extracted for some maker note entries when reading
the edited file. This option allows an integer _O_
F_F_
S_E_
T to be
specified for adjusting the maker notes base offset. If no _ O_
F_F_
S_E_
T
is given, ExifTool takes its best guess at the correct base. Note
that exiftool will automatically fix the offsets for images which
store original offset information (ie. newer Canon models).
Offsets are fixed permanently if -F is used when writing EXIF to
an image. ie)
-fast[_
N_U_
M]
Increase speed of extracting information from JPEG images. With
this option, ExifTool will not scan to the end of a JPEG image to
check for an AFCP or PreviewImage trailer, or past the first
comment in GIF images or the audio/video data in WAV/AVI files to
-- ExifTool 9.59 -- 19
search for additional metadata. These speed benefits are small
when reading images directly from disk, but can be substantial if
piping images through a network connection. For more substantial
speed benefits, -fast2 also causes exiftool to avoid extracting
any EXIF MakerNote information.
-fileOrder [-]_
T_A_
G
Set file processing order according to the sorted value of the
specified _
T_A_
G. For example, to process files in order of date:
-i _
D_I_
R (-
-ignore)
Ignore specified directory name. Use multiple -i options to
ignore more than one directory name. A special _D_
I_R value of
"SYMLINKS" (case sensitive) may be specified to ignore symbolic
links when the -r option is used.
-if _
E_XP
__R
Specify a condition to be evaluated before processing each _ F_I_L_
E.
E_
_ XP
__R is a Perl-like logic expression containing tag names prefixed
by "$" symbols. It is evaluated with the tags from each _ F_
I_L_
E in
turn, and the file is processed only if the expression returns
true. Unlike Perl variable names, tag names are not case
sensitive and may contain a hyphen. As well, tag names may have a
leading group names separated by colons, and/or a trailing "#"
character to disable print conversion. The expression $GROUP:all
evaluates to 1 if any tag exists in the specified "GROUP", or 0
otherwise (see note 2 below). When multiple -if options are used,
all conditions must be satisfied to process the file. Returns an
exit status of 1 if all files fail the condition. Below are a few
examples:
Notes:
4) The condition may only test tags from the file being processed.
To process one file based on tags from another, two steps are
required. For example, to process XMP sidecar files in directory
"DIR" based on tags from the associated NEF:
-m (-
-ignoreMinorErrors)
Ignore minor errors and warnings. This enables writing to files
with minor errors and disables some validation checks which could
result in minor warnings. Generally, minor errors/warnings
indicate a problem which usually won’t result in loss of metadata
if ignored. However, there are exceptions, so ExifTool leaves it
up to you to make the final decision. Minor errors and warnings
are indicated by "[minor]" at the start of the message. Warnings
which affect processing when ignored are indicated by "[Minor]"
(with a capital "M").
-o _
O_U_
T_F_
I_LE
_ or _
F_M_
T (-
-out)
Set the output file or directory name when writing information.
Without this option, when any "real" tags are written the original
file is renamed to "FILE_original" and output is written to _
F_I_
L_E.
When writing only FileName and/or Directory "pseudo" tags, -o
causes the file to be copied instead of moved, but directories
specified for either of these tags take precedence over that
specified by the -o option.
O_
_ UT
__F_
I_L_
E may be "-" to write to stdout. The output file name may
also be specified using a _ F_
M_T string in which %d, %f and %e
represent the directory, file name and extension of _ F_
I_L_
E. Also,
%c may be used to add a copy number. See the -w option for _ F_
M_T
string examples.
-overwrite_original
-- ExifTool 9.59 -- 21
Overwrite the original _
F_I_
L_E (instead of preserving it by adding
"_original" to the file name) when writing information to an
image. Caution: This option should only be used if you already
have separate backup copies of your image files. The overwrite is
implemented by renaming a temporary file to replace the original.
This deletes the original file and replaces it with the edited
version in a single operation. When combined with -o, this option
causes the original file to be deleted if the output file was
successfully written (ie. the file is moved instead of copied).
-overwrite_original_in_place
Similar to -overwrite_original except that an extra step is added
to allow the original file attributes to be preserved. For
example, on a Mac this causes the original file creation date,
type, creator, label color, icon, Finder tags and hard links to
the file to be preserved (but note that the Mac OS resource fork
is always preserved unless specifically deleted with
"-rsrc:all="). This is implemented by opening the original file
in update mode and replacing its data with a copy of a temporary
file before deleting the temporary. The extra step results in
slower performance, so the -overwrite_original option should be
used instead unless necessary.
-P (-
-preserve)
Preserve the filesystem modification date/time of the original
file ("FileModifyDate") when writing. Note that some filesystems
store a creation date which is not preserved by this option, with
the exception of Windows systems where Win32API::File::Time is
available. For other systems, the -overwrite_original_in_place
option may be used if necessary to preserve the creation date.
-password P
__A_
S_S_
W_D
Specify password to allow processing of password-protected PDF
documents. If a password is required but not given, a warning is
issued and the document is not processed. Ignored if a password
is not required.
-progress
Show file progress count in messages. The progress count appears
in brackets after then name of each processed file, and gives the
current file number and the total number of files to be processed.
Implies the -v0 option, which prints the name of each processed
file when writing. When combined with the [tt]-if[/tt] option,
the total count includes all files before the condition is
applied, but files that fail the condition will not have their
names printed.
-q (-
-quiet)
Quiet processing. One -q suppresses normal informational
messages, and a second -q suppresses warnings as well. Error
messages can not be suppressed, although minor errors may be
downgraded to warnings with the -m option.
-r (-
-recurse)
Recursively process files in subdirectories. Only meaningful if
F_
_ I_
L_E is a directory name. By default, exiftool will also follow
symbolic links to directories if supported by the system, but this
may be disabled with "-i SYMLINKS" (see the -i option for
details).
-scanForXMP
Scan all files (even unsupported formats) for XMP information
unless found already. When combined with the -fast option, only
unsupported file types are scanned. Warning: It can be time
consuming to scan large files.
-- ExifTool 9.59 -- 22
-u (-
-unknown)
Extract values of unknown tags. Add another -u to also extract
unknown information from binary data blocks. This option applies
to tags with numerical tag ID’s, and causes tag names like
"Exif_0xc5d9" to be generated for unknown information. It has no
effect on information types which have human-readable tag ID’s
(such as XMP), since unknown tags are extracted automatically from
these formats.
-U (-
-unknown2)
Extract values of unknown tags as well as unknown information from
some binary data blocks. This is the same as two -u options.
-wm M
__OD
__E (-
-writeMode)
Set mode for writing/creating tags. M__
O_D_
E is a string of one or
more characters from the list below. Write mode is "wcg" unless
otherwise specified.
-z (-
-zip)
When reading, causes information to be extracted from .gz and .bz2
compressed images. (Only one image per archive. Requires gzip
and bzip2 to be installed on the system.) When writing, causes
compressed information to be written if supported by the image
format. (ie. The PNG format supports compressed text.) This
option also disables the recommended padding in embedded XMP,
saving 2424 bytes when writing XMP in a file.
S_
_ p_
ec__
i_a_
l _
f_e_
at__
u_r_
e_s
-geotag _
T_R_
K_F_
I_L_
E
Geotag images from the specified GPS track log file. Using the
-geotag option is equivalent to writing a value to the "Geotag"
tag. After the -geotag option has been specified, the value of
the "Geotime" tag is written to define a date/time for the
position interpolation. If "Geotime" is not specified, the value
is copied from "DateTimeOriginal". For example, the following two
commands are equivalent:
-globalTimeShift _
S_H_
I_F_
T
Shift all formatted date/time values by the specified amount when
reading. Does not apply to unformatted (--n) output. _S_
H_I_
F_T takes
the same form as the date/time shift when writing (see
Image::ExifTool::Shift.pl for details), with a negative shift
being indicated with a minus sign ("-") at the start of the _ S_
H_I_
F_T
string. For example:
# set the file name from the shifted CreateDate (-1 day) for
# all images in a directory
exiftool "-filename<createdate" -globaltimeshift "-0:0:1 0:0:0" \
-d %Y%m%d-%H%M%S.%%e dir
-use M
__OD
__U_
L_E
Add features from specified plug-in _
M_O_
D_U_
L_E. Currently, the MWG
module is the only plug-in module distributed with exiftool. This
module adds read/write support for tags as recommended by the
Metadata Working Group. To save typing, "-use MWG" is assumed if
the "MWG" group is specified for any tag on the command line. See
the MWG Tags documentation for more details. Note that this
option is not reversible, and remains in effect until the
application terminates, even across the "-execute" option.
U_
_ t_
i_l_
i_ti
__e_
s
-restore_original
-delete_original[!]
These utility options automate the maintenance of the "_original"
files created by exiftool. They have no effect on files without
an "_original" copy. The -restore_original option restores the
specified files from their original copies by renaming the
"_original" files to replace the edited versions. For example,
-- ExifTool 9.59 -- 24
the following command restores the originals of all JPG images in
directory "DIR":
These options may not be used with other options to read or write
tag values in the same command, but may be combined with options
such -ext, -if, -r, -q and -v.
O_
_ t_
he__
r _
o_pt
__i_
o_n_
s
-@ _
A_R_
G_F_
IL__
E
Read command-line arguments from the specified file. The file
contains one argument per line (NOT one option per line -- some
options require additional arguments, and all arguments must be
placed on separate lines). Blank lines and lines beginning with
"#" and are ignored. Normal shell processing of arguments is not
performed, which among other things means that arguments should
not be quoted and spaces are treated as any other character.
A_
_ R_
GF__
I_L_
E may exist relative to either the current directory or the
exiftool directory unless an absolute pathname is given.
-d
%Y
-copyright<Copyright $createdate, Phil Harvey
-k (-
-pause)
Pause with the message "-- press any key --" or "-- press RETURN
--" (depending on your system) before terminating. This option is
used to prevent the command window from closing when run as a
Windows drag and drop application.
A_
_ dv
__a_
nc__
e_d _
op__
t_i_
o_n_
s
-api _
O_P_
T_[_
=_V_
A_L_
]
Set ExifTool API option. _ O_
P_T is an API option name. The option
value is set to 1 if _
=_V_
A_L is omitted. See Image::ExifTool Options
for a list of available API options. This overrides API options
set via the config file.
-common_args
Specifies that all arguments following this option are common to
all executed commands when -execute is used. This and the -config
option are the only options that may not be used inside a -@
A_
_ RG
__F_
I_L_
E. Note that by definition this option and its arguments
MUST come after all other options on the command line.
-config C
__F_
G_F_
IL__
E
Load specified configuration file instead of the default
".ExifTool_config". If used, this option must come before all
other arguments on the command line. The _C_
F_G_
F_I_
L_E name may contain
a directory specification (otherwise the file must exist in the
current directory), or may be set to an empty string ("") to
disable loading of the config file. See the sample configuration
file and "config.html" in the full ExifTool distribution for more
information about the ExifTool configuration file.
-echo[_
N_U_
M] _
TE__
X_T
Echo text to stdout (--echo or -echo1) or stderr (-
-echo2). Text is
output as the command line is parsed, before the processing of any
input files. _N_
U_M may also be 3 or 4 to output text (to stdout or
stderr respectively) after processing is complete.
-execute[_
N_
U_M]
Execute command for all arguments up to this point on the command
line. Allows multiple commands to be executed from a single
command line. N__
U_M is an optional number that is echoed in the
"{ready}" message when using the -stay_open feature.
-srcfile _
F_M_
T
Specify a different source file to be processed based on the name
of the original _
F_I_
L_E. This may be useful in some special
-- ExifTool 9.59 -- 26
situations for processing related preview images or sidecar files.
See the -w option for a description of the _ F_
M_T syntax. Note that
file name _ F_
M_T strings for all options are based on the original
F_
_ I_
L_E specified from the command line, not the name of the source
file specified by -srcfile.
A _
F_M_
T of "@" may be used to represent the original _F_
I_L_
E, which may
be useful when specifying multiple -srcfile options (ie. to fall
back to processing the original _F_
I_L_
E if no sidecar exists).
-stay_open _ F_L_
A_G
If _ F_
LA__
G is 1 or "True", causes exiftool keep reading from the -@
A_
_ RG
__F_
IL__
E even after reaching the end of file. This feature allows
calling applications to pre-load exiftool, thus avoiding the
overhead of loading exiftool for each command. The procedure is
as follows:
3) Write "-execute\n" to _ A_
R_G_
F_I_
L_E, where "\n" represents a newline
sequence. (Note: You may need to flush your write buffers here if
using buffered output.) Exiftool will then execute the command
with the arguments received up to this point, send a "{ready}"
message to stdout when done (unless the -q or -T option is used),
and continue trying to read arguments for the next command from
A_
_ R_
G_F_
I_LE
_. To aid in command/response synchronization, any number
appended to the "-execute" option is echoed in the "{ready}"
message. For example, "-execute613" results in "{ready613}".
5) Write "-stay_open\nFalse\n" to _
A_R_
G_F_
I_L_
E when done. This will
cause exiftool to process any remaining command-line arguments
then exit normally.
The input A
__R_
G_F_
I_L_
E may be changed at any time before step 5 above
by writing the following lines to the currently open _ A_
R_G_
F_I_
L_E:
-stay_open
True
-@
NEWARGFILE
This causes _ AR
__G_
F_I_
L_E to be closed, and _ N_
E_W_
AR__
G_F_
I_L_
E to be kept open.
(Without the -stay_open here, exiftool would have returned to
reading arguments from _ A_
R_G_
F_I_
L_E after reaching the end of
N_
_ E_
W_A_
R_G_
FI__
L_E.)
READING EXAMPLES
Note: Beware when cutting and pasting these examples into your
terminal! Some characters such as single and double quotes and hyphens
may have been changed into similar-looking yet functionally-different
characters by the text formatter used to display this documentation.
Also note that Windows users must use double quotes instead of single
quotes as below around arguments containing special characters.
WRITING EXAMPLES
Note that quotes are necessary around arguments which contain certain
special characters such as ">", "<" or any white space. These quoting
techniques are shell dependent, but the examples below will work for
most Unix shells. With the Windows cmd shell however, double quotes
should be used (ie. -Comment="This is a new comment").
exiftool -hierarchicalkeywords=’{keyword=one,children={keyword=B}}’
Write structured XMP information. See
<http://owl.phy.queensu.ca/˜phil/exiftool/struct.html> for more
details.
-- ExifTool 9.59 -- 30
COPYING EXAMPLES
These examples demonstrate the ability to copy tag values between
files.
RENAMING EXAMPLES
By writing the "FileName" and "Directory" tags, files are renamed
and/or moved to new directories. This can be particularly useful and
powerful for organizing files by date when combined with the -d option.
New directories are created as necessary, but existing files will not
be overwritten. The format codes %d, %f and %e may be used in the new
file name to represent the directory, name and extension of the
original file, and %c may be used to add a copy number if the file
already exists (see the -w option for details). Note that if used
within a date format string, an extra ’%’ must be added to pass these
codes through the date/time parser. (And further note that in a
Windows batch file, all ’%’ characters must also be escaped, so in this
-- ExifTool 9.59 -- 32
extreme case ’%%%%f’ is necessary to pass a simple ’%f’ through the two
levels of parsing.) See
<http://owl.phy.queensu.ca/˜phil/exiftool/filename.html> for additional
documentation and examples.
GEOTAGGING EXAMPLES
ExifTool implements geotagging via 3 special tags: Geotag (which for
convenience is also implemented as an exiftool option), Geosync and
Geotime. The examples below highlight some geotagging features. See
<http://owl.phy.queensu.ca/˜phil/exiftool/geotag.html> for additional
documentation.
PIPING EXAMPLES
cat a.jpg | exiftool -
Extract information from stdin.
DIAGNOSTICS
The exiftool application exits with a status of 0 on success, or 1 if
an error occured or if all files failed the -if condition.
AUTHOR
Copyright 2003-2014, Phil Harvey
SEE ALSO
I_
_ m_
ag__
e_:_
:_Ex
__i_
f_T_
o_o_
l(3pm), _ I_
m_a_
g_e_
:_:_
E_x_
i_f_
T_o_
o_l_
:_:_
T_a_
g_N_
a_m_
e_s(3pm),
I_
_ m_
ag__
e_:_
:_Ex
__i_
f_T_
o_o_
l_:_
:_Sh
__o_
r_t_
c_u_
t_s(3pm), Image::ExifTool::Shift.pl