.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" 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 >0, 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 .\" ======================================================================== .\" .IX Title "EXIFTOOL 1p" .TH EXIFTOOL 1p "2023-02-24" "perl v5.36.0" "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" .SS "Reading" .IX Subsection "Reading" \&\fBexiftool\fR [\fI\s-1OPTIONS\s0\fR] [\-\fI\s-1TAG\s0\fR...] [\-\-\fI\s-1TAG\s0\fR...] \fI\s-1FILE\s0\fR... .SS "Writing" .IX Subsection "Writing" \&\fBexiftool\fR [\fI\s-1OPTIONS\s0\fR] \-\fI\s-1TAG\s0\fR[+\-<]=[\fI\s-1VALUE\s0\fR]... \fI\s-1FILE\s0\fR... .SS "Copying" .IX Subsection "Copying" \&\fBexiftool\fR [\fI\s-1OPTIONS\s0\fR] \fB\-tagsFromFile\fR \fI\s-1SRCFILE\s0\fR [\-[\fI\s-1DSTTAG\s0\fR<]\fI\s-1SRCTAG\s0\fR...] \fI\s-1FILE\s0\fR... .SS "Other" .IX Subsection "Other" \&\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] ] .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 \&\-\fI\s-1TAG\s0\fR=[\fI\s-1VALUE\s0\fR], and/or the \fB\-geotag\fR, \fB\-csv=\fR or \fB\-json=\fR options. 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. Hidden files in the directory are also processed. Adding the \fB\-r\fR option causes subdirectories to be processed recursively, but subdirectories with names beginning with \&\*(L".\*(R" are skipped unless \fB\-r.\fR is used. .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 \& \-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\- \& 360 r/w | DPX r | ITC r | NRW r/w | RAM r \& 3FR r | DR4 r/w/c | J2C r | NUMBERS r | RAR r \& 3G2 r/w | DSS r | JNG r/w | O r | RAW r/w \& 3GP r/w | DV r | JP2 r/w | ODP r | RIFF r \& A r | DVB r/w | JPEG r/w | ODS r | RSRC r \& AA r | DVR\-MS r | JSON r | ODT r | RTF r \& AAE r | DYLIB r | JXL r | OFR r | RW2 r/w \& AAX r/w | EIP r | K25 r | OGG r | RWL r/w \& ACR r | EPS r/w | KDC r | OGV r | RWZ r \& AFM r | EPUB r | KEY r | ONP r | RM r \& AI r/w | ERF r/w | LA r | OPUS r | SEQ r \& AIFF r | EXE r | LFP r | ORF r/w | SKETCH r \& APE r | EXIF r/w/c | LIF r | ORI r/w | SO r \& ARQ r/w | EXR r | LNK r | OTF r | SR2 r/w \& ARW r/w | EXV r/w/c | LRV r/w | PAC r | SRF r \& ASF r | F4A/V r/w | M2TS r | PAGES r | SRW r/w \& AVI r | FFF r/w | M4A/V r/w | PBM r/w | SVG r \& AVIF r/w | FITS r | MACOS r | PCD r | SWF r \& AZW r | FLA r | MAX r | PCX r | THM r/w \& BMP r | FLAC r | MEF r/w | PDB r | TIFF r/w \& BPG r | FLIF r/w | MIE r/w/c | PDF r/w | TORRENT r \& BTF r | FLV r | MIFF r | PEF r/w | TTC r \& CHM r | FPF r | MKA r | PFA r | TTF r \& COS r | FPX r | MKS r | PFB r | TXT r \& CR2 r/w | GIF r/w | MKV r | PFM r | VCF r \& CR3 r/w | GPR r/w | MNG r/w | PGF r | VNT r \& CRM r/w | GZ r | MOBI r | PGM r/w | VRD r/w/c \& CRW r/w | HDP r/w | MODD r | PLIST r | VSD r \& CS1 r/w | HDR r | MOI r | PICT r | WAV r \& CSV r | HEIC r/w | MOS r/w | PMP r | WDP r/w \& CUR r | HEIF r/w | MOV r/w | PNG r/w | WEBP r/w \& CZI r | HTML r | MP3 r | PPM r/w | WEBM r \& DCM r | ICC r/w/c | MP4 r/w | PPT r | WMA r \& DCP r/w | ICO r | MPC r | PPTX r | WMV r \& DCR r | ICS r | MPG r | PS r/w | WTV r \& DFONT r | IDML r | MPO r/w | PSB r/w | WV r \& DIVX r | IIQ r/w | MQV r/w | PSD r/w | X3F r/w \& DJVU r | IND r/w | MRC r | PSP r | XCF r \& DLL r | INSP r/w | MRW r/w | QTIF r/w | XLS r \& DNG r/w | INSV r | MXF r | R3D r | XLSX r \& DOC r | INX r | NEF r/w | RA r | XMP r/w/c \& DOCX r | ISO r | NKSC r/w | RAF r/w | ZIP 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 Overview" .IX Subsection "Option Overview" 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'" 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. Has no effect unless \&\fI\s-1SRCTAG\s0\fR exists in \fI\s-1SRCFILE\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 (but the family may be specified by adding a leading number to the group name, eg. \f(CW\*(C`0All\*(C'\fR writes to the same family 0 group 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'" (but see Note 5 below). .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 and the \&\*(L"Advanced formatting feature\*(R" section 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 the redirection feature with list-type stags, shortcuts or when using wildcards in tag names. .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, and individual makernote tags may not be excluded from a block copy. 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 from that of assigned tags for list-type tags and conditional replacements because each copy operation on a tag overrides any previous operations. 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 \-sep \*(Aq, \*(Aq 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. .Sp As well, the \fB\-sep\fR option should be used as in the second command above to maintain separate list items when writing metadata back to image files, and the \fB\-struct\fR option may be used when extracting to preserve structured \s-1XMP\s0 information. .IP "\fB\-b\fR, \fB\-\-b\fR (\fB\-binary\fR, \fB\-\-binary\fR)" 5 .IX Item "-b, --b (-binary, --binary)" Output requested metadata in binary format without tag names or descriptions (\fB\-b\fR or \fB\-binary\fR). 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. By default, list items are separated by a newline when extracted with the \fB\-b\fR option, but this may be changed (see the \fB\-sep\fR option for details). May be combined with \fB\-j\fR, \fB\-php\fR or \&\fB\-X\fR to extract binary data in \s-1JSON, PHP\s0 or \s-1XML\s0 format, but note that \&\*(L"Unsafe\*(R" tags are not extracted as binary unless they are specified explicitly or the \s-1API\s0 RequestAll option is set to 3 or higher. .Sp With a leading double dash (\fB\-\-b\fR or \fB\-\-binary\fR), tags which contain binary data are suppressed in the output when reading. .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 a \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, with a default of \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 \& DOSLatinUS cp437 DOS Latin US \& DOSLatin1 cp850 DOS Latin1 \& DOSCyrillic cp866 DOS Cyrillic \& 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 \&\fI\s-1TYPE\s0\fR may be \f(CW\*(C`FileName\*(C'\fR to specify the encoding of file names on the command line (ie. \fI\s-1FILE\s0\fR arguments). In Windows, this triggers use of wide-character i/o routines, thus providing support for Unicode file names. See the \*(L"\s-1WINDOWS UNICODE FILE NAMES\*(R"\s0 section below for details. .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 9 \& 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 \& RIFF Internal encoding of RIFF strings 0 .Ve .Sp See for more information about coded character sets, and the Image::ExifTool Options for more details about the \fB\-charset\fR settings. .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 (and a SourceFile of \*(L"*\*(R" may be used to define default tags to be imported for all files which are combined with any tags specified for the specific SourceFile processed). The \&\fB\-csvDelim\fR option may be used to change the input/output field delimiter if something other than a comma is required. .Sp The following examples demonstrate basic use of the \fB\-csv\fR 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 When importing, empty values are ignored unless the \fB\-f\fR option is used and the \s-1API\s0 MissingTagValue is set to an empty string (in which case the tag is deleted). 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), but all other columns are imported. 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 adds 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. The \fB\-b\fR option may be added to output binary data, encoded in base64 if necessary (indicated by \s-1ASCII\s0 \*(L"base64:\*(R" as the first 7 bytes of the value). Values may also be encoded in base64 if the \fB\-charset\fR option is used and the value contains invalid characters. .Sp 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 and \&\fB\-W\fR options. When processing a large number of files, it is recommended to either use the \s-1JSON\s0 (\fB\-j\fR) or \s-1XML\s0 (\fB\-X\fR) output format, or use \fB\-p\fR to generate a fixed-column \s-1CSV\s0 file instead of using the \fB\-csv\fR option. .IP "\fB\-csvDelim\fR \fI\s-1STR\s0\fR" 5 .IX Item "-csvDelim STR" Set the delimiter for separating \s-1CSV\s0 entries for \s-1CSV\s0 file input/output via the \fB\-csv\fR option. \fI\s-1STR\s0\fR may contain \*(L"\et\*(R", \*(L"\en\*(R", \*(L"\er\*(R" and \*(L"\e\e\*(R" to represent \s-1TAB, LF, CR\s0 and '\e' respectively. A double quote is not allowed in the delimiter. Default is ','. .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 \fI\s-1FMT\s0\fR string may contain formatting codes beginning with a percent character (\f(CW\*(C`%\*(C'\fR) to represent the various components of a date/time value. 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. ExifTool adds a \f(CW%f\fR format code to represent fractional seconds, and supports an optional width to specify the number of digits after the decimal point (eg. \f(CW%3f\fR would give something like \&\f(CW.437\fR), and a minus sign to drop the decimal point (eg. \f(CW\*(C`%\-3f\*(C'\fR would give \&\f(CW437\fR). Only one \fB\-d\fR option may be used per command. Requires POSIX::strptime or Time::Piece for the inversion conversion when writing. .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\-ec\fR (\fB\-escapeHTML\fR, \fB\-escapeXML\fR, \fB\-escapeC\fR)" 5 .IX Item "-E, -ex, -ec (-escapeHTML, -escapeXML, -escapeC)" Escape characters in output tag values for \s-1HTML\s0 (\fB\-E\fR), \s-1XML\s0 (\fB\-ex\fR) or C (\fB\-ec\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. For C, all control characters and the backslash are escaped. 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 specific tags are requested on the command line (ie. not with wildcards or by \f(CW\*(C`\-all\*(C'\fR). With this option, a dash (\f(CW\*(C`\-\*(C'\fR) is printed for the value of any missing tag, but the dash may be changed 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), 4 (instance number), 5 (metadata path), 6 (\s-1EXIF/TIFF\s0 format) or 7 (tag \s-1ID\s0). \fB\-g0\fR is assumed if a family number is not specified. May be combined with other options to add group names to the output. 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). Use the \fB\-listg\fR option to list group names for a specified family. The \&\s-1API\s0 SavePath and SaveFormat options are automatically enabled if the respective family 5 or 6 group names are requested. See the \&\s-1API\s0 GetGroup documentation for more information. .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. \fB\-G0\fR is assumed if \&\fI\s-1NUM\s0\fR is not specified. May be combined with a number of other options to add group names to the output. Note that \fI\s-1NUM\s0\fR may be added wherever \fB\-G\fR is mentioned in the documentation. See the \fB\-g\fR option above for details. .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 would be output as simple strings). The \fB\-a\fR option is implied when \fB\-json\fR is used, but entries with identical \s-1JSON\s0 names are suppressed in the output. (\fB\-G4\fR may be used to ensure that all tags have unique \s-1JSON\s0 names.) 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 \&\s-1ASCII\s0 \*(L"base64:\*(R" as the first 7 bytes of the value), and \fB\-t\fR may be added to include tag table information (see \fB\-t\fR for details). 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. Note that ExifTool quotes \s-1JSON\s0 values only if they don't look like numbers (regardless of the original storage format or the relevant metadata specification). .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. An object with a missing SourceFile or a SourceFile of \*(L"*\*(R" defines default tags for all target files which are combined with any tags specified for the specific SourceFile processed. The imported \s-1JSON\s0 file must have the same format as the exported \s-1JSON\s0 files with the exception that options exporting \s-1JSON\s0 objects instead of simple values are not compatible with the import file format (ie. export with \fB\-D\fR, \fB\-H\fR, \fB\-l\fR, or \fB\-T\fR is not compatable, and use \fB\-G\fR instead of \fB\-g\fR). Additionally, tag names in the input \s-1JSON\s0 file may be suffixed with a \f(CW\*(C`#\*(C'\fR to disable print conversion. .Sp Unlike \s-1CSV\s0 import, empty values are not ignored, and will cause an empty value to be written if supported by the specific metadata type. Tags are deleted by using the \fB\-f\fR option and setting the tag value to \*(L"\-\*(R" (or to the MissingTagValue setting if this \s-1API\s0 option was used). Importing with \&\fB\-j\fR+=\fI\s-1JSONFILE\s0\fR causes new values to be added to existing lists. .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 \&\fB\-L\fR or \fB\-charset\fR option may be used to invoke other encodings. Note that ExifTool uses Unicode::LineBreak if available to help preserve the column alignment of the plain text output for languages with a variable-width character set. .Sp Currently, the language support is not complete, but users are welcome to help improve this by submitting their own translations. To submit a translation, follow these steps (you must have Perl installed for this): .Sp 1. Download and unpack the latest Image-ExifTool full distribution. .Sp 2. 'cd' into the Image-ExifTool directory. .Sp 3. Run this command to make an \s-1XML\s0 file of the desired tags (eg. \s-1EXIF\s0): .Sp .Vb 1 \& ./exiftool \-listx \-exif:all > out.xml .Ve .Sp 4. Copy this text into a file called 'import.pl' in the exiftool directory: .Sp .Vb 5 \& push @INC, \*(Aqlib\*(Aq; \& require Image::ExifTool::TagInfoXML; \& my $file = shift or die "Expected XML file name\en"; \& $Image::ExifTool::TagInfoXML::makeMissing = shift; \& Image::ExifTool::TagInfoXML::BuildLangModules($file,8); .Ve .Sp 5. Run the 'import.pl' script to Import the \s-1XML\s0 file, generating the \&'\s-1MISSING\s0' entries for your language (eg. Russian): .Sp .Vb 1 \& perl import.pl out.xml ru .Ve .Sp 6. Edit the generated language module lib/Image/ExifTool/Lang/ru.pm, and search and replace all '\s-1MISSING\s0' strings in the file with your translations. .Sp 7. Email the module ('ru.pm' in this example) to philharvey66 at gmail.com .Sp 8. Thank you!! .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. Also applies to tag values when copying from a tag, and in \fB\-if\fR conditions. .IP "\fB\-n\fR (\fB\-\-printConv\fR)" 5 .IX Item "-n (--printConv)" Disable print conversion for all tags. By default, extracted values are converted to a more human-readable format, but the \fB\-n\fR option disables this conversion, revealing the machine-readable values. 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. The argument is interpreted as a string unless a file of that name exists, in which case the string is loaded from the contents of the file. Tag names in the format file or string begin with a \f(CW\*(C`$\*(C'\fR symbol and may contain leading group names and/or a trailing \f(CW\*(C`#\*(C'\fR (to disable print conversion). 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. .Sp Multiple \fB\-p\fR options may be used, each contributing a line (or more) of text to the output. Lines beginning with \f(CW\*(C`#[HEAD]\*(C'\fR and \f(CW\*(C`#[TAIL]\*(C'\fR are output before the first processed file and after the last processed file respectively. Lines beginning with \f(CW\*(C`#[SECT]\*(C'\fR and \f(CW\*(C`#[ENDS]\*(C'\fR are output before and after each section of files. A section is defined as a group of consecutive files with the same section header (eg. files are grouped by directory if \f(CW\*(C`#[SECT]\*(C'\fR contains \f(CW$directory\fR). 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. Lines beginning with \f(CW\*(C`#[IF]\*(C'\fR are not output, but all \s-1BODY\s0 lines are skipped if any tag on an \s-1IF\s0 line doesn't exist. Other lines beginning with \&\f(CW\*(C`#\*(C'\fR are ignored. (To output a line beginning with \f(CW\*(C`#\*(C'\fR, use \f(CW\*(C`#[BODY]#\*(C'\fR.) 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 12.57 \-\- \& 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 The values of List-type tags with multiple items and Shortcut tags representing multiple tags are joined according the \fB\-sep\fR option setting when interpolated in the string. .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 \&\s-1API\s0 MissingTagValue option), or the \fB\-m\fR option may be used to ignore minor warnings and leave the missing values empty. Alternatively, \fB\-q \-q\fR may be used to simply suppress the warning messages. .Sp The \*(L"Advanced formatting feature\*(R" may be used to modify the values of individual tags within the \fB\-p\fR option string. .Sp Note that the \s-1API\s0 RequestTags option is automatically set for all tags used in the \fI\s-1FMTFILE\s0\fR or \fI\s-1STR\s0\fR. This allows all other tags to be ignored using \&\fB\-API IgnoreTags=all\fR, resulting in reduced memory usage and increased speed. .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, and \fB\-t\fR may be added to include tag table information (see \fB\-t\fR for details). 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. .Sp For pure binary output (\fB\-b\fR used without \fB\-j\fR, \fB\-php\fR or \fB\-X\fR), the first \fB\-sep\fR option specifies a list-item separator, and a second \fB\-sep\fR option specifies a terminator for the end of the list (or after each value if not a list). In these strings, \f(CW\*(C`\en\*(C'\fR, \f(CW\*(C`\er\*(C'\fR and \f(CW\*(C`\et\*(C'\fR may be used to represent a newline, carriage return and tab respectively. By default, binary list items are separated by a newline, and no terminator is added. .IP "\fB\-sort\fR, \fB\-\-sort\fR" 5 .IX Item "-sort, --sort" Sort output by tag description, or by tag name if the \fB\-s\fR option is used. 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. By default, tags are organized by groups when combined with the \fB\-g\fR or \fB\-G\fR option, but this grouping may be disabled with \fB\-\-sort\fR. .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, \s-1XMP\s0 structures and lists 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 be combined with \fB\-j\fR, \fB\-php\fR or \fB\-X\fR to add tag table information (\f(CW\*(C`table\*(C'\fR, 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). .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 and the new file name when renaming, moving or copying. Verbose levels above \fB\-v0\fR do not flush after each line. 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 changed unless an exclamation point is added to the option name (ie. \fB\-w!\fR or \fB\-textOut!\fR) to overwrite the file, or a plus sign (ie. \fB\-w+\fR or \fB\-textOut+\fR) to append to the existing file. 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 Capitalized format codes \f(CW%D\fR, \f(CW%F\fR, \f(CW%E\fR and \f(CW%C\fR provide slightly different alternatives to the lower case versions. \f(CW%D\fR does not include the trailing \&'/', \f(CW%F\fR is the full filename including extension, \f(CW%E\fR includes the leading \&'.', and \f(CW%C\fR increments the count for each processed file (see below). .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 valid format code (eg. \f(CW%f\fR), then it is interpreted as a file extension, but there are three different ways to create a single output file from multiple source files: .Sp .Vb 2 \& # 1. Shell redirection \& exiftool FILE1 FILE2 ... > out.txt \& \& # 2. With the \-w option and a zero\-width format code \& exiftool \-w+! %0fout.txt FILE1 FILE2 ... \& \& # 3. With the \-W option (see the \-W option below) \& exiftool \-W+! out.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 (Note that special characters may have a width of greater than one.) .Sp For \f(CW%d\fR and \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 8 \& 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 \& pics/2012/02 %\-1:D 02 bottom level folder name \& /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 9 \& \-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 ... \& \-w I.%.3uc.txt # I.AAA.txt, I.AAB.txt, I.AAC.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. A leading '\-' causes the number to be reset at the start of each new directory, and '+' has no effect. 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 and \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 and \f(CW%C\fR are 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. See the \fB\-w\fR option documentation above for details of the basic functionality. Listed here are the differences between \fB\-W\fR and \fB\-w\fR: .Sp 1) With \fB\-W\fR, a new output file is created for each extracted tag. .Sp 2) \fB\-W\fR supports four 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), and \f(CW%o\fR represents the value of the OriginalRawFileName or OriginalFileName tag from the input file (including extension). 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. For example, the following pairs of commands give the same result: .Sp .Vb 3 \& # overwriting existing text file \& exiftool test.jpg > out.txt # shell redirection \& exiftool test.jpg \-W+! out.txt # equivalent \-W option \& \& # append to existing text file \& exiftool test.jpg >> out.txt # shell redirection \& exiftool test.jpg \-W+ out.txt # equivalent \-W option .Ve .Sp 4) Adding the \fB\-v\fR option to \fB\-W\fR sends a list of the tags and output file names to the console 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, \f(CW%s\fR or \f(CW%o\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 or \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. .Sp By default, \fB\-X\fR outputs flattened tags, so \fB\-struct\fR should be added if required to preserve \s-1XMP\s0 structures. 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 (see \fB\-t\fR for details). .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 with ExifTool family 1 group names as namespaces, and not the standard \s-1XMP\s0 properties and namespaces. 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 when reading unless the \fB\-ee\fR or \fB\-X\fR options are used or the Duplicates option is enabled in the configuration file. When writing, this option allows multiple Warning messages to be shown. Duplicate tags are always extracted when copying. .IP "\fB\-e\fR (\fB\-\-composite\fR)" 5 .IX Item "-e (--composite)" Extract existing tags only \*(-- don't generate composite tags. .IP "\fB\-ee\fR[\fI\s-1NUM\s0\fR] (\fB\-extractEmbedded\fR)" 5 .IX Item "-ee[NUM] (-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 or videos with streaming metadata. .Sp When used with \fB\-ee\fR, the \fB\-p\fR option is evaluated for each embedded document as if it were a separate input file. This allows, for example, generation of \s-1GPS\s0 track logs from timed metadata in videos. See for examples. .Sp Setting \fI\s-1NUM\s0\fR to 2 causes the H264 video stream in \s-1MP4\s0 videos to be parsed until the first Supplemental Enhancement Information (\s-1SEI\s0) message is decoded, or 3 to parse the entire H624 stream and decode all \s-1SEI\s0 information. For M2TS videos, a setting of 3 causes the entire file to be parsed in search of unlisted programs which may contain timed \s-1GPS.\s0 .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. A plus sign may be added (ie. \fB\-ext+\fR) to add the specified extension to the normally processed files. \s-1EXT\s0 may begin with a leading '.', which is ignored. Case is not significant. \f(CW"*"\fR may be used to process files with any extension (or none at all), as in the last three examples: .Sp .Vb 6 \& exiftool \-ext JPG DIR # process only JPG files \& exiftool \-\-ext cr2 \-\-ext dng DIR # supported files but CR2/DNG \& exiftool \-ext+ txt DIR # supported files plus TXT \& exiftool \-ext "*" DIR # process all files \& exiftool \-ext "*" \-\-ext xml DIR # process all but XML files \& exiftool \-ext "*" \-\-ext . DIR # all but those with no ext .Ve .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. .Sp Note that all files specified on the command line will be processed regardless of extension unless the \fB\-ext\fR option is used. .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. With \fB\-fast\fR (or \fB\-fast1\fR), 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, and to stop processing at the \&\s-1IDAT\s0 chunk of \s-1PNG\s0 images and the mdat atom of QuickTime-format files (but note that some files may store metadata after this). \fB\-fast3\fR avoids extracting metadata from the file, and returns only pseudo System tags, but still reads the file header to obtain an educated guess at FileType. \&\fB\-fast4\fR doesn't even read the file header, and returns only System tags and a FileType based on the file extension. \fB\-fast5\fR also disables generation of the Composite tags (like \fB\-e\fR). Has no effect when writing. .Sp Note that a separate \fB\-fast\fR setting may be used for evaluation of a \fB\-if\fR condition, or when ordering files with the \fB\-fileOrder\fR option. See the \&\fB\-if\fR and \fB\-fileOrder\fR options for details. .IP "\fB\-fileOrder\fR[\fI\s-1NUM\s0\fR] [\-]\fI\s-1TAG\s0\fR" 5 .IX Item "-fileOrder[NUM] [-]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. Numbers are sorted numerically, and all other values are sorted alphabetically. Files missing the specified tag are sorted last. 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 can incur large performance penalty since it involves an additional initial processing pass of all files, but this impact may be reduced by specifying a \fI\s-1NUM\s0\fR to effectively set the \fB\-fast\fR level for the initial pass. For example, \fB\-fileOrder4\fR may be used if \fI\s-1TAG\s0\fR is a pseudo System tag. If multiple \fB\-fileOrder\fR options are used, the extraction is done at the lowest \fB\-fast\fR level. Note that files are sorted across directory boundaries if multiple input directories are specified. .IP "\fB\-i\fR \fI\s-1DIR\s0\fR (\fB\-ignore\fR)" 5 .IX Item "-i DIR (-ignore)" Ignore specified directory name. \fI\s-1DIR\s0\fR may be either an individual folder name, or a full path. If a full path is specified, it must match the Directory tag exactly to be ignored. 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 avoid recursing into directories which are symbolic links when the \fB\-r\fR option is used. As well, a value of \f(CW\*(C`HIDDEN\*(C'\fR (case sensitive) may be used to ignore files with names that start with a \&\*(L".\*(R" (ie. hidden files on Unix systems) when scanning a directory. .IP "\fB\-if\fR[\fI\s-1NUM\s0\fR] \fI\s-1EXPR\s0\fR" 5 .IX Item "-if[NUM] 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 2 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). .Sp 6) A special \*(L"\s-1OK\*(R"\s0 UserParam is available to test the success of the previous command when \fB\-execute\fR was used, and may be used like any other tag in the condition (ie. \*(L"$OK\*(R"). .Sp 7) The \s-1API\s0 RequestTags option is automatically set for all tags used in the \&\fB\-if\fR condition. .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"). Note that this causes missing values in \&\fB\-tagsFromFile\fR, \fB\-p\fR and \fB\-if\fR strings to be set to an empty string rather than an undefined value. .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, EXIF, EXV, MIE, ICC/ICM, VRD, DR4 .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, other extended attributes 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. .Sp Note that this option reverts to the behaviour of the \fB\-overwrite_original\fR option when also writing the FileName and/or Directory tags. .IP "\fB\-P\fR (\fB\-preserve\fR)" 5 .IX Item "-P (-preserve)" Preserve the filesystem modification date/time (\f(CW\*(C`FileModifyDate\*(C'\fR) of the original file when writing. Note that some filesystems store a creation date (ie. \f(CW\*(C`FileCreateDate\*(C'\fR on Windows and Mac systems) which is not affected by this option. This creation date is preserved on Windows systems where Win32API::File and Win32::API are available regardless of this setting. For other systems, the \fB\-overwrite_original_in_place\fR option may be used if necessary to preserve the creation date. The \fB\-P\fR option is superseded by any value written to the FileModifyDate tag. .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. This option is ignored if a password is not required. .IP "\fB\-progress\fR[\s-1NUM\s0][:[\fI\s-1TITLE\s0\fR]]" 5 .IX Item "-progress[NUM][:[TITLE]]" Show the progress when processing files. Without a colon, the \fB\-progress\fR option adds a progress count in brackets after the name of each processed file, giving the current file number and the total number of files to be processed. Implies the \fB\-v0\fR option, causing the names of processed files to also be printed 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. If \s-1NUM\s0 is specified, the progress is shown every \s-1NUM\s0 input files. .Sp If followed by a colon (ie. \fB\-progress:\fR), the console window title is set according to the specified \fI\s-1TITLE\s0\fR string. If no \fI\s-1TITLE\s0\fR is given, a default \fI\s-1TITLE\s0\fR string of \*(L"ExifTool \f(CW%p\fR%%\*(R" is assumed. In the string, \f(CW%f\fR represents the file name, \f(CW%p\fR is the progress as a percent, \f(CW%r\fR is the progress as a ratio, %##b is a progress bar of width \*(L"##\*(R" (where \*(L"##\*(R" is an integer specifying the bar width in characters, or 20 characters by default if \*(L"##\*(R" is omitted), and %% is a % character. May be combined with the normal \fB\-progress\fR option to also show the progress count in console messages. (Note: For this feature to function correctly on Mac/Linux, stderr must go to the console.) .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. Subdirectories with names beginning with \*(L".\*(R" are not processed unless \*(L".\*(R" is added to the option name (ie. \fB\-r.\fR or \&\fB\-recurse.\fR). 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). Combine this with \&\fB\-ext\fR options to control the types of files processed. .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. The default write mode is \f(CW\*(C`wcg\*(C'\fR. .Sp .Vb 3 \& w \- Write existing tags \& c \- Create new tags \& g \- create new Groups as necessary .Ve .Sp For example, use \f(CW\*(C`\-wm cg\*(C'\fR to only create new tags (and avoid editing existing ones). .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 available). When writing, causes compressed information to be written if supported by the metadata format (eg. compressed textual metadata in \s-1PNG\s0), disables the recommended padding in embedded \s-1XMP\s0 (saving 2424 bytes when writing \s-1XMP\s0 in a file), and writes \s-1XMP\s0 in shorthand format \*(-- the equivalent of setting the \s-1API\s0 Compress=1 and Compact=\*(L"NoPadding,Shorthand\*(R". .PP \fIOther options\fR .IX Subsection "Other options" .IP "\fB\-@\fR \fI\s-1ARGFILE\s0\fR" 5 .IX Item "-@ ARGFILE" Read command-line arguments from the specified file. The file contains one argument per line (\s-1NOT\s0 one option per line \*(-- some options require additional arguments, and all arguments must be placed on separate lines). Blank lines and lines beginning with \f(CW\*(C`#\*(C'\fR are ignored (unless they start with \f(CW\*(C`#[CSTR]\*(C'\fR, in which case the rest of the line is treated as a C string, allowing standard C escape sequences such as \*(L"\en\*(R" for a newline). White space at the start of a line is removed. 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. \&\fI\s-1ARGFILE\s0\fR may exist relative to either the current directory or the exiftool directory unless an absolute pathname is given. .Sp For example, the following \fI\s-1ARGFILE\s0\fR will set the value of Copyright to \&\*(L"Copyright \s-1YYYY,\s0 Phil Harvey\*(R", where \*(L"\s-1YYYY\*(R"\s0 is the year of CreateDate: .Sp .Vb 3 \& \-d \& %Y \& \-copyright and config_files/example.config in the full ExifTool distribution for details about the configuration file syntax. .IP "\fB\-echo\fR[\fI\s-1NUM\s0\fR] \fI\s-1TEXT\s0\fR" 5 .IX Item "-echo[NUM] TEXT" Echo \fI\s-1TEXT\s0\fR to stdout (\fB\-echo\fR or \fB\-echo1\fR) or stderr (\fB\-echo2\fR). Text is output as the command line is parsed, before the processing of any input files. \fI\s-1NUM\s0\fR may also be 3 or 4 to output text (to stdout or stderr respectively) after processing is complete. For \fB\-echo3\fR and \fB\-echo4\fR, \&\*(L"${status}\*(R" may be used in the \fI\s-1TEXT\s0\fR string to represent the numerical exit status of the command (see \*(L"\s-1EXIT STATUS\*(R"\s0). .IP "\fB\-efile\fR[\fI\s-1NUM\s0\fR][!] \fI\s-1ERRFILE\s0\fR" 5 .IX Item "-efile[NUM][!] ERRFILE" Save the names of files giving errors (\fI\s-1NUM\s0\fR missing or 1), files that were unchanged (\fI\s-1NUM\s0\fR is 2), files that fail the \fB\-if\fR condition (\fI\s-1NUM\s0\fR is 4), or any combination thereof by summing \fI\s-1NUM\s0\fR (eg. \fB\-efile3\fR is the same has having both \fB\-efile\fR and \fB\-efile2\fR options with the same \fI\s-1ERRFILE\s0\fR). By default, file names are appended to any existing \fI\s-1ERRFILE\s0\fR, but \&\fI\s-1ERRFILE\s0\fR is overwritten if an exclamation point is added to the option (eg. \fB\-efile!\fR). Saves the name of the file specified by the \fB\-srcfile\fR option if applicable. .IP "\fB\-execute\fR[\fI\s-1NUM\s0\fR]" 5 .IX Item "-execute[NUM]" Execute command for all arguments up to this point on the command line (plus any arguments specified by \fB\-common_args\fR). The result is as if the commands were executed as separate command lines (with the exception of the \&\fB\-config\fR and \fB\-use\fR options which remain in effect for subsequent commands). Allows multiple commands to be executed from a single command line. \fI\s-1NUM\s0\fR is an optional number that is echoed in the \*(L"{ready}\*(R" message when using the \fB\-stay_open\fR feature. If a \fI\s-1NUM\s0\fR is specified, the \fB\-q\fR option no longer suppresses the output \*(L"{readyNUM}\*(R" message. .IP "\fB\-list_dir\fR" 5 .IX Item "-list_dir" List directories themselves instead of their contents. This option effectively causes directories to be treated as normal files when reading and writing. For example, with this option the output of the \f(CW\*(C`ls \-la\*(C'\fR command on Mac/Linux may be approximated by this exiftool command: .Sp .Vb 1 \& exiftool \-list_dir \-T \-ls\-l \-api systemtags \-fast5 .* * .Ve .Sp (The \fB\-T\fR option formats the output in tab-separated columns, \fB\-ls\-l\fR is a shortcut tag, the \s-1API\s0 SystemTags option is required to extract some necessary tags, and the \fB\-fast5\fR option is added for speed since only system tags are being extracted.) .IP "\fB\-srcfile\fR \fI\s-1FMT\s0\fR" 5 .IX Item "-srcfile FMT" Specify a different source file to be processed based on the name of the original \fI\s-1FILE\s0\fR. This may be useful in some special situations for processing related preview images or sidecar files. See the \fB\-w\fR option for a description of the \fI\s-1FMT\s0\fR syntax. Note that file name \fI\s-1FMT\s0\fR strings for all options are based on the original \fI\s-1FILE\s0\fR specified from the command line, not the name of the source file specified by \fB\-srcfile\fR. .Sp For example, to copy metadata from \s-1NEF\s0 files to the corresponding \s-1JPG\s0 previews in a directory where other \s-1JPG\s0 images may exist: .Sp .Vb 1 \& exiftool \-ext nef \-tagsfromfile @ \-srcfile %d%f.jpg dir .Ve .Sp If more than one \fB\-srcfile\fR option is specified, the files are tested in order and the first existing source file is processed. If none of the source files already exist, then exiftool uses the first \fB\-srcfile\fR specified. .Sp A \fI\s-1FMT\s0\fR of \f(CW\*(C`@\*(C'\fR may be used to represent the original \fI\s-1FILE\s0\fR, which may be useful when specifying multiple \fB\-srcfile\fR options (eg. to fall back to processing the original \fI\s-1FILE\s0\fR if no sidecar exists). .Sp When this option is used, two special UserParam tags (OriginalFileName and OriginalDirectory) are generated to allow access to the original \fI\s-1FILE\s0\fR name and directory. .IP "\fB\-stay_open\fR \fI\s-1FLAG\s0\fR" 5 .IX Item "-stay_open FLAG" If \fI\s-1FLAG\s0\fR is \f(CW1\fR or \f(CW\*(C`True\*(C'\fR (case insensitive), causes exiftool keep reading from the \fB\-@\fR \fI\s-1ARGFILE\s0\fR 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: .Sp 1) Execute \f(CW\*(C`exiftool \-stay_open True \-@ \f(CIARGFILE\f(CW\*(C'\fR, where \fI\s-1ARGFILE\s0\fR is the name of an existing (possibly empty) argument file or \f(CW\*(C`\-\*(C'\fR to pipe arguments from the standard input. .Sp 2) Write exiftool command-line arguments to \fI\s-1ARGFILE\s0\fR, one argument per line (see the \fB\-@\fR option for details). .Sp 3) Write \f(CW\*(C`\-execute\en\*(C'\fR to \fI\s-1ARGFILE\s0\fR, where \f(CW\*(C`\en\*(C'\fR 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 \*(L"{ready}\*(R" message to stdout when done (unless the \fB\-q\fR or \fB\-T\fR option is used), and continue trying to read arguments for the next command from \fI\s-1ARGFILE\s0\fR. To aid in command/response synchronization, any number appended to the \fB\-execute\fR option is echoed in the \*(L"{ready}\*(R" message. For example, \f(CW\*(C`\-execute613\*(C'\fR results in \*(L"{ready613}\*(R". When this number is added, \fB\-q\fR no longer suppresses the \*(L"{ready}\*(R" message. (Also, see the \fB\-echo3\fR and \fB\-echo4\fR options for additional ways to pass signals back to your application.) .Sp 4) Repeat steps 2 and 3 for each command. .Sp 5) Write \f(CW\*(C`\-stay_open\enFalse\en\*(C'\fR (or \f(CW\*(C`\-stay_open\en0\en\*(C'\fR) to \fI\s-1ARGFILE\s0\fR when done. This will cause exiftool to process any remaining command-line arguments then exit normally. .Sp The input \fI\s-1ARGFILE\s0\fR may be changed at any time before step 5 above by writing the following lines to the currently open \fI\s-1ARGFILE\s0\fR: .Sp .Vb 4 \& \-stay_open \& True \& \-@ \& NEWARGFILE .Ve .Sp This causes \fI\s-1ARGFILE\s0\fR to be closed, and \fI\s-1NEWARGFILE\s0\fR to be kept open. (Without the \fB\-stay_open\fR here, exiftool would have returned to reading arguments from \fI\s-1ARGFILE\s0\fR after reaching the end of \fI\s-1NEWARGFILE\s0\fR.) .Sp Note: When writing arguments to a disk file there is a delay of up to 0.01 seconds after writing \f(CW\*(C`\-execute\en\*(C'\fR before exiftool starts processing the command. This delay may be avoided by sending a \s-1CONT\s0 signal to the exiftool process immediately after writing \f(CW\*(C`\-execute\en\*(C'\fR. (There is no associated delay when writing arguments via a pipe with \f(CW\*(C`\-@ \-\*(C'\fR, so the signal is not necessary when using this technique.) .IP "\fB\-userParam\fR \fIPARAM[[^]=[\s-1VAL\s0]]\fR" 5 .IX Item "-userParam PARAM[[^]=[VAL]]" Set user parameter. \fI\s-1PARAM\s0\fR is an arbitrary user parameter name. This is an interface to the \s-1API\s0 UserParam option (see the Image::ExifTool Options documentation), and provides a method to access user-defined parameters in arguments to the \&\fB\-if\fR and \fB\-p\fR options as if they were any other tag. Appending a hash tag (\f(CW\*(C`#\*(C'\fR) to \fI\s-1PARAM\s0\fR (eg. \f(CW\*(C`\-userParam MyTag#=yes\*(C'\fR) also causes the parameter to be extracted as a normal tag in the UserParam group. Similar to the \fB\-api\fR option, the parameter value is set to 1 if \fI=VAL\fR is omitted, undef if just \fI\s-1VAL\s0\fR is omitted with \f(CW\*(C`=\*(C'\fR, or an empty string if \&\fI\s-1VAL\s0\fR is omitted with \f(CW\*(C`^=\*(C'\fR. .Sp .Vb 1 \& exiftool \-p \*(Aq$test from $filename\*(Aq \-userparam test=Hello FILE .Ve .PP \fIAdvanced formatting feature\fR .IX Subsection "Advanced formatting feature" .PP An advanced formatting feature allows modification of the value of any tag interpolated within a \fB\-if\fR or \fB\-p\fR option argument, or a \fB\-tagsFromFile\fR redirection string. Tag names within these strings are prefixed by a \f(CW\*(C`$\*(C'\fR symbol, and an arbitrary Perl expression may be applied to the tag value by placing braces around the tag name and inserting the expression after the name, separated by a semicolon (ie. \f(CW\*(C`${TAG;EXPR}\*(C'\fR). The expression acts on the value of the tag through the default input variable (\f(CW$_\fR), and has access to the full ExifTool \s-1API\s0 through the current ExifTool object (\f(CW$self\fR) and the tag key (\f(CW$tag\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: .PP .Vb 1 \& exiftool \-p \*(Aq${make;tr/ /_/;s/_\|_+/_/g}\*(Aq image.jpg .Ve .PP An \f(CW\*(C`@\*(C'\fR may be added after the tag name to make the expression act on individual list items for list-type tags, simplifying list processing. Set \&\f(CW$_\fR to undef to remove an item from the list. As an example, the following command returns all subjects not containing the string \*(L"xxx\*(R": .PP .Vb 1 \& exiftool \-p \*(Aq${subject@;$_=undef if /xxx/}\*(Aq image.jpg .Ve .PP A default expression of \f(CW\*(C`tr(/\e\e?*:|"<>\e0)()d\*(C'\fR is assumed if the expression is empty (ie. \f(CW\*(C`${TAG;}\*(C'\fR). This removes the characters / \e ? * : | < > and null from the printed value. (These characters are illegal in Windows file names, so this feature is useful if tag values are used in file names.) .PP Helper functions .IX Subsection "Helper functions" .PP \&\f(CW\*(C`DateFmt\*(C'\fR .PP Simplifies reformatting of individual date/time values. This function acts on a standard EXIF-formatted date/time value in \f(CW$_\fR and formats it according to the specified format string (see the \fB\-d\fR option). To avoid trying to reformat an already-formatted date/time value, a \f(CW\*(C`#\*(C'\fR must be added to the tag name (as in the example below) if the \fB\-d\fR option is also used. For example: .PP .Vb 1 \& exiftool \-p \*(Aq${createdate#;DateFmt("%Y\-%m\-%d_%H%M%S")}\*(Aq a.jpg .Ve .PP \&\f(CW\*(C`ShiftTime\*(C'\fR .PP Shifts EXIF-formatted date/time string by a specified amount. Start with a leading minus sign to shift backwards in time. See Image::ExifTool::Shift.pl for details about shift syntax. For example, to shift a date/time value back by one year: .PP .Vb 1 \& exiftool \-p \*(Aq${createdate;ShiftTime("\-1:0:0 0")}\*(Aq a.jpg .Ve .PP \&\f(CW\*(C`NoDups\*(C'\fR .PP Removes duplicate items from a list with a separator specified by the \&\fB\-sep\fR option. This function is most useful when copying list-type tags. For example, the following command may be used to remove duplicate Keywords: .PP .Vb 1 \& exiftool \-sep \*(Aq##\*(Aq \*(Aq\-keywords<${keywords;NoDups}\*(Aq a.jpg .Ve .PP The \fB\-sep\fR option is necessary to split the string back into individual list items when writing to a list-type tag. .PP An optional flag argument may be set to 1 to cause \f(CW\*(C`NoDups\*(C'\fR to set \f(CW$_\fR to undef if no duplicates existed, thus preventing the file from being rewritten unnecessarily: .PP .Vb 1 \& exiftool \-sep \*(Aq##\*(Aq \*(Aq\-keywords<${keywords;NoDups(1)}\*(Aq a.jpg .Ve .PP Note that function names are case sensitive. .SH "WINDOWS UNICODE FILE NAMES" .IX Header "WINDOWS UNICODE FILE NAMES" In Windows, command-line arguments are specified using the current code page and are recoded automatically to the system code page. This recoding is not done for arguments in ExifTool arg files, so by default filenames in arg files use the system code page. Unfortunately, these code pages are not complete character sets, so not all file names may be represented. .PP ExifTool 9.79 and later allow the file name encoding to be specified with \&\f(CW\*(C`\-charset filename=CHARSET\*(C'\fR, where \f(CW\*(C`CHARSET\*(C'\fR is the name of a valid ExifTool character set, preferably \f(CW\*(C`UTF8\*(C'\fR (see the \fB\-charset\fR option for a complete list). Setting this triggers the use of Windows wide-character i/o routines, thus providing support for most Unicode file names (see note 4). But note that it is not trivial to pass properly encoded file names on the Windows command line (see for details), so placing them in a \s-1UTF\-8\s0 encoded \fB\-@\fR argfile and using \&\f(CW\*(C`\-charset filename=utf8\*(C'\fR is recommended if possible. .PP A warning is issued if a specified filename contains special characters and the filename character set was not provided. However, the warning may be disabled by setting \f(CW\*(C`\-charset filename=""\*(C'\fR, and ExifTool may still function correctly if the system code page matches the character set used for the file names. .PP When a directory name is provided, the file name encoding need not be specified (unless the directory name contains special characters), and ExifTool will automatically use wide-character routines to scan the directory. .PP The filename character set applies to the \fI\s-1FILE\s0\fR arguments as well as filename arguments of \fB\-@\fR, \fB\-geotag\fR, \fB\-o\fR, \fB\-p\fR, \fB\-srcfile\fR, \&\fB\-tagsFromFile\fR, \fB\-csv\fR=, \fB\-j\fR= and \fB\-\fR\fI\s-1TAG\s0\fR<=. However, it does not apply to the \fB\-config\fR filename, which always uses the system character set. The \f(CW\*(C`\-charset filename=\*(C'\fR option must come before the \fB\-@\fR option to be effective, but the order doesn't matter with respect to other options. .PP Notes: .PP 1) FileName and Directory tag values still use the same encoding as other tag values, and are converted to/from the filename character set when writing/reading if specified. .PP 2) Unicode support is not yet implemented for other Windows-based systems like Cygwin. .PP 3) See \*(L"\s-1WRITING\s0 READ-ONLY \s-1FILES\*(R"\s0 below for a note about editing read-only files with Unicode names. .PP 4) Unicode file names with surrogate pairs (code points over U+FFFF) still cause problems. .SH "WRITING READ-ONLY FILES" .IX Header "WRITING READ-ONLY FILES" In general, ExifTool may be used to write metadata to read-only files provided that the user has write permission in the directory. However, there are three cases where file write permission is also required: .PP 1) When using the \fB\-overwrite_original_in_place\fR option. .PP 2) When writing only pseudo System tags (eg. FileModifyDate). .PP 3) On Windows if the file has Unicode characters in its name, and a) the \&\fB\-overwrite_original\fR option is used, or b) the \f(CW\*(C`_original\*(C'\fR backup already exists. .PP Hidden files in Windows behave as read-only files when attempting to write any real tags to the file \*(-- an error is generated when using the \&\fB\-overwrite_original_in_place\fR, otherwise writing should be successful and the hidden attribute will be removed. But the \fB\-if\fR option may be used to avoid processing hidden files (provided Win32API::File is available): .PP .Vb 1 \& exiftool \-if "$fileattributes !~ /Hidden/" ... .Ve .SH "READING EXAMPLES" .IX Header "READING EXAMPLES" \&\fBNote\fR: 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. .IP "exiftool \-a \-u \-g1 a.jpg" 5 .IX Item "exiftool -a -u -g1 a.jpg" Print all meta information in an image, including duplicate and unknown tags, sorted by group (for family 1). For performance reasons, this command may not extract all available metadata. (Metadata in embedded documents, metadata extracted by external utilities, and metadata requiring excessive processing time may not be extracted). Add \f(CW\*(C`\-ee3\*(C'\fR and \f(CW\*(C`\-api RequestAll=3\*(C'\fR to the command to extract absolutely everything available. .IP "exiftool \-common dir" 5 .IX Item "exiftool -common dir" Print common meta information for all images in \f(CW\*(C`dir\*(C'\fR. \f(CW\*(C`\-common\*(C'\fR is a shortcut tag representing common \s-1EXIF\s0 meta information. .IP "exiftool \-T \-createdate \-aperture \-shutterspeed \-iso dir > 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 \-a \-b \-W %d%f_%t%\-c.%s \-preview:all dir" 5 .el .IP "exiftool \-a \-b \-W \f(CW%d\fR%f_%t%\-c.%s \-preview:all dir" 5 .IX Item "exiftool -a -b -W %d%f_%t%-c.%s -preview:all dir" Extract all types of preview images (ThumbnailImage, PreviewImage, JpgFromRaw, etc.) from files in directory \*(L"dir\*(R", adding the tag name to the output preview image file names. .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 \-ee3 \-p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts" 5 .el .IP "exiftool \-ee3 \-p '$gpslatitude, \f(CW$gpslongitude\fR, \f(CW$gpstimestamp\fR' a.m2ts" 5 .IX Item "exiftool -ee3 -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 metadata-only files may be created like this (files containing images 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. .IP "exiftool \-geotag log.gpx '\-xmp:geotime out.gpx" 5 .IX Item "exiftool -p gpx.fmt 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 "INTERRUPTING EXIFTOOL" .IX Header "INTERRUPTING EXIFTOOL" Interrupting exiftool with a CTRL-C or \s-1SIGINT\s0 will not result in partially written files or temporary files remaining on the hard disk. The exiftool application traps \s-1SIGINT\s0 and defers it until the end of critical processes if necessary, then does a proper cleanup before exiting. .SH "EXIT STATUS" .IX Header "EXIT STATUS" The exiftool application exits with a status of 0 on success, or 1 if an error occurred, or 2 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\-2023, 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" \&\fBImage::ExifTool\fR\|(3pm), \&\fBImage::ExifTool::TagNames\fR\|(3pm), \&\fBImage::ExifTool::Shortcuts\fR\|(3pm), Image::ExifTool::Shift.pl