.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "EXIFTOOL 1p" .TH EXIFTOOL 1p "2014-10-15" "perl v5.20.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" exiftool \- Read and write meta information in files .SH "SYNOPSIS" .IX Header "SYNOPSIS" .IP "\fBexiftool\fR [\fI\s-1OPTIONS\s0\fR] [\-\fI\s-1TAG\s0\fR...] [\-\-\fI\s-1TAG\s0\fR...] \fI\s-1FILE\s0\fR..." 4 .IX Item "exiftool [OPTIONS] [-TAG...] [--TAG...] FILE..." .PD 0 .IP "\fBexiftool\fR [\fI\s-1OPTIONS\s0\fR] \-\fI\s-1TAG\s0\fR[+\-<]=[\fI\s-1VALUE\s0\fR]... \fI\s-1FILE\s0\fR..." 4 .IX Item "exiftool [OPTIONS] -TAG[+-<]=[VALUE]... FILE..." .IP "\fBexiftool\fR [\fI\s-1OPTIONS\s0\fR] \fB\-tagsFromFile\fR \fI\s-1SRCFILE\s0\fR [\-\fI\s-1SRCTAG\s0\fR[>\fI\s-1DSTTAG\s0\fR]...] \fI\s-1FILE\s0\fR..." 4 .IX Item "exiftool [OPTIONS] -tagsFromFile SRCFILE [-SRCTAG[>DSTTAG]...] FILE..." .IP "\fBexiftool\fR [ \fB\-ver\fR | \fB\-list\fR[\fBw\fR|\fBf\fR|\fBr\fR|\fBwf\fR|\fBg\fR[\fI\s-1NUM\s0\fR]|\fBd\fR|\fBx\fR] ]" 4 .IX Item "exiftool [ -ver | -list[w|f|r|wf|g[NUM]|d|x] ]" .PD .PP For specific examples, see the \s-1EXAMPLES\s0 sections below. .PP This documentation is displayed if exiftool is run without an input \fI\s-1FILE\s0\fR when one is expected. .SH "DESCRIPTION" .IX Header "DESCRIPTION" A command-line interface to Image::ExifTool, used for reading and writing meta information in a variety of file types. \fI\s-1FILE\s0\fR is one or more source file names, directory names, or \f(CW\*(C`\-\*(C'\fR 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 \fB\-w\fR). .PP To write or delete metadata, tag values are assigned using the \&\-\fI\s-1TAG\s0\fR=[\fI\s-1VALUE\s0\fR] syntax, or the \fB\-geotag\fR option. To copy or move metadata, the \fB\-tagsFromFile\fR feature is used. By default the original files are preserved with \f(CW\*(C`_original\*(C'\fR appended to their names \*(-- be sure to verify that the new files are \s-1OK\s0 before erasing the originals. Once in write mode, exiftool will ignore any read-specific options. .PP Note: If \fI\s-1FILE\s0\fR 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 \fB\-ext\fR option may be used to force processing of files with any extension. .PP Below is a list of file types and meta information formats currently supported by ExifTool (r = read, w = write, c = create): .PP .Vb 10 \& File Types \& \-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\- \& 3FR r | EIP r | LA r | ORF r/w | RTF r \& 3G2 r/w | EPS r/w | LFP r | OTF r | RW2 r/w \& 3GP r/w | EPUB r | LNK r | PAC r | RWL r/w \& ACR r | ERF r/w | M2TS r | PAGES r | RWZ r \& AFM r | EXE r | M4A/V r/w | PBM r/w | RM r \& AI r/w | EXIF r/w/c | MEF r/w | PCD r | SEQ r \& AIFF r | EXR r | MIE r/w/c | PDB r | SO r \& APE r | EXV r/w/c | MIFF r | PDF r/w | SR2 r/w \& ARW r/w | F4A/V r/w | MKA r | PEF r/w | SRF r \& ASF r | FFF r/w | MKS r | PFA r | SRW r/w \& AVI r | FLA r | MKV r | PFB r | SVG r \& AZW r | FLAC r | MNG r/w | PFM r | SWF r \& BMP r | FLV r | MOBI r | PGF r | THM r/w \& BTF r | FPF r | MODD r | PGM r/w | TIFF r/w \& CHM r | FPX r | MOS r/w | PLIST r | TORRENT r \& COS r | GIF r/w | MOV r/w | PICT r | TTC r \& CR2 r/w | GZ r | MP3 r | PMP r | TTF r \& CRW r/w | HDP r/w | MP4 r/w | PNG r/w | VRD r/w/c \& CS1 r/w | HDR r | MPC r | PPM r/w | VSD r \& DCM r | HTML r | MPG r | PPT r | WAV r \& DCP r/w | ICC r/w/c | MPO r/w | PPTX r | WDP r/w \& DCR r | IDML r | MQV r/w | PS r/w | WEBP r \& DFONT r | IIQ r/w | MRW r/w | PSB r/w | WEBM r \& DIVX r | IND r/w | MXF r | PSD r/w | WMA r \& DJVU r | INX r | NEF r/w | PSP r | WMV r \& DLL r | ITC r | NRW r/w | QTIF r/w | WV r \& DNG r/w | J2C r | NUMBERS r | RA r | X3F r/w \& DOC r | JNG r/w | ODP r | RAF r/w | XCF r \& DOCX r | JP2 r/w | ODS r | RAM r | XLS r \& DPX r | JPEG r/w | ODT r | RAR r | XLSX r \& DV r | K25 r | OFR r | RAW r/w | XMP r/w/c \& DVB r/w | KDC r | OGG r | RIFF r | ZIP r \& DYLIB r | KEY r | OGV r | RSRC 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) .Ve .SH "OPTIONS" .IX Header "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 \s-1NOT\s0 be combined into one argument). Contrary to standard practice, options may appear after source file names on the exiftool command line. .SS "Option Summary" .IX Subsection "Option Summary" Tag operations .PP .Vb 4 \& \-TAG or \-\-TAG Extract or exclude specified tag \& \-TAG[+\-]=[VALUE] Write new value for tag \& \-TAG[+\-]<=DATFILE Write tag value from contents of file \& \-TAG[+\-]\fI\s-1DSTTAG\s0\fR'\*(L" or \&\*(R"'\-\fI\s-1DSTTAG\s0\fR<\fI\s-1SRCTAG\s0\fR'" on the command line after \&\fB\-tagsFromFile\fR, and causes the value of \fI\s-1SRCTAG\s0\fR to be copied from \&\fI\s-1SRCFILE\s0\fR and written to \fI\s-1DSTTAG\s0\fR in \fI\s-1FILE\s0\fR. Note that this argument must be quoted to prevent shell redirection, and there is no \f(CW\*(C`=\*(C'\fR sign as when assigning new values. Source and/or destination tags may be prefixed by a group name and/or suffixed by \f(CW\*(C`#\*(C'\fR. Wildcards are allowed in both the source and destination tag names. A destination group and/or tag name of \&\f(CW\*(C`All\*(C'\fR or \f(CW\*(C`*\*(C'\fR writes to the same family 1 group and/or tag name as the source. If no destination group is specified, the information is written to the preferred group. Whitespace around the \f(CW\*(C`>\*(C'\fR or \f(CW\*(C`<\*(C'\fR is ignored. As a convenience, \f(CW\*(C`\-tagsFromFile @\*(C'\fR is assumed for any redirected tags which are specified without a prior \fB\-tagsFromFile\fR option. Copied tags may also be added or deleted from a list with arguments of the form "'\-\fI\s-1SRCTAG\s0\fR+>\fI\s-1DSTTAG\s0\fR'\*(L" or \&\*(R"'\-\fI\s-1SRCTAG\s0\fR\->\fI\s-1DSTTAG\s0\fR'". .Sp An extension of the redirection feature allows strings involving tag names to be used on the right hand side of the \f(CW\*(C`<\*(C'\fR symbol with the syntax "'\-\fI\s-1DSTTAG\s0\fR<\fI\s-1STR\s0\fR'", where tag names in \fI\s-1STR\s0\fR are prefixed with a \f(CW\*(C`$\*(C'\fR symbol. See the \fB\-p\fR option for more details about this syntax. Strings starting with a \f(CW\*(C`=\*(C'\fR sign must insert a single space after the \f(CW\*(C`<\*(C'\fR to avoid confusion with the \f(CW\*(C`<=\*(C'\fR operator which sets the tag value from the contents of a file. A single space at the start of the string is removed if it exists, but all other whitespace in the string is preserved. See note 8 below about using shortcuts or wildcards with the redirection feature. .Sp See \*(L"\s-1COPYING EXAMPLES\*(R"\s0 for examples using \fB\-tagsFromFile\fR. .Sp Notes: .Sp 1) Some tags (generally tags which may affect the appearance of the image) are considered \*(L"unsafe\*(R" to write, and are only copied if specified explicitly (ie. no wildcards). See the tag name documentation for more details about \&\*(L"unsafe\*(R" tags. .Sp 2) Be aware of the difference between excluding a tag from being copied (\-\-\fI\s-1TAG\s0\fR), and deleting a tag (\-\fI\s-1TAG\s0\fR=). Excluding a tag prevents it from being copied to the destination image, but deleting will remove a pre-existing tag from the image. .Sp 3) The maker note information is copied as a block, so it isn't affected like other information by subsequent tag assignments on the command line. Also, since the PreviewImage referenced from the maker notes may be rather large, it is not copied, and must be transferred separately if desired. .Sp 4) The order of operations is to copy all specified tags at the point of the \&\fB\-tagsFromFile\fR option in the command line. Any tag assignment to the right of the \fB\-tagsFromFile\fR option is made after all tags are copied. For example, new tag values are set in the order One, Two, Three then Four with this command: .Sp .Vb 1 \& exiftool \-One=1 \-tagsFromFile s.jpg \-Two \-Four=4 \-Three d.jpg .Ve .Sp This is significant in the case where an overlap exists between the copied and assigned tags because later operations may override earlier ones. .Sp 5) The normal behaviour of copied tags differs subtly from that of assigned tags for list-type tags. When copying to a list, each copied tag overrides any previous operations on the list. While this avoids duplicate list items when copying groups of tags from a file containing redundant information, it also prevents values of different tags from being copied into the same list when this is the intent. So a \fB\-addTagsFromFile\fR option is provided which allows copying of multiple tags into the same list. eg) .Sp .Vb 1 \& exiftool \-addtagsfromfile @ \*(Aq\-subject out.args \& exiftool \-@ out.args dst.jpg .Ve .Sp Note: Be careful when copying information with this technique since it is easy to write tags which are normally considered \*(L"unsafe\*(R". For instance, the FileName and Directory tags are excluded in the example above to avoid renaming and moving the destination file. Also note that the second command above will produce warning messages for any tags which are not writable. .IP "\fB\-b\fR (\fB\-binary\fR)" 5 .IX Item "-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 \fB\-b\fR option. May be combined with \f(CW\*(C`\-j\*(C'\fR, \f(CW\*(C`\-php\*(C'\fR or \f(CW\*(C`\-X\*(C'\fR to extract binary data in \s-1JSON, PHP\s0 or \s-1XML\s0 format. .IP "\fB\-c\fR \fI\s-1FMT\s0\fR (\fB\-coordFormat\fR)" 5 .IX Item "-c FMT (-coordFormat)" Set the print format for \s-1GPS\s0 coordinates. \fI\s-1FMT\s0\fR uses the same syntax as the \f(CW\*(C`printf\*(C'\fR 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: .Sp .Vb 6 \& FMT Output \& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& "%d deg %d\*(Aq %.2f"\e" 54 deg 59\*(Aq 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 .Ve .Sp Notes: .Sp 1) To avoid loss of precision, the default coordinate format is different when copying tags using the \fB\-tagsFromFile\fR option. .Sp 2) If the hemisphere is known, a reference direction (N, S, E or W) is appended to each printed coordinate, but adding a \f(CW\*(C`+\*(C'\fR to the format specifier (eg. \f(CW\*(C`%+.6f\*(C'\fR) prints a signed coordinate instead. .Sp 3) This print formatting may be disabled with the \fB\-n\fR option to extract coordinates as signed decimal degrees. .IP "\fB\-charset\fR [[\fI\s-1TYPE\s0\fR=]\fI\s-1CHARSET\s0\fR]" 5 .IX Item "-charset [[TYPE=]CHARSET]" If \fI\s-1TYPE\s0\fR is \f(CW\*(C`ExifTool\*(C'\fR 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 \f(CW\*(C`UTF8\*(C'\fR. If no \fI\s-1CHARSET\s0\fR is given, a list of available character sets is returned. Valid \fI\s-1CHARSET\s0\fR values are: .Sp .Vb 10 \& CHARSET Alias(es) Description \& \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& UTF8 cp65001, UTF\-8 UTF\-8 characters (default) \& Latin cp1252, Latin1 Windows Latin1 (West European) \& Latin2 cp1250 Windows Latin2 (Central European) \& Cyrillic cp1251, Russian Windows Cyrillic \& Greek cp1253 Windows Greek \& Turkish cp1254 Windows Turkish \& Hebrew cp1255 Windows Hebrew \& Arabic cp1256 Windows Arabic \& Baltic cp1257 Windows Baltic \& Vietnam cp1258 Windows Vietnamese \& Thai cp874 Windows Thai \& MacRoman cp10000, Roman Macintosh Roman \& MacLatin2 cp10029 Macintosh Latin2 (Central Europe) \& MacCyrillic cp10007 Macintosh Cyrillic \& MacGreek cp10006 Macintosh Greek \& MacTurkish cp10081 Macintosh Turkish \& MacRomanian cp10010 Macintosh Romanian \& MacIceland cp10079 Macintosh Icelandic \& MacCroatian cp10082 Macintosh Croatian .Ve .Sp Other values of \fI\s-1TYPE\s0\fR listed below are used to specify the internal encoding of various meta information formats. .Sp .Vb 8 \& TYPE Description Default \& \-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\- \& EXIF Internal encoding of EXIF "ASCII" strings (none) \& ID3 Internal encoding of ID3v1 information Latin \& IPTC Internal IPTC encoding to assume when Latin \& IPTC:CodedCharacterSet is not defined \& Photoshop Internal encoding of Photoshop IRB strings Latin \& QuickTime Internal encoding of QuickTime strings MacRoman .Ve .Sp See for more information about coded character sets. .IP "\fB\-csv\fR[=\fI\s-1CSVFILE\s0\fR]" 5 .IX Item "-csv[=CSVFILE]" Export information in \s-1CSV\s0 format, or import information if \fI\s-1CSVFILE\s0\fR is specified. When importing, the \s-1CSV\s0 file must be in exactly the same format as the exported file. The first row of the \fI\s-1CSVFILE\s0\fR 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 \*(L"SourceFile\*(R" column specifies the files associated with each row of information (a SourceFile of \*(L"*\*(R" may be used to match any source file name). The following examples demonstrate basic use of this option: .Sp .Vb 2 \& # generate CSV file with common tags from all images in a directory \& exiftool \-common \-csv dir > out.csv \& \& # update metadata for all images in a directory from CSV file \& exiftool \-csv=a.csv dir .Ve .Sp Empty values are ignored when importing. Also, FileName and Directory columns are ignored if they exist (ie. ExifTool will not attempt to write these tags with a \s-1CSV\s0 import). To force a tag to be deleted, use the \fB\-f\fR option and set the value to \*(L"\-\*(R" in the \s-1CSV\s0 file (or to the MissingTagValue if this \s-1API\s0 option was used). Multiple databases may be imported in a single command. .Sp When exporting a \s-1CSV\s0 file, the \fB\-g\fR or \fB\-G\fR option to add group names to the tag headings. If the \fB\-a\fR option is used to allow duplicate tag names, the duplicate tags are only included in the \s-1CSV\s0 output if the column headings are unique. Adding the \fB\-G4\fR option ensures a unique column heading for each tag. When exporting specific tags, the \s-1CSV\s0 columns are arranged in the same order as the specified tags provided the column headings exactly match the specified tag names, otherwise the columns are sorted in alphabetical order. .Sp When importing from a \s-1CSV\s0 file, only files specified on the command line are processed. Any extra entries in the \s-1CSV\s0 file are ignored. .Sp List-type tags are stored as simple strings in a \s-1CSV\s0 file, but the \fB\-sep\fR option may be used to split them back into separate items when importing. .Sp Special feature: \fB\-csv\fR+=\fI\s-1CSVFILE\s0\fR may be used to add items to existing lists. This affects only list-type tags. Also applies to the \fB\-j\fR option. .Sp Note that this option is fundamentally different than all other output format options because it requires information from all input files to be buffered in memory before the output is written. This may result in excessive memory usage when processing a very large number of files with a single command. Also, it makes this option incompatible with the \fB\-w\fR option. .IP "\fB\-d\fR \fI\s-1FMT\s0\fR (\fB\-dateFormat\fR)" 5 .IX Item "-d FMT (-dateFormat)" Set the format for date/time tag values. The specifics of the \fI\s-1FMT\s0\fR syntax are system dependent \*(-- consult the \f(CW\*(C`strftime\*(C'\fR man page on your system for details. The default format is equivalent to \*(L"%Y:%m:%d \f(CW%H:\fR%M:%S\*(R". This option has no effect on date-only or time-only tags and ignores timezone information if present. Only one \fB\-d\fR 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. .IP "\fB\-D\fR (\fB\-decimal\fR)" 5 .IX Item "-D (-decimal)" Show tag \s-1ID\s0 number in decimal when extracting information. .IP "\fB\-E\fR, \fB\-ex\fR (\fB\-escapeHTML\fR, \fB\-escapeXML\fR)" 5 .IX Item "-E, -ex (-escapeHTML, -escapeXML)" Escape characters in output values for \s-1HTML \s0(\fB\-E\fR) or \s-1XML \s0(\fB\-ex\fR). For \&\s-1HTML,\s0 all characters with Unicode code points above U+007F are escaped as well as the following 5 characters: & (&) ' (') " (") > (>) and < (<). For \s-1XML,\s0 only these 5 characters are escaped. The \fB\-E\fR option is implied with \fB\-h\fR, and \fB\-ex\fR is implied with \&\fB\-X\fR. The inverse conversion is applied when writing tags. .IP "\fB\-f\fR (\fB\-forcePrint\fR)" 5 .IX Item "-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 (\f(CW\*(C`\-\*(C'\fR) is printed for the value of any missing tag (but this may be configured via the \&\s-1API\s0 MissingTagValue option). May also be used to add a 'flags' attribute to the \fB\-listx\fR output, or to allow tags to be deleted when writing with the \&\fB\-csv\fR=\fI\s-1CSVFILE\s0\fR feature. .IP "\fB\-g\fR[\fI\s-1NUM\s0\fR][:\fI\s-1NUM\s0\fR...] (\fB\-groupHeadings\fR)" 5 .IX Item "-g[NUM][:NUM...] (-groupHeadings)" Organize output by tag group. \fI\s-1NUM\s0\fR 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 \f(CW\*(C`Main:\*(C'\fR and collapsing adjacent identical group names, but this can be avoided by placing a colon before the first family number (eg. \fB\-g:3:1\fR). If \fI\s-1NUM\s0\fR is not specified, \fB\-g0\fR is assumed. Use the \fB\-listg\fR option to list group names for a specified family. .IP "\fB\-G\fR[\fI\s-1NUM\s0\fR][:\fI\s-1NUM\s0\fR...] (\fB\-groupNames\fR)" 5 .IX Item "-G[NUM][:NUM...] (-groupNames)" Same as \fB\-g\fR but print group name for each tag. .IP "\fB\-h\fR (\fB\-htmlFormat\fR)" 5 .IX Item "-h (-htmlFormat)" Use \s-1HTML\s0 table formatting for output. Implies the \fB\-E\fR option. The formatting options \fB\-D\fR, \fB\-H\fR, \fB\-g\fR, \fB\-G\fR, \fB\-l\fR and \fB\-s\fR may be used in combination with \fB\-h\fR to influence the \s-1HTML\s0 format. .IP "\fB\-H\fR (\fB\-hex\fR)" 5 .IX Item "-H (-hex)" Show tag \s-1ID\s0 number in hexadecimal when extracting information. .IP "\fB\-htmlDump\fR[\fI\s-1OFFSET\s0\fR]" 5 .IX Item "-htmlDump[OFFSET]" Generate a dynamic web page containing a hex dump of the \s-1EXIF\s0 information. This can be a very powerful tool for low-level analysis of \s-1EXIF\s0 information. The \fB\-htmlDump\fR option is also invoked if the \fB\-v\fR and \fB\-h\fR options are used together. The verbose level controls the maximum length of the blocks dumped. An \fI\s-1OFFSET\s0\fR may be given to specify the base for displayed offsets. If not provided, the \s-1EXIF/TIFF\s0 base offset is used. Use \&\fB\-htmlDump0\fR for absolute offsets. Currently only \s-1EXIF/TIFF\s0 and \s-1JPEG\s0 information is dumped, but the \-u option can be used to give a raw hex dump of other file formats. .IP "\fB\-j\fR[=\fI\s-1JSONFILE\s0\fR] (\fB\-json\fR)" 5 .IX Item "-j[=JSONFILE] (-json)" Use \s-1JSON \s0(JavaScript Object Notation) formatting for console output, or import \s-1JSON\s0 file if \fI\s-1JSONFILE\s0\fR is specified. This option may be combined with \fB\-g\fR to organize the output into objects by group, or \fB\-G\fR to add group names to each tag. List-type tags with multiple items are output as \&\s-1JSON\s0 arrays unless \fB\-sep\fR is used. By default \s-1XMP\s0 structures are flattened into individual tags in the \s-1JSON\s0 output, but the original structure may be preserved with the \fB\-struct\fR option (this also causes all list-type \s-1XMP\s0 tags to be output as \s-1JSON\s0 arrays, otherwise single-item lists are output as simple strings). The \fB\-a\fR option is implied if the \fB\-g\fR or \fB\-G\fR options are used, otherwise it is ignored and duplicate tags are suppressed. Adding the \fB\-D\fR or \fB\-H\fR option changes tag values to \s-1JSON\s0 objects with \*(L"val\*(R" and \&\*(L"id\*(R" fields, and adding \fB\-l\fR adds a \*(L"desc\*(R" field, and a \*(L"num\*(R" field if the numerical value is different from the converted \*(L"val\*(R". The \fB\-b\fR option may be added to output binary data, encoded in base64 if necessary (indicated by \&\*(L"base64:\*(R" as the first 7 bytes of the value). The \s-1JSON\s0 output is \s-1UTF\-8\s0 regardless of any \fB\-L\fR or \fB\-charset\fR option setting, but the \s-1UTF\-8\s0 validation is disabled if a character set other than \s-1UTF\-8\s0 is specified. .Sp If \fI\s-1JSONFILE\s0\fR 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 \&\*(L"SourceFile\*(R" entry in each \s-1JSON\s0 object associates the information with a specific target file (see the \fB\-csv\fR option for details). The imported \&\s-1JSON\s0 file must have the same format as the exported \s-1JSON\s0 files with the exception that the \fB\-g\fR option is not compatible with the import file format (use \fB\-G\fR instead). Additionally, tag names in the input \s-1JSON\s0 file may be suffixed with a \f(CW\*(C`#\*(C'\fR to disable print conversion. .IP "\fB\-l\fR (\fB\-long\fR)" 5 .IX Item "-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 \s-1XML, JSON\s0 or \s-1PHP\s0 output when \fB\-X\fR, \fB\-j\fR or \fB\-php\fR is used. May also be combined with \fB\-listf\fR, \fB\-listr\fR or \fB\-listwf\fR to add descriptions of the file types. .IP "\fB\-L\fR (\fB\-latin\fR)" 5 .IX Item "-L (-latin)" Use Windows Latin1 encoding (cp1252) for output tag values instead of the default \s-1UTF\-8. \s0 When writing, \fB\-L\fR specifies that input text values are Latin1 instead of \s-1UTF\-8. \s0 Equivalent to \f(CW\*(C`\-charset latin\*(C'\fR. .IP "\fB\-lang\fR [\fI\s-1LANG\s0\fR]" 5 .IX Item "-lang [LANG]" Set current language for tag descriptions and converted values. \fI\s-1LANG\s0\fR is \&\f(CW\*(C`de\*(C'\fR, \f(CW\*(C`fr\*(C'\fR, \f(CW\*(C`ja\*(C'\fR, etc. Use \fB\-lang\fR with no other arguments to get a list of available languages. The default language is \f(CW\*(C`en\*(C'\fR if \fB\-lang\fR is not specified. Note that tag/group names are always English, independent of the \fB\-lang\fR setting, and translation of warning/error messages has not yet been implemented. May also be combined with \fB\-listx\fR to output descriptions in one language only. .Sp By default, ExifTool uses \s-1UTF\-8\s0 encoding for special characters, but the the \fB\-L\fR or \fB\-charset\fR option may be used to invoke other encodings. .Sp Currently, the language support is not complete, but users are welcome to help improve this by submitting their own translations. To submit a set of translations, first use the \fB\-listx\fR option and redirect the output to a file to generate an \s-1XML\s0 tag database, then add entries for other languages, zip this file, and email it to phil at owl.phy.queensu.ca for inclusion in ExifTool. .IP "\fB\-listItem\fR \fI\s-1INDEX\s0\fR" 5 .IX Item "-listItem INDEX" For list-type tags, this causes only the item with the specified index to be extracted. \fI\s-1INDEX\s0\fR is 0 for the first item in the list. Negative indices may also be used to reference items from the end of the list. Has no effect on single-valued tags, when writing or copying, or in a \fB\-if\fR condition. .IP "\fB\-n\fR (\fB\-\-printConv\fR)" 5 .IX Item "-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 \&\fB\-n\fR option disables this print conversion for all tags. For example: .Sp .Vb 4 \& > exiftool \-Orientation \-S a.jpg \& Orientation: Rotate 90 CW \& > exiftool \-Orientation \-S \-n a.jpg \& Orientation: 6 .Ve .Sp The print conversion may also be disabled on a per-tag basis by suffixing the tag name with a \f(CW\*(C`#\*(C'\fR character: .Sp .Vb 3 \& > exiftool \-Orientation# \-Orientation \-S a.jpg \& Orientation: 6 \& Orientation: Rotate 90 CW .Ve .Sp These techniques may also be used to disable the inverse print conversion when writing. For example, the following commands all have the same effect: .Sp .Vb 3 \& > exiftool \-Orientation=\*(AqRotate 90 CW\*(Aq a.jpg \& > exiftool \-Orientation=6 \-n a.jpg \& > exiftool \-Orientation#=6 a.jpg .Ve .IP "\fB\-p\fR \fI\s-1FMTFILE\s0\fR or \fI\s-1STR\s0\fR (\fB\-printFormat\fR)" 5 .IX Item "-p FMTFILE or STR (-printFormat)" Print output in the format specified by the given file or string (and ignore other format options). Tag names in the format file or string begin with a \&\f(CW\*(C`$\*(C'\fR symbol and may contain a leading group names and/or a trailing \f(CW\*(C`#\*(C'\fR. Case is not significant. Braces \f(CW\*(C`{}\*(C'\fR may be used around the tag name to separate it from subsequent text. Use \f(CW$$\fR to represent a \f(CW\*(C`$\*(C'\fR symbol, and \&\f(CW$/\fR for a newline. Multiple \fB\-p\fR options may be used, each contributing a line of text to the output. Lines beginning with \f(CW\*(C`#[HEAD]\*(C'\fR and \&\f(CW\*(C`#[TAIL]\*(C'\fR are output only for the first and last processed files respectively. Lines beginning with \f(CW\*(C`#[BODY]\*(C'\fR and lines not beginning with \&\f(CW\*(C`#\*(C'\fR are output for each processed file. Other lines beginning with \f(CW\*(C`#\*(C'\fR are ignored. For example, this format file: .Sp .Vb 5 \& # this is a comment line \& #[HEAD]\-\- Generated by ExifTool $exifToolVersion \-\- \& File: $FileName \- $DateTimeOriginal \& (f/$Aperture, ${ShutterSpeed}s, ISO $EXIF:ISO) \& #[TAIL]\-\- end \-\- .Ve .Sp with this command: .Sp .Vb 1 \& exiftool \-p test.fmt a.jpg b.jpg .Ve .Sp produces output like this: .Sp .Vb 6 \& \-\- Generated by ExifTool 9.74 \-\- \& File: a.jpg \- 2003:10:31 15:44:19 \& (f/5.6, 1/60s, ISO 100) \& File: b.jpg \- 2006:05:23 11:57:38 \& (f/8.0, 1/13s, ISO 100) \& \-\- end \-\- .Ve .Sp When \fB\-ee\fR (\fB\-extractEmbedded\fR) is combined with \fB\-p\fR, embedded documents are effectively processed as separate input files. .Sp If a specified tag does not exist, a minor warning is issued and the line with the missing tag is not printed. However, the \fB\-f\fR option may be used to set the value of missing tags to '\-' (but this may be configured via the MissingTagValue \s-1API\s0 option), or the \fB\-m\fR option may be used to ignore minor warnings and leave the missing values empty. .Sp An advanced formatting feature allows an arbitrary Perl expression to be applied to the value of any tag by placing it inside the braces after a semicolon following the tag name. The expression has access to the value of this tag through the default input variable (\f(CW$_\fR), and the full \s-1API\s0 through the current ExifTool object (\f(CW$self\fR). It may contain any valid Perl code, including translation (\f(CW\*(C`tr///\*(C'\fR) and substitution (\f(CW\*(C`s///\*(C'\fR) operations, but note that braces within the expression must be balanced. The example below prints the camera Make with spaces translated to underlines, and multiple consecutive underlines replaced by a single underline: .Sp .Vb 1 \& exiftool \-p \*(Aq${make;tr/ /_/;s/_\|_+/_/g}\*(Aq image.jpg .Ve .Sp A default expression of \f(CW\*(C`tr(/\e\e?*:|"<>\e0)()d\*(C'\fR is assumed if the expression is empty, which removes the characters / \e ? * : | < > and null from the printed value. .IP "\fB\-php\fR" 5 .IX Item "-php" Format output as a \s-1PHP\s0 Array. The \fB\-g\fR, \fB\-G\fR, \fB\-D\fR, \fB\-H\fR, \fB\-l\fR, \&\fB\-sep\fR and \fB\-struct\fR options combine with \fB\-php\fR, and duplicate tags are handled in the same way as with the \fB\-json\fR option. As well, the \fB\-b\fR option may be added to output binary data. Here is a simple example showing how this could be used in a \s-1PHP\s0 script: .Sp .Vb 4 \& .Ve .IP "\fB\-s\fR[\fI\s-1NUM\s0\fR] (\fB\-short\fR)" 5 .IX Item "-s[NUM] (-short)" Short output format. Prints tag names instead of descriptions. Add \fI\s-1NUM\s0\fR or up to 3 \fB\-s\fR options for even shorter formats: .Sp .Vb 3 \& \-s1 or \-s \- print tag names instead of descriptions \& \-s2 or \-s \-s \- no extra spaces to column\-align values \& \-s3 or \-s \-s \-s \- print values only (no tag names) .Ve .Sp Also effective when combined with \fB\-t\fR, \fB\-h\fR, \fB\-X\fR or \fB\-listx\fR options. .IP "\fB\-S\fR (\fB\-veryShort\fR)" 5 .IX Item "-S (-veryShort)" Very short format. The same as \fB\-s2\fR (or two \fB\-s\fR options). Tag names are printed instead of descriptions, and no extra spaces are added to column-align values. .IP "\fB\-sep\fR \fI\s-1STR\s0\fR (\fB\-separator\fR)" 5 .IX Item "-sep STR (-separator)" Specify separator string for items in list-type tags. When reading, the default is to join list items with \*(L", \*(R". When writing, this option causes values assigned to list-type tags to be split into individual items at each substring matching \fI\s-1STR\s0\fR (otherwise they are not split by default). Space characters in \fI\s-1STR\s0\fR match zero or more whitespace characters in the value. .Sp 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. .IP "\fB\-sort\fR" 5 .IX Item "-sort" Sort output by tag description, or by tag name if the \fB\-s\fR option is used. Tags are sorted within each group when combined with the \fB\-g\fR or \fB\-G\fR option. When sorting by description, the sort order will depend on the \&\fB\-lang\fR option setting. Without the \fB\-sort\fR 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. .IP "\fB\-struct\fR, \fB\-\-struct\fR" 5 .IX Item "-struct, --struct" Output structured \s-1XMP\s0 information instead of flattening to individual tags. This option works well when combined with the \s-1XML \s0(\fB\-X\fR) and \s-1JSON \s0(\fB\-j\fR) output formats. For other output formats, the structures are serialized into the same format as when writing structured information (see for details). When copying, structured tags are copied by default unless \fB\-\-struct\fR is used to disable this feature (although flattened tags may still be copied by specifying them individually unless \fB\-struct\fR is used). These options have no effect when assigning new values since both flattened and structured tags may always be used when writing. .IP "\fB\-t\fR (\fB\-tab\fR)" 5 .IX Item "-t (-tab)" Output a tab-delimited list of description/values (useful for database import). May be combined with \fB\-s\fR to print tag names instead of descriptions, or \fB\-S\fR to print tag values only, tab-delimited on a single line. The \fB\-t\fR option may also be used to add tag table information to the \&\fB\-X\fR option output. .IP "\fB\-T\fR (\fB\-table\fR)" 5 .IX Item "-T (-table)" Output tag values in table form. Equivalent to \fB\-t \-S \-q \-f\fR. .IP "\fB\-v\fR[\fI\s-1NUM\s0\fR] (\fB\-verbose\fR)" 5 .IX Item "-v[NUM] (-verbose)" Print verbose messages. \fI\s-1NUM\s0\fR specifies the level of verbosity in the range 0\-5, with higher numbers being more verbose. If \fI\s-1NUM\s0\fR is not given, then each \fB\-v\fR 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 \fB\-v0\fR 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 \fB\-progress\fR option. .IP "\fB\-w\fR[+|!] \fI\s-1EXT\s0\fR or \fI\s-1FMT\s0\fR (\fB\-textOut\fR)" 5 .IX Item "-w[+|!] EXT or FMT (-textOut)" Write console output to files with names ending in \fI\s-1EXT\s0\fR, 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 \fI\s-1EXT\s0\fR if it doesn't already contain one). Alternatively, a \fI\s-1FMT\s0\fR string may be used to give more control over the output file name and directory. In the format string, \f(CW%d\fR, \f(CW%f\fR and \f(CW%e\fR represent the directory, filename and extension of the source file, and \f(CW%c\fR represents a copy number which is automatically incremented if the file already exists. \f(CW%d\fR includes the trailing '/' if necessary, but \f(CW%e\fR does not include the leading '.'. For example: .Sp .Vb 4 \& \-w %d%f.txt # same effect as "\-w txt" \& \-w dir/%f_%e.out # write files to "dir" as "FILE_EXT.out" \& \-w dir2/%d%f.txt # write to "dir2", keeping dir structure \& \-w a%c.txt # write to "a.txt" or "a1.txt" or "a2.txt"... .Ve .Sp Existing files will not be overwritten unless an exclamation point is added to the option name (ie. \fB\-w!\fR or \fB\-textOut!\fR), or a plus sign to append to the existing file (ie. \fB\-w+\fR or \fB\-textOut+\fR). Both may be used (ie. \&\fB\-w+!\fR or \fB\-textOut+!\fR) to overwrite output files that didn't exist before the command was run, and append the output from multiple source files. For example, to write one output file for all source files in each directory: .Sp .Vb 1 \& exiftool \-filename \-createdate \-T \-w+! %d/out.txt \-r DIR .Ve .Sp Notes: .Sp 1) In a Windows \s-1BAT\s0 file the \f(CW\*(C`%\*(C'\fR character is represented by \f(CW\*(C`%%\*(C'\fR, so an argument like \f(CW\*(C`%d%f.txt\*(C'\fR is written as \f(CW\*(C`%%d%%f.txt\*(C'\fR. .Sp 2) If the argument for \fB\-w\fR does not contain a format code (%d, \f(CW%f\fR or \f(CW%e\fR), then it is interpreted as a file extension. Therefore it is not possible to specify a simple filename as an argument, so creating a single output file from multiple source files is typically done by shell redirection, ie) .Sp .Vb 1 \& exiftool FILE1 FILE2 ... > out.txt .Ve .Sp But if necessary, an empty format code may be used to force the argument to be interpreted as a format string, and the same result may be obtained without the use of shell redirection: .Sp .Vb 1 \& exiftool \-w+! %0fout.txt FILE1 FILE2 ... .Ve .Sp Advanced features: .Sp A substring of the original file name, directory or extension may be taken by specifying a field width immediately following the '%' character. If the width is negative, the substring is taken from the end. The substring position (characters to ignore at the start or end of the string) may be given by a second optional value after a decimal point. For example: .Sp .Vb 6 \& Input File Name Format Specifier Output File Name \& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& Picture\-123.jpg %7f.txt Picture.txt \& Picture\-123.jpg %\-.4f.out Picture.out \& Picture\-123.jpg %7f.%\-3f Picture.123 \& Picture\-123a.jpg Meta%\-3.1f.txt Meta123.txt .Ve .Sp For \f(CW%d\fR, the field width/position specifiers may be applied to the directory levels instead of substring position by using a colon instead of a decimal point in the format specifier. For example: .Sp .Vb 7 \& Source Dir Format Result Notes \& \-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& pics/2012/02 %2:d pics/2012/ take top 2 levels \& pics/2012/02 %\-:1d pics/2012/ up one directory level \& pics/2012/02 %:1d 2012/02/ ignore top level \& pics/2012/02 %1:1d 2012/ take 1 level after top \& /Users/phil %:2d phil/ ignore top 2 levels .Ve .Sp (Note that the root directory counts as one level when an absolute path is used as in the last example above.) .Sp For \f(CW%c\fR, these modifiers have a different effects. If a field width is given, the copy number is padded with zeros to the specified width. A leading '\-' adds a dash before the copy number, and a '+' adds an underline. By default, the copy number is omitted from the first file of a given name, but this can be changed by adding a decimal point to the modifier. For example: .Sp .Vb 8 \& \-w A%\-cZ.txt # AZ.txt, A\-1Z.txt, A\-2Z.txt ... \& \-w B%5c.txt # B.txt, B00001.txt, B00002.txt ... \& \-w C%.c.txt # C0.txt, C1.txt, C2.txt ... \& \-w D%\-.c.txt # D\-0.txt, D\-1.txt, D\-2.txt ... \& \-w E%\-.4c.txt # E\-0000.txt, E\-0001.txt, E\-0002.txt ... \& \-w F%\-.4nc.txt # F\-0001.txt, F\-0002.txt, F\-0003.txt ... \& \-w G%+c.txt # G.txt, G_1.txt G_2.txt ... \& \-w H%\-lc.txt # H.txt, H\-b.txt, H\-c.txt ... .Ve .Sp A special feature allows the copy number to be incremented for each processed file by using \f(CW%C\fR (upper case) instead of \f(CW%c\fR. This allows a sequential number to be added to output file names, even if the names are different. For \f(CW%C\fR, a copy number of zero is not omitted as it is with \f(CW%c\fR. The number before the decimal place gives the starting index, the number after the decimal place gives the field width. The following examples show the output filenames when used with the command \&\f(CW\*(C`exiftool rose.jpg star.jpg jet.jpg ...\*(C'\fR: .Sp .Vb 4 \& \-w %C%f.txt # 0rose.txt, 1star.txt, 2jet.txt \& \-w %f\-%10C.txt # rose\-10.txt, star\-11.txt, jet\-12.txt \& \-w %.3C\-%f.txt # 000\-rose.txt, 001\-star.txt, 002\-jet.txt \& \-w %57.4C%f.txt # 0057rose.txt, 0058star.txt, 0059jet.txt .Ve .Sp All format codes may be modified by 'l' or 'u' to specify lower or upper case respectively (ie. \f(CW%le\fR for a lower case file extension). When used to modify \f(CW%c\fR or \f(CW%C\fR, the numbers are changed to an alphabetical base (see example H above). Also, \f(CW%c\fR may be modified by 'n' to count using natural numbers starting from 1, instead of 0 (see example F above). .Sp This same \fI\s-1FMT\s0\fR syntax is used with the \fB\-o\fR and \fB\-tagsFromFile\fR options, although \f(CW%c\fR is only valid for output file names. .IP "\fB\-W\fR[!|+] \fI\s-1FMT\s0\fR (\fB\-tagOut\fR)" 5 .IX Item "-W[!|+] FMT (-tagOut)" This enhanced version of the \fB\-w\fR option allows a separate output file to be created for each extracted tag. The differences between \fB\-W\fR and \fB\-w\fR are as follows: .Sp 1) With \fB\-W\fR, a new output file is created for each extracted tag. .Sp 2) \fB\-W\fR supports three additional format codes: \f(CW%t\fR, \f(CW%g\fR and \f(CW%s\fR represent the tag name, group name, and suggested extension for the output file (based on the format of the data). The \f(CW%g\fR code may be followed by a single digit to specify the group family number (eg. \f(CW%g1\fR), otherwise family 0 is assumed. The substring width/position/case specifiers may be used with these format codes in exactly the same way as with \f(CW%f\fR and \f(CW%e\fR. .Sp 3) The argument for \fB\-W\fR is interpreted as a file name if it contains no format codes. (For \fB\-w\fR, this would be a file extension.) This change allows a simple file name to be specified, which, when combined with the append feature, provides a method to write metadata from multiple source files to a single output file without the need for shell redirection. .Sp 4) Adding the \fB\-v\fR option to \fB\-W\fR generates a list of the tags and output file names instead of giving a verbose dump of the entire file. (Unless appending all output to one file for each source file by using \fB\-W+\fR with an output file \fI\s-1FMT\s0\fR that does not contain \f(CW%t\fR, \f(CW$g\fR or \f(CW%s\fR.) .Sp 5) Individual list items are stored in separate files when \fB\-W\fR is combined with \fB\-b\fR, but note that for separate files to be created \f(CW%c\fR must be used in \fI\s-1FMT\s0\fR to give the files unique names. .IP "\fB\-Wext\fR \fI\s-1EXT\s0\fR, \fB\-\-Wext\fR \fI\s-1EXT\s0\fR (\fB\-tagOutExt\fR)" 5 .IX Item "-Wext EXT, --Wext EXT (-tagOutExt)" This option is used to specify the type of output file(s) written by the \&\fB\-W\fR option. An output file is written only if the suggested extension matches \fI\s-1EXT\s0\fR. Multiple \fB\-Wext\fR options may be used to write more than one type of file. Use \fB\-\-Wext\fR to write all but the specified type(s). .IP "\fB\-X\fR (\fB\-xmlFormat\fR)" 5 .IX Item "-X (-xmlFormat)" Use ExifTool-specific \s-1RDF/XML\s0 formatting for console output. Implies the \&\fB\-a\fR option, so duplicate tags are extracted. The formatting options \&\fB\-b\fR, \fB\-D\fR, \fB\-H\fR, \fB\-l\fR, \fB\-s\fR, \fB\-sep\fR, \fB\-struct\fR and \fB\-t\fR may be used in combination with \fB\-X\fR to affect the output, but note that the tag \s-1ID \&\s0(\fB\-D\fR, \fB\-H\fR and \fB\-t\fR), binary data (\fB\-b\fR) and structured output (\fB\-struct\fR) options are not effective for the short output (\fB\-s\fR). Another restriction of \fB\-s\fR is that only one tag with a given group and name may appear in the output. Note that the tag \s-1ID\s0 options (\fB\-D\fR, \fB\-H\fR and \fB\-t\fR) will produce non-standard \s-1RDF/XML\s0 unless the \fB\-l\fR option is also used. By default, list-type tags with multiple values are formatted as an \&\s-1RDF\s0 Bag, but they are combined into a single string when \fB\-s\fR or \fB\-sep\fR is used. Using \fB\-L\fR changes the \s-1XML\s0 encoding from \*(L"\s-1UTF\-8\*(R"\s0 to \*(L"windows\-1252\*(R". Other \fB\-charset\fR settings change the encoding only if there is a corresponding standard \s-1XML\s0 character set. The \fB\-b\fR option causes binary data values to be written, encoded in base64 if necessary. The \fB\-t\fR option adds tag table information to the output (table \f(CW\*(C`name\*(C'\fR, decimal tag \f(CW\*(C`id\*(C'\fR, and \f(CW\*(C`index\*(C'\fR for cases where multiple conditional tags exist with the same \&\s-1ID\s0). .Sp Note: This output is \s-1NOT\s0 the same as \s-1XMP\s0 because it uses dynamically-generated property names corresponding to the ExifTool tag names, and not the standard \s-1XMP\s0 properties. To write \s-1XMP\s0 instead, use the \&\fB\-o\fR option with an \s-1XMP\s0 extension for the output file. .PP \fIProcessing control\fR .IX Subsection "Processing control" .IP "\fB\-a\fR, \fB\-\-a\fR (\fB\-duplicates\fR, \fB\-\-duplicates\fR)" 5 .IX Item "-a, --a (-duplicates, --duplicates)" Allow (\fB\-a\fR) or suppress (\fB\-\-a\fR) duplicate tag names to be extracted. By default, duplicate tags are suppressed unless the \fB\-ee\fR or \fB\-X\fR options are used or the Duplicates option is enabled in the configuration file. .IP "\fB\-e\fR (\fB\-\-composite\fR)" 5 .IX Item "-e (--composite)" Extract existing tags only \*(-- don't calculate composite tags. .IP "\fB\-ee\fR (\fB\-extractEmbedded\fR)" 5 .IX Item "-ee (-extractEmbedded)" Extract information from embedded documents in \s-1EPS\s0 files, embedded \s-1EPS\s0 information and \s-1JPEG\s0 and Jpeg2000 images in \s-1PDF\s0 files, embedded \s-1MPF\s0 images in \s-1JPEG\s0 and \s-1MPO\s0 files, streaming metadata in \s-1AVCHD\s0 videos, and the resource fork of Mac \s-1OS\s0 files. Implies the \fB\-a\fR option. Use \fB\-g3\fR or \fB\-G3\fR to identify the originating document for extracted information. Embedded documents containing sub-documents are indicated with dashes in the family 3 group name. (eg. \f(CW\*(C`Doc2\-3\*(C'\fR is the 3rd sub-document of the 2nd embedded document.) Note that this option may increase processing time substantially, especially for \s-1PDF\s0 files with many embedded images. .IP "\fB\-ext\fR \fI\s-1EXT\s0\fR, \fB\-\-ext\fR \fI\s-1EXT\s0\fR (\fB\-extension\fR)" 5 .IX Item "-ext EXT, --ext EXT (-extension)" Process only files with (\fB\-ext\fR) or without (\fB\-\-ext\fR) a specified extension. There may be multiple \fB\-ext\fR and \fB\-\-ext\fR options. Extensions may begin with a leading '.', and case is not significant. For example: .Sp .Vb 5 \& exiftool \-ext .JPG DIR # process only JPG files \& exiftool \-\-ext cr2 \-\-ext dng DIR # supported files but CR2/DNG \& exiftool \-\-ext . DIR # ignore if no extension \& exiftool \-ext "*" DIR # process all files \& exiftool \-ext "*" \-\-ext xml DIR # process all but XML files .Ve .Sp The extension may be \f(CW"*"\fR as in the last two examples above to force processing files with any extension (not just supported files). .Sp Using this option has two main advantages over specifying \f(CW\*(C`*.\f(CIEXT\f(CW\*(C'\fR on the command line: 1) It applies to files in subdirectories when combined with the \fB\-r\fR option. 2) The \fB\-ext\fR option is case-insensitive, which is useful when processing files on case-sensitive filesystems. .IP "\fB\-F\fR[\fI\s-1OFFSET\s0\fR] (\fB\-fixBase\fR)" 5 .IX Item "-F[OFFSET] (-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 \fI\s-1OFFSET\s0\fR to be specified for adjusting the maker notes base offset. If no \fI\s-1OFFSET\s0\fR 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 (eg. newer Canon models). Offsets are fixed permanently if \fB\-F\fR is used when writing \s-1EXIF\s0 to an image. eg) .Sp .Vb 1 \& exiftool \-F \-exif:resolutionunit=inches image.jpg .Ve .IP "\fB\-fast\fR[\fI\s-1NUM\s0\fR]" 5 .IX Item "-fast[NUM]" Increase speed of extracting information from \s-1JPEG\s0 images. With this option, ExifTool will not scan to the end of a \s-1JPEG\s0 image to check for an \&\s-1AFCP\s0 or PreviewImage trailer, or past the first comment in \s-1GIF\s0 images or the audio/video data in \s-1WAV/AVI\s0 files to 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, \fB\-fast2\fR also causes exiftool to avoid extracting any \s-1EXIF\s0 MakerNote information. .IP "\fB\-fileOrder\fR [\-]\fI\s-1TAG\s0\fR" 5 .IX Item "-fileOrder [-]TAG" Set file processing order according to the sorted value of the specified \&\fI\s-1TAG\s0\fR. For example, to process files in order of date: .Sp .Vb 1 \& exiftool \-fileOrder DateTimeOriginal DIR .Ve .Sp Additional \fB\-fileOrder\fR options may be added for secondary sort keys. Floating point values are sorted numerically, and all other values are sorted alphabetically. The sort order may be reversed by prefixing the tag name with a \f(CW\*(C`\-\*(C'\fR (eg. \f(CW\*(C`\-fileOrder \-createdate\*(C'\fR). Print conversion of the sorted values is disabled with the \fB\-n\fR option, or a \f(CW\*(C`#\*(C'\fR appended to the tag name. Other formatting options (eg. \fB\-d\fR) have no effect on the sorted values. Note that the \fB\-fileOrder\fR option has a large performance impact since it involves an additional processing pass of each file. .IP "\fB\-i\fR \fI\s-1DIR\s0\fR (\fB\-ignore\fR)" 5 .IX Item "-i DIR (-ignore)" Ignore specified directory name. Use multiple \fB\-i\fR options to ignore more than one directory name. A special \fI\s-1DIR\s0\fR value of \f(CW\*(C`SYMLINKS\*(C'\fR (case sensitive) may be specified to ignore symbolic links when the \fB\-r\fR option is used. .IP "\fB\-if\fR \fI\s-1EXPR\s0\fR" 5 .IX Item "-if EXPR" Specify a condition to be evaluated before processing each \fI\s-1FILE\s0\fR. \fI\s-1EXPR\s0\fR is a Perl-like logic expression containing tag names prefixed by \f(CW\*(C`$\*(C'\fR symbols. It is evaluated with the tags from each \fI\s-1FILE\s0\fR 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 \f(CW\*(C`#\*(C'\fR character to disable print conversion. The expression \&\f(CW$GROUP:all\fR evaluates to 1 if any tag exists in the specified \f(CW\*(C`GROUP\*(C'\fR, or 0 otherwise (see note 2 below). When multiple \fB\-if\fR 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: .Sp .Vb 2 \& # extract shutterspeed from all Canon images in a directory \& exiftool \-shutterspeed \-if \*(Aq$make eq "Canon"\*(Aq dir \& \& # add one hour to all images created on or after Apr. 2, 2006 \& exiftool \-alldates+=1 \-if \*(Aq$CreateDate ge "2006:04:02"\*(Aq dir \& \& # set EXIF ISO value if possible, unless it is set already \& exiftool \*(Aq\-exif:iso nef.txt \& exiftool \-@ nef.txt \-srcfile %d%f.xmp ... .Ve .Sp 5) The \fB\-a\fR option has no effect on the evaluation of the expression, and the values of duplicate tags are accessible only by specifying a group name (such as a family 4 instance number, eg. \f(CW$Copy1:TAG\fR, \f(CW$Copy2:TAG\fR, etc). .IP "\fB\-m\fR (\fB\-ignoreMinorErrors\fR)" 5 .IX Item "-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 \*(L"[minor]\*(R" at the start of the message. Warnings which affect processing when ignored are indicated by \*(L"[Minor]\*(R" (with a capital \*(L"M\*(R"). .IP "\fB\-o\fR \fI\s-1OUTFILE\s0\fR or \fI\s-1FMT\s0\fR (\fB\-out\fR)" 5 .IX Item "-o OUTFILE or FMT (-out)" Set the output file or directory name when writing information. Without this option, when any \*(L"real\*(R" tags are written the original file is renamed to \f(CW\*(C`FILE_original\*(C'\fR and output is written to \fI\s-1FILE\s0\fR. When writing only FileName and/or Directory \*(L"pseudo\*(R" tags, \fB\-o\fR causes the file to be copied instead of moved, but directories specified for either of these tags take precedence over that specified by the \fB\-o\fR option. .Sp \&\fI\s-1OUTFILE\s0\fR may be \f(CW\*(C`\-\*(C'\fR to write to stdout. The output file name may also be specified using a \fI\s-1FMT\s0\fR string in which \f(CW%d\fR, \f(CW%f\fR and \f(CW%e\fR represent the directory, file name and extension of \fI\s-1FILE\s0\fR. Also, \f(CW%c\fR may be used to add a copy number. See the \fB\-w\fR option for \fI\s-1FMT\s0\fR string examples. .Sp The output file is taken to be a directory name if it already exists as a directory or if the name ends with '/'. Output directories are created if necessary. Existing files will not be overwritten. Combining the \&\fB\-overwrite_original\fR option with \fB\-o\fR causes the original source file to be erased after the output file is successfully written. .Sp A special feature of this option allows the creation of certain types of files from scratch, or with the metadata from another type of file. The following file types may be created using this technique: .Sp .Vb 1 \& XMP, ICC/ICM, MIE, VRD, EXIF .Ve .Sp The output file type is determined by the extension of \fI\s-1OUTFILE\s0\fR (specified as \f(CW\*(C`\-.EXT\*(C'\fR when writing to stdout). The output file is then created from a combination of information in \fI\s-1FILE\s0\fR (as if the \fB\-tagsFromFile\fR option was used), and tag values assigned on the command line. If no \fI\s-1FILE\s0\fR is specified, the output file may be created from scratch using only tags assigned on the command line. .IP "\fB\-overwrite_original\fR" 5 .IX Item "-overwrite_original" Overwrite the original \fI\s-1FILE\s0\fR (instead of preserving it by adding \&\f(CW\*(C`_original\*(C'\fR 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 \fB\-o\fR, this option causes the original file to be deleted if the output file was successfully written (ie. the file is moved instead of copied). .IP "\fB\-overwrite_original_in_place\fR" 5 .IX Item "-overwrite_original_in_place" Similar to \fB\-overwrite_original\fR 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 \s-1OS\s0 resource fork is always preserved unless specifically deleted with \f(CW\*(C`\-rsrc:all=\*(C'\fR). 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 \fB\-overwrite_original\fR option should be used instead unless necessary. .IP "\fB\-P\fR (\fB\-preserve\fR)" 5 .IX Item "-P (-preserve)" Preserve the filesystem modification date/time of the original file (\f(CW\*(C`FileModifyDate\*(C'\fR) 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 \fB\-overwrite_original_in_place\fR option may be used if necessary to preserve the creation date. .IP "\fB\-password\fR \fI\s-1PASSWD\s0\fR" 5 .IX Item "-password PASSWD" Specify password to allow processing of password-protected \s-1PDF\s0 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. .IP "\fB\-progress\fR" 5 .IX Item "-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 \fB\-v0\fR option, which prints the name of each processed file when writing. When combined with the \fB\-if\fR option, the total count includes all files before the condition is applied, but files that fail the condition will not have their names printed. .IP "\fB\-q\fR (\fB\-quiet\fR)" 5 .IX Item "-q (-quiet)" Quiet processing. One \fB\-q\fR suppresses normal informational messages, and a second \fB\-q\fR suppresses warnings as well. Error messages can not be suppressed, although minor errors may be downgraded to warnings with the \&\fB\-m\fR option, which may then be suppressed with \f(CW\*(C`\-q \-q\*(C'\fR. .IP "\fB\-r\fR (\fB\-recurse\fR)" 5 .IX Item "-r (-recurse)" Recursively process files in subdirectories. Only meaningful if \fI\s-1FILE\s0\fR 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 \&\f(CW\*(C`\-i SYMLINKS\*(C'\fR (see the \fB\-i\fR option for details). .IP "\fB\-scanForXMP\fR" 5 .IX Item "-scanForXMP" Scan all files (even unsupported formats) for \s-1XMP\s0 information unless found already. When combined with the \fB\-fast\fR option, only unsupported file types are scanned. Warning: It can be time consuming to scan large files. .IP "\fB\-u\fR (\fB\-unknown\fR)" 5 .IX Item "-u (-unknown)" Extract values of unknown tags. Add another \fB\-u\fR to also extract unknown information from binary data blocks. This option applies to tags with numerical tag \s-1ID\s0's, and causes tag names like \*(L"Exif_0xc5d9\*(R" to be generated for unknown information. It has no effect on information types which have human-readable tag \s-1ID\s0's (such as \s-1XMP\s0), since unknown tags are extracted automatically from these formats. .IP "\fB\-U\fR (\fB\-unknown2\fR)" 5 .IX Item "-U (-unknown2)" Extract values of unknown tags as well as unknown information from some binary data blocks. This is the same as two \fB\-u\fR options. .IP "\fB\-wm\fR \fI\s-1MODE\s0\fR (\fB\-writeMode\fR)" 5 .IX Item "-wm MODE (-writeMode)" Set mode for writing/creating tags. \fI\s-1MODE\s0\fR is a string of one or more characters from the list below. Write mode is \f(CW\*(C`wcg\*(C'\fR unless otherwise specified. .Sp .Vb 3 \& w \- Write existing tags \& c \- Create new tags \& g \- create new Groups as necessary .Ve .Sp The level of the group is the SubDirectory level in the metadata structure. For \s-1XMP\s0 or \s-1IPTC\s0 this is the full \s-1XMP/IPTC\s0 block (the family 0 group), but for \s-1EXIF\s0 this is the individual \s-1IFD \s0(the family 1 group). .IP "\fB\-z\fR (\fB\-zip\fR)" 5 .IX Item "-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. (eg. The \s-1PNG\s0 format supports compressed text.) This option also disables the recommended padding in embedded \s-1XMP,\s0 saving 2424 bytes when writing \s-1XMP\s0 in a file. .PP \fISpecial features\fR .IX Subsection "Special features" .IP "\fB\-geotag\fR \fI\s-1TRKFILE\s0\fR" 5 .IX Item "-geotag TRKFILE" Geotag images from the specified \s-1GPS\s0 track log file. Using the \fB\-geotag\fR option is equivalent to writing a value to the \f(CW\*(C`Geotag\*(C'\fR tag. After the \&\fB\-geotag\fR option has been specified, the value of the \f(CW\*(C`Geotime\*(C'\fR tag is written to define a date/time for the position interpolation. If \f(CW\*(C`Geotime\*(C'\fR is not specified, the value is copied from \f(CW\*(C`DateTimeOriginal\*(C'\fR. For example, the following two commands are equivalent: .Sp .Vb 2 \& exiftool \-geotag track.log image.jpg \& exiftool \-geotag "\-Geotime out.txt" 5 .IX Item "exiftool -T -createdate -aperture -shutterspeed -iso dir > out.txt" List specified meta information in tab-delimited column form for all images in \f(CW\*(C`dir\*(C'\fR to an output text file named \*(L"out.txt\*(R". .IP "exiftool \-s \-ImageSize \-ExposureTime b.jpg" 5 .IX Item "exiftool -s -ImageSize -ExposureTime b.jpg" Print ImageSize and ExposureTime tag names and values. .IP "exiftool \-l \-canon c.jpg d.jpg" 5 .IX Item "exiftool -l -canon c.jpg d.jpg" Print standard Canon information from two image files. .IP "exiftool \-r \-w .txt \-common pictures" 5 .IX Item "exiftool -r -w .txt -common pictures" Recursively extract common meta information from files in \f(CW\*(C`pictures\*(C'\fR directory, writing text output to \f(CW\*(C`.txt\*(C'\fR files with the same names. .IP "exiftool \-b \-ThumbnailImage image.jpg > thumbnail.jpg" 5 .IX Item "exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg" Save thumbnail image from \f(CW\*(C`image.jpg\*(C'\fR to a file called \f(CW\*(C`thumbnail.jpg\*(C'\fR. .IP "exiftool \-b \-JpgFromRaw \-w _JFR.JPG \-ext \s-1NEF\s0 \-r ." 5 .IX Item "exiftool -b -JpgFromRaw -w _JFR.JPG -ext NEF -r ." Recursively extract \s-1JPG\s0 image from all Nikon \s-1NEF\s0 files in the current directory, adding \f(CW\*(C`_JFR.JPG\*(C'\fR for the name of the output \s-1JPG\s0 files. .ie n .IP "exiftool \-d '%r %a, %B %e, %Y' \-DateTimeOriginal \-S \-s \-ext jpg ." 5 .el .IP "exiftool \-d '%r \f(CW%a\fR, \f(CW%B\fR \f(CW%e\fR, \f(CW%Y\fR' \-DateTimeOriginal \-S \-s \-ext jpg ." 5 .IX Item "exiftool -d '%r %a, %B %e, %Y' -DateTimeOriginal -S -s -ext jpg ." Print formatted date/time for all \s-1JPG\s0 files in the current directory. .IP "exiftool \-IFD1:XResolution \-IFD1:YResolution image.jpg" 5 .IX Item "exiftool -IFD1:XResolution -IFD1:YResolution image.jpg" Extract image resolution from \s-1EXIF IFD1\s0 information (thumbnail image \s-1IFD\s0). .IP "exiftool '\-*resolution*' image.jpg" 5 .IX Item "exiftool '-*resolution*' image.jpg" Extract all tags with names containing the word \*(L"Resolution\*(R" from an image. .IP "exiftool \-xmp:author:all \-a image.jpg" 5 .IX Item "exiftool -xmp:author:all -a image.jpg" Extract all author-related \s-1XMP\s0 information from an image. .IP "exiftool \-xmp \-b a.jpg > out.xmp" 5 .IX Item "exiftool -xmp -b a.jpg > out.xmp" Extract complete \s-1XMP\s0 data record intact from \f(CW\*(C`a.jpg\*(C'\fR and write it to \&\f(CW\*(C`out.xmp\*(C'\fR using the special \f(CW\*(C`XMP\*(C'\fR tag (see the Extra tags in Image::ExifTool::TagNames). .ie n .IP "exiftool \-p '$filename has date $dateTimeOriginal' \-q \-f dir" 5 .el .IP "exiftool \-p '$filename has date \f(CW$dateTimeOriginal\fR' \-q \-f dir" 5 .IX Item "exiftool -p '$filename has date $dateTimeOriginal' -q -f dir" Print one line of output containing the file name and DateTimeOriginal for each image in directory \f(CW\*(C`dir\*(C'\fR. .ie n .IP "exiftool \-ee \-p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts" 5 .el .IP "exiftool \-ee \-p '$gpslatitude, \f(CW$gpslongitude\fR, \f(CW$gpstimestamp\fR' a.m2ts" 5 .IX Item "exiftool -ee -p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts" Extract all \s-1GPS\s0 positions from an \s-1AVCHD\s0 video. .IP "exiftool \-icc_profile \-b \-w icc image.jpg" 5 .IX Item "exiftool -icc_profile -b -w icc image.jpg" Save complete ICC_Profile from an image to an output file with the same name and an extension of \f(CW\*(C`.icc\*(C'\fR. .IP "exiftool \-htmldump \-w tmp/%f_%e.html t/images" 5 .IX Item "exiftool -htmldump -w tmp/%f_%e.html t/images" Generate \s-1HTML\s0 pages from a hex dump of \s-1EXIF\s0 information in all images from the \f(CW\*(C`t/images\*(C'\fR directory. The output \s-1HTML\s0 files are written to the \f(CW\*(C`tmp\*(C'\fR directory (which is created if it didn't exist), with names of the form \&'\s-1FILENAME_EXT\s0.html'. .IP "exiftool \-a \-b \-ee \-embeddedimage \-W Image_%.3g3.%s file.pdf" 5 .IX Item "exiftool -a -b -ee -embeddedimage -W Image_%.3g3.%s file.pdf" Extract embedded \s-1JPG\s0 and \s-1JP2\s0 images from a \s-1PDF\s0 file. The output images will have file names like \*(L"Image_#.jpg\*(R" or \*(L"Image_#.jp2\*(R", where \*(L"#\*(R" is the ExifTool family 3 embedded document number for the image. .SH "WRITING EXAMPLES" .IX Header "WRITING EXAMPLES" Note that quotes are necessary around arguments which contain certain special characters such as \f(CW\*(C`>\*(C'\fR, \f(CW\*(C`<\*(C'\fR 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 (eg. \-Comment=\*(L"This is a new comment\*(R"). .IP "exiftool \-Comment='This is a new comment' dst.jpg" 5 .IX Item "exiftool -Comment='This is a new comment' dst.jpg" Write new comment to a \s-1JPG\s0 image (replaces any existing comment). .IP "exiftool \-comment= \-o newdir \-ext jpg ." 5 .IX Item "exiftool -comment= -o newdir -ext jpg ." Remove comment from all \s-1JPG\s0 images in the current directory, writing the modified images to a new directory. .IP "exiftool \-keywords=EXIF \-keywords=editor dst.jpg" 5 .IX Item "exiftool -keywords=EXIF -keywords=editor dst.jpg" Replace existing keyword list with two new keywords (\f(CW\*(C`EXIF\*(C'\fR and \f(CW\*(C`editor\*(C'\fR). .IP "exiftool \-Keywords+=word \-o newfile.jpg src.jpg" 5 .IX Item "exiftool -Keywords+=word -o newfile.jpg src.jpg" Copy a source image to a new file, and add a keyword (\f(CW\*(C`word\*(C'\fR) to the current list of keywords. .IP "exiftool \-exposurecompensation+=\-0.5 a.jpg" 5 .IX Item "exiftool -exposurecompensation+=-0.5 a.jpg" Decrement the value of ExposureCompensation by 0.5 \s-1EV. \s0 Note that += with a negative value is used for decrementing because the \-= operator is used for conditional deletion (see next example). .IP "exiftool \-credit\-=xxx dir" 5 .IX Item "exiftool -credit-=xxx dir" Delete Credit information from all files in a directory where the Credit value was (\f(CW\*(C`xxx\*(C'\fR). .IP "exiftool \-xmp:description\-de='kühl' \-E dst.jpg" 5 .IX Item "exiftool -xmp:description-de='kühl' -E dst.jpg" Write alternate language for XMP:Description, using \s-1HTML\s0 character escaping to input special characters. .IP "exiftool \-all= dst.jpg" 5 .IX Item "exiftool -all= dst.jpg" Delete all meta information from an image. Note: You should \s-1NOT\s0 do this to \&\s-1RAW\s0 images (except \s-1DNG\s0) since proprietary \s-1RAW\s0 image formats often contain information in the makernotes that is necessary for converting the image. .IP "exiftool \-all= \-comment='lonely' dst.jpg" 5 .IX Item "exiftool -all= -comment='lonely' dst.jpg" Delete all meta information from an image and add a comment back in. (Note that the order is important: \f(CW\*(C`\-comment=\*(Aqlonely\*(Aq \-all=\*(C'\fR would also delete the new comment.) .IP "exiftool \-all= \-\-jfif:all dst.jpg" 5 .IX Item "exiftool -all= --jfif:all dst.jpg" Delete all meta information except \s-1JFIF\s0 group from an image. .IP "exiftool \-Photoshop:All= dst.jpg" 5 .IX Item "exiftool -Photoshop:All= dst.jpg" Delete Photoshop meta information from an image (note that the Photoshop information also includes \s-1IPTC\s0). .IP "exiftool \-r \-XMP\-crss:all= \s-1DIR\s0" 5 .IX Item "exiftool -r -XMP-crss:all= DIR" Recursively delete all XMP-crss information from images in a directory. .IP "exiftool '\-ThumbnailImage<=thumb.jpg' dst.jpg" 5 .IX Item "exiftool '-ThumbnailImage<=thumb.jpg' dst.jpg" Set the thumbnail image from specified file (Note: The quotes are necessary to prevent shell redirection). .IP "exiftool '\-JpgFromRaw<=%d%f_JFR.JPG' \-ext \s-1NEF\s0 \-r ." 5 .IX Item "exiftool '-JpgFromRaw<=%d%f_JFR.JPG' -ext NEF -r ." Recursively write \s-1JPEG\s0 images with filenames ending in \f(CW\*(C`_JFR.JPG\*(C'\fR to the JpgFromRaw tag of like-named files with extension \f(CW\*(C`.NEF\*(C'\fR in the current directory. (This is the inverse of the \f(CW\*(C`\-JpgFromRaw\*(C'\fR command of the \&\*(L"\s-1READING EXAMPLES\*(R"\s0 section above.) .IP "exiftool \-DateTimeOriginal\-='0:0:0 1:30:0' dir" 5 .IX Item "exiftool -DateTimeOriginal-='0:0:0 1:30:0' dir" Adjust original date/time of all images in directory \f(CW\*(C`dir\*(C'\fR by subtracting one hour and 30 minutes. (This is equivalent to \f(CW\*(C`\-DateTimeOriginal\-=1.5\*(C'\fR. See Image::ExifTool::Shift.pl for details.) .IP "exiftool \-createdate+=3 \-modifydate+=3 a.jpg b.jpg" 5 .IX Item "exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg" Add 3 hours to the CreateDate and ModifyDate timestamps of two images. .ie n .IP "exiftool \-AllDates+=1:30 \-if '$make eq ""Canon""' dir" 5 .el .IP "exiftool \-AllDates+=1:30 \-if '$make eq ``Canon''' dir" 5 .IX Item "exiftool -AllDates+=1:30 -if '$make eq Canon' dir" Shift the values of DateTimeOriginal, CreateDate and ModifyDate forward by 1 hour and 30 minutes for all Canon images in a directory. (The AllDates tag is provided as a shortcut for these three tags, allowing them to be accessed via a single tag.) .IP "exiftool \-xmp:city=Kingston image1.jpg image2.nef" 5 .IX Item "exiftool -xmp:city=Kingston image1.jpg image2.nef" Write a tag to the \s-1XMP\s0 group of two images. (Without the \f(CW\*(C`xmp:\*(C'\fR this tag would get written to the \s-1IPTC\s0 group since \f(CW\*(C`City\*(C'\fR exists in both, and \s-1IPTC\s0 is preferred by default.) .IP "exiftool \-LightSource\-='Unknown (0)' dst.tiff" 5 .IX Item "exiftool -LightSource-='Unknown (0)' dst.tiff" Delete \f(CW\*(C`LightSource\*(C'\fR tag only if it is unknown with a value of 0. .IP "exiftool \-whitebalance\-=auto \-WhiteBalance=tung dst.jpg" 5 .IX Item "exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg" Set \f(CW\*(C`WhiteBalance\*(C'\fR to \f(CW\*(C`Tungsten\*(C'\fR only if it was previously \f(CW\*(C`Auto\*(C'\fR. .IP "exiftool \-comment\-= \-comment='new comment' a.jpg" 5 .IX Item "exiftool -comment-= -comment='new comment' a.jpg" Write a new comment only if the image doesn't have one already. .ie n .IP "exiftool \-o %d%f.xmp dir" 5 .el .IP "exiftool \-o \f(CW%d\fR%f.xmp dir" 5 .IX Item "exiftool -o %d%f.xmp dir" Create \s-1XMP\s0 meta information data files for all images in \f(CW\*(C`dir\*(C'\fR. .IP "exiftool \-o test.xmp \-owner=Phil \-title='\s-1XMP\s0 File'" 5 .IX Item "exiftool -o test.xmp -owner=Phil -title='XMP File'" Create an \s-1XMP\s0 data file only from tags defined on the command line. .IP "exiftool '\-ICC_Profile<=%d%f.icc' image.jpg" 5 .IX Item "exiftool '-ICC_Profile<=%d%f.icc' image.jpg" Write ICC_Profile to an image from a \f(CW\*(C`.icc\*(C'\fR file of the same name. .IP "exiftool \-hierarchicalkeywords='{keyword=one,children={keyword=B}}'" 5 .IX Item "exiftool -hierarchicalkeywords='{keyword=one,children={keyword=B}}'" Write structured \s-1XMP\s0 information. See for more details. .IP "exiftool \-trailer:all= image.jpg" 5 .IX Item "exiftool -trailer:all= image.jpg" Delete any trailer found after the end of image (\s-1EOI\s0) in a \s-1JPEG\s0 file. A number of digital cameras store a large PreviewImage after the \s-1JPEG EOI,\s0 and the file size may be reduced significantly by deleting this trailer. See the \s-1JPEG\s0 Tags documentation for a list of recognized \s-1JPEG\s0 trailers. .SH "COPYING EXAMPLES" .IX Header "COPYING EXAMPLES" These examples demonstrate the ability to copy tag values between files. .IP "exiftool \-tagsFromFile src.cr2 dst.jpg" 5 .IX Item "exiftool -tagsFromFile src.cr2 dst.jpg" Copy the values of all writable tags from \f(CW\*(C`src.cr2\*(C'\fR to \f(CW\*(C`dst.jpg\*(C'\fR, writing the information to same-named tags in the preferred groups. .IP "exiftool \-TagsFromFile src.jpg \-all:all dst.jpg" 5 .IX Item "exiftool -TagsFromFile src.jpg -all:all dst.jpg" Copy the values of all writable tags from \f(CW\*(C`src.jpg\*(C'\fR to \f(CW\*(C`dst.jpg\*(C'\fR, preserving the original tag groups. .IP "exiftool \-all= \-tagsfromfile src.jpg \-exif:all dst.jpg" 5 .IX Item "exiftool -all= -tagsfromfile src.jpg -exif:all dst.jpg" Erase all meta information from \f(CW\*(C`dst.jpg\*(C'\fR image, then copy \s-1EXIF\s0 tags from \&\f(CW\*(C`src.jpg\*(C'\fR. .IP "exiftool \-exif:all= \-tagsfromfile @ \-all:all \-unsafe bad.jpg" 5 .IX Item "exiftool -exif:all= -tagsfromfile @ -all:all -unsafe bad.jpg" Rebuild all \s-1EXIF\s0 meta information from scratch in an image. This technique can be used in \s-1JPEG\s0 images to repair corrupted \s-1EXIF\s0 information which otherwise could not be written due to errors. The \f(CW\*(C`Unsafe\*(C'\fR tag is a shortcut for unsafe \s-1EXIF\s0 tags in \s-1JPEG\s0 images which are not normally copied. See the tag name documentation for more details about unsafe tags. .IP "exiftool \-Tagsfromfile a.jpg out.xmp" 5 .IX Item "exiftool -Tagsfromfile a.jpg out.xmp" Copy meta information from \f(CW\*(C`a.jpg\*(C'\fR to an \s-1XMP\s0 data file. If the \s-1XMP\s0 data file \f(CW\*(C`out.xmp\*(C'\fR already exists, it will be updated with the new information. Otherwise the \s-1XMP\s0 data file will be created. Only \s-1XMP, ICC\s0 and \s-1MIE\s0 files may be created like this (other file types may be edited but not created). See \*(L"\s-1WRITING EXAMPLES\*(R"\s0 above for another technique to generate \s-1XMP\s0 files. .IP "exiftool \-tagsFromFile a.jpg \-XMP:All= \-ThumbnailImage= \-m b.jpg" 5 .IX Item "exiftool -tagsFromFile a.jpg -XMP:All= -ThumbnailImage= -m b.jpg" Copy all meta information from \f(CW\*(C`a.jpg\*(C'\fR to \f(CW\*(C`b.jpg\*(C'\fR, deleting all \s-1XMP\s0 information and the thumbnail image from the destination. .IP "exiftool \-TagsFromFile src.jpg \-title \-author=Phil dst.jpg" 5 .IX Item "exiftool -TagsFromFile src.jpg -title -author=Phil dst.jpg" Copy title from one image to another and set a new author name. .IP "exiftool \-TagsFromFile a.jpg \-ISO \-TagsFromFile b.jpg \-comment dst.jpg" 5 .IX Item "exiftool -TagsFromFile a.jpg -ISO -TagsFromFile b.jpg -comment dst.jpg" Copy \s-1ISO\s0 from one image and Comment from another image to a destination image. .IP "exiftool \-tagsfromfile src.jpg \-exif:all \-\-subifd:all dst.jpg" 5 .IX Item "exiftool -tagsfromfile src.jpg -exif:all --subifd:all dst.jpg" Copy only the \s-1EXIF\s0 information from one image to another, excluding SubIFD tags. .IP "exiftool '\-FileModifyDate for additional documentation and examples. .IP "exiftool \-filename=new.jpg dir/old.jpg" 5 .IX Item "exiftool -filename=new.jpg dir/old.jpg" Rename \f(CW\*(C`old.jpg\*(C'\fR to \f(CW\*(C`new.jpg\*(C'\fR in directory \f(CW\*(C`dir\*(C'\fR. .IP "exiftool \-directory=%e dir" 5 .IX Item "exiftool -directory=%e dir" Move all files from directory \f(CW\*(C`dir\*(C'\fR into directories named by the original file extensions. .ie n .IP "exiftool '\-Directory for additional documentation. .IP "exiftool \-geotag track.log a.jpg" 5 .IX Item "exiftool -geotag track.log a.jpg" Geotag an image (\f(CW\*(C`a.jpg\*(C'\fR) from position information in a \s-1GPS\s0 track log (\f(CW\*(C`track.log\*(C'\fR). Since the \f(CW\*(C`Geotime\*(C'\fR tag is not specified, the value of DateTimeOriginal is used for geotagging. Local system time is assumed unless DateTimeOriginal contains a timezone. .IP "exiftool \-geotag t.log \-geotime='2009:04:02 13:41:12\-05:00' a.jpg" 5 .IX Item "exiftool -geotag t.log -geotime='2009:04:02 13:41:12-05:00' a.jpg" Geotag an image with the \s-1GPS\s0 position for a specific time. (Note that the \&\f(CW\*(C`Geotag\*(C'\fR tag must be assigned before \f(CW\*(C`Geotime\*(C'\fR for the \s-1GPS\s0 data to be available when \f(CW\*(C`Geotime\*(C'\fR is set.) .IP "exiftool \-geotag log.gpx '\-xmp:geotime out.gpx" 5 .el .IP "exiftool \-p gpx.fmt \-d \f(CW%Y\fR\-%m\-%dT%H:%M:%SZ dir > out.gpx" 5 .IX Item "exiftool -p gpx.fmt -d %Y-%m-%dT%H:%M:%SZ dir > out.gpx" Generate a \s-1GPX\s0 track log from all images in directory \f(CW\*(C`dir\*(C'\fR. This example uses the \f(CW\*(C`gpx.fmt\*(C'\fR file included in the full ExifTool distribution package and assumes that the images in \f(CW\*(C`dir\*(C'\fR have all been previously geotagged. .SH "PIPING EXAMPLES" .IX Header "PIPING EXAMPLES" .IP "cat a.jpg | exiftool \-" 5 .IX Item "cat a.jpg | exiftool -" Extract information from stdin. .IP "exiftool image.jpg \-thumbnailimage \-b | exiftool \-" 5 .IX Item "exiftool image.jpg -thumbnailimage -b | exiftool -" Extract information from an embedded thumbnail image. .IP "cat a.jpg | exiftool \-iptc:keywords+=fantastic \- > b.jpg" 5 .IX Item "cat a.jpg | exiftool -iptc:keywords+=fantastic - > b.jpg" Add an \s-1IPTC\s0 keyword in a pipeline, saving output to a new file. .IP "curl \-s http://a.domain.com/bigfile.jpg | exiftool \-fast \-" 5 .IX Item "curl -s http://a.domain.com/bigfile.jpg | exiftool -fast -" Extract information from an image over the internet using the cURL utility. The \fB\-fast\fR option prevents exiftool from scanning for trailer information, so only the meta information header is transferred. .IP "exiftool a.jpg \-thumbnailimage \-b | exiftool \-comment=wow \- | exiftool a.jpg \-thumbnailimage'<=\-'" 5 .IX Item "exiftool a.jpg -thumbnailimage -b | exiftool -comment=wow - | exiftool a.jpg -thumbnailimage'<=-'" Add a comment to an embedded thumbnail image. (Why anyone would want to do this I don't know, but I've included this as an example to illustrate the flexibility of ExifTool.) .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" The exiftool application exits with a status of 0 on success, or 1 if an error occured or if all files failed the \fB\-if\fR condition (for any of the commands if \fB\-execute\fR was used). .SH "AUTHOR" .IX Header "AUTHOR" Copyright 2003\-2014, Phil Harvey .PP This is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIImage::ExifTool\fR\|(3pm), \&\fIImage::ExifTool::TagNames\fR\|(3pm), \&\fIImage::ExifTool::Shortcuts\fR\|(3pm), Image::ExifTool::Shift.pl