NAME exiftool - Read and write meta information in files RUNNING IN WINDOWS Drag and drop files or folders onto the exiftool executable to display meta information, or rename to "exiftool.exe" and run from the command line to access all exiftool features. This stand-alone Windows version allows simple command-line options to be added to the name of the executable (in brackets and separated by spaces at the end of the name), providing a mechanism to use options when launched via the mouse. For example, changing the executable name to "exiftool(-a -u -g1 -w txt).exe" gives a drag-and-drop utility which generates sidecar ".txt" files with detailed meta information. As shipped, the -k option is added to cause exiftool to pause before terminating (to keep the command window open). Options may also be added to the "Target" property of a Windows shortcut to the executable. SYNOPSIS exiftool [*OPTIONS*] [-*TAG*...] [--*TAG*...] *FILE*... exiftool [*OPTIONS*] -*TAG*[+-<]=[*VALUE*]... *FILE*... exiftool [*OPTIONS*] -tagsFromFile *SRCFILE* [-*SRCTAG*[>*DSTTAG*]...] *FILE*... exiftool [ -ver | -list[w|f|wf|g[*NUM*]|d|x] ] For specific examples, see the EXAMPLES sections below. DESCRIPTION A command-line interface to Image::ExifTool, used for reading and writing meta information in image, audio and video files. *FILE* is a source file name, directory name, or "-" for the standard input. Multiple files may be processed with a single command. Information is read from the source files and output in readable form to the console (or written to output text files with the -w option). To write or copy information, new tag values are specified with the -*TAG*=[*VALUE*] syntax or the -tagsFromFile or -geotag options. This causes each *FILE* to be rewritten, and by default the original files are preserved with "_original" appended to their names. (Be sure to verify that the new files are OK before erasing the originals.) Once in write mode, exiftool will ignore any read-specific options. Note: If *FILE* is a directory name then only supported file types in the directory are processed, or only writable types are processed if any tag is written. However, a filename may be specified or the -ext option may be used to force processing of files with any extension. Below is a list of file types and meta information formats currently supported by ExifTool (r = read, w = write, c = create): File Types ------------+-------------+-------------+-------------+------------ 3FR r | DVB r | M2TS r | PAGES r | RWL r/w 3G2 r | DYLIB r | M4A/V r | PBM r/w | RWZ r 3GP r | EIP r | MEF r/w | PDF r/w | RM r ACR r | EPS r/w | MIE r/w/c | PEF r/w | SO r AFM r | ERF r/w | MIFF r | PFA r | SR2 r/w AI r/w | EXE r | MKA r | PFB r | SRF r AIFF r | EXIF r/w/c | MKS r | PFM r | SRW r/w APE r | F4A/V r | MKV r | PGM r/w | SVG r ARW r/w | FLA r | MNG r/w | PICT r | SWF r ASF r | FLAC r | MOS r/w | PMP r | THM r/w AVI r | FLV r | MOV r | PNG r/w | TIFF r/w BMP r | FPX r | MP3 r | PPM r/w | TTC r BTF r | GIF r/w | MP4 r | PPT r | TTF r COS r | GZ r | MPC r | PPTX r | VRD r/w/c CR2 r/w | HDP r/w | MPG r | PS r/w | WAV r CRW r/w | HTML r | MPO r/w | PSB r/w | WDP r/w CS1 r/w | ICC r/w/c | MQV r | PSD r/w | WMA r DCM r | IIQ r | MRW r/w | PSP r | WMV r DCP r/w | IND r/w | NEF r/w | QTIF r | X3F r DCR r | ITC r | NRW r/w | RA r | XLS r DFONT r | JNG r/w | NUMBERS r | RAF r/w | XLSX r DIVX r | JP2 r/w | ODP r | RAM r | XMP r/w/c DJVU r | JPEG r/w | ODS r | RAW r/w | ZIP r DLL r | K25 r | ODT r | RIFF r | DNG r/w | KDC r | OGG r | RSRC r | DOC r | KEY r | ORF r/w | RTF r | DOCX r | LNK r | OTF r | RW2 r/w | Meta Information ----------------------+----------------------+--------------------- EXIF r/w/c | Kodak Meta r/w | Adobe APP14 r GPS r/w/c | PhotoMechanic r/w | MPF r IPTC r/w/c | JPEG 2000 r | Stim r XMP r/w/c | DICOM r | APE r MakerNotes r/w/c | Flash r | Vorbis r Photoshop IRB r/w/c | FlashPix r | SPIFF r ICC Profile r/w/c | QuickTime r | DjVu r MIE r/w/c | Matroska r | M2TS r JFIF r/w/c | GeoTIFF r | PE/COFF r Ducky APP12 r/w/c | PrintIM r | AVCHD r PDF r/w/c | ID3 r | ZIP r CIFF r/w | Ricoh RMETA r | (and more) AFCP r/w | Picture Info r | 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 is defined. 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. Note that multiple single-character options may NOT be combined into one argument because this would be interpreted as a tag name. Option Summary -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[+-] for more information about character sets. Valid *CHARSET* values are: CHARSET Alias(es) Description ---------- --------------- ---------------------------------- UTF8 cp65001, UTF-8 UTF-8 characters Latin cp1252, Latin1 Windows Latin1 (West European) Latin2 cp1250 Windows Latin2 (Central European) Cyrillic cp1251, Russian Windows Cyrillic Greek cp1253 Windows Greek Turkish cp1254 Windows Turkish Hebrew cp1255 Windows Hebrew Arabic cp1256 Windows Arabic Baltic cp1257 Windows Baltic Vietnam cp1258 Windows Vietnamese Thai cp874 Windows Thai MacRoman cp10000, Roman Macintosh Roman MacLatin2 cp10029 Macintosh Latin2 (Central Europe) MacCyrillic cp10007 Macintosh Cyrillic MacGreek cp10006 Macintosh Greek MacTurkish cp10081 Macintosh Turkish MacRomanian cp10010 Macintosh Romanian MacIceland cp10079 Macintosh Icelandic MacCroatian cp10082 Macintosh Croatian -d *FMT* (-dateFormat) Set the format for date/time tag values. Consult "strftime" man page for *FMT* syntax. The default format is equivalent to "%Y:%m:%d %H:%M:%S". This option has no effect on date-only or time-only tags and ignores timezone information if present. Only one -d option may be used per command. The inverse operation (ie. un-formatting a date/time value) is currently not applied when writing a date/time tag. -D (-decimal) Show tag ID number in decimal when extracting information. -e (--composite) Print existing tags only -- don't calculate composite tags. -E, -ex (-escapeHTML, -escapeXML) Escape characters in output values for HTML (-E) or XML (-ex). For HTML, all characters with Unicode code points above U+007F are escaped as well as the following 5 characters: & (&) ' (') " (") > (>) and < (<). For XML, only these 5 characters are escaped. The -E option is implied with -h, and -ex is implied with -X. The inverse conversion is applied when writing tags. -ee (-extractEmbedded) Extract information from embedded documents in EPS and PDF files, embedded MPF images in JPEG and MPO files, streaming metadata in AVCHD videos, and the resource fork of Mac OS files. Implies the -a option. Use -g3 or -G3 to identify the originating document for extracted information. Embedded documents containing sub-documents are indicated with dashes in the family 3 group name. (ie. "Doc2-3" is the 3rd sub-document of the 2nd embedded document.) -ext *EXT*, --ext *EXT* (-extension) Process only files with (-ext) or without (--ext) a specified extension. There may be multiple -ext and --ext options. Extensions may begin with a leading '.', and case is not significant. For example: exiftool -ext .JPG DIR # process only JPG files exiftool --ext crw --ext dng DIR # process all but CRW and DNG exiftool --ext . DIR # ignore if no extension -f (-forcePrint) Force printing of tags even if their values are not found. This option only applies when tag names are specified. May also be used to add a 'flags' attribute to the -listx output. -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 *OFFSET* to be specified for adjusting the maker notes base offset. If no *OFFSET* is given, ExifTool takes its best guess at the correct base. Note that exiftool will automatically fix the offsets for images which store original offset information (ie. newer Canon models). Offsets are fixed permanently if -F is used when writing EXIF to an image. ie) exiftool -F -exif:resolutionunit=inches image.jpg -fast[*NUM*] Increase speed of extracting information from JPEG images. With this option, ExifTool will not scan to the end of a JPEG image to check for an AFCP or PreviewImage trailer, or past the first comment in GIF images or the audio/video data in WAV/AVI files to search for additional metadata. These speed benefits are small when reading images directly from disk, but can be substantial if piping images through a network connection. For more substantial speed benefits, -fast2 also causes exiftool to avoid extracting any EXIF MakerNote information. -fileOrder [-]*TAG* Set file processing order according to the sorted value of the specified *TAG*. For example, to process files in order of date: exiftool -fileOrder DateTimeOriginal DIR Additional -fileOrder options may be added as secondary sort keys. Floating point values are sorted numerically, and all other values are sorted alphabetically. The sort order may be reversed by prefixing the tag name with a "-" (ie. "-fileOrder -createdate"). Note that this option has a large performance impact since it involves an additional processing pass of each file. -g[*NUM*][:*NUM*...] (-groupHeadings) Organize output by tag group. *NUM* specifies a group family number, and may be 0 (general location), 1 (specific location), 2 (category), 3 (document number) or 4 (instance number). Multiple families may be specified by separating them with colons. By default the resulting group name is simplified by removing any leading "Main:" and collapsing adjacent identical group names, but this can avoided by placing a colon before the first family number (ie. -g:3:1). If *NUM* is not specified, -g0 is assumed. Use the -listg option to list group names for a specified family. -G[*NUM*][:*NUM*...] (-groupNames) Same as -g but print group name for each tag. -geotag *TRKFILE* Geotag images from the specified GPS track log file. Using the -geotag option is equivalent to writing a value to the "Geotag" tag. After the -geotag option has been specified, the value of the "Geotime" tag is written to define a date/time for the position interpolation. If "Geotime" is not specified, the value is copied from "DateTimeOriginal". For example, the following two commands are equivalent: exiftool -geotag track.log image.jpg exiftool -geotag "-Geotime exiftool -Orientation -S a.jpg Orientation: Rotate 90 CW > exiftool -Orientation -S -n a.jpg Orientation: 6 The print conversion may also be disabled on a per-tag basis by suffixing the tag name with a "#" character: > exiftool -Orientation# -Orientation -S a.jpg Orientation: 6 Orientation: Rotate 90 CW These techniques may also be used to disable the inverse print conversion when writing. For example, the following commands all have the same effect: > exiftool -Orientation='Rotate 90 CW' a.jpg > exiftool -Orientation=6 -n a.jpg > exiftool -Orientation#=6 a.jpg -o *OUTFILE* or *FMT* (-out) Set the output file or directory name when writing information. (Without this option, the original file is renamed to "FILE_original" and output is sent to *FILE*.) The output file name may also be specified using a *FMT* string in which %d, %f and %e represent the directory, file name and extension of *FILE*. Also, %c may be used to add a copy number. See the -w option for *FMT* string examples. 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 -overwrite_original option with -o causes the original source file to be erased after the output file is successfully written. A special feature of this option allows it to be used to create certain types of files from scratch. Currently, this can only be done with XMP, ICC/ICM, MIE, VRD and EXIF files by specifying the appropriate extension for *OUTFILE*. The file is created from a combination of information in *FILE* (as if the -tagsFromFile option was used), and tag values assigned on the command line. If no *FILE* is specified, the output file may be created from scratch using only tags assigned on the command line. -overwrite_original Overwrite the original *FILE* (instead of preserving it by adding "_original" to the file name) when writing information to an image. Caution: This option should only be used if you already have separate backup copies of your image files. The overwrite is implemented by renaming a temporary file to replace the original. This deletes the original file and replaces it with the edited version in a single operation. When combined with -o, this option causes the original file to be deleted if the output file was successfully written. -overwrite_original_in_place Similar to -overwrite_original except that an extra step is added to allow the original file attributes to be preserved. For example, on a Mac this causes the original file creation date, ownership, permissions, type, creator, label color and icon to be preserved. This is implemented by opening the original file in update mode and replacing its data with a copy of a temporary file before deleting the temporary. The extra step results in slower performance, so the -overwrite_original option should be used instead unless necessary. -p *FMTFILE* or *STR* (-printFormat) Print output in the format specified by the given file or string (and ignore other format options). Tag names in the format file or string begin with a "$" symbol and may contain a leading group name and/or a trailing "#". Case is not significant. Braces "{}" may be used around the tag name to separate it from subsequent text. Use $$ to represent a "$" symbol, and $/ for a newline. Multiple -p options may be used, each contributing a line of text to the output. Lines beginning with "#[HEAD]" and "#[TAIL]" are output only for the first and last processed files respectively. Lines beginning with "#[BODY]" and lines not beginning with "#" are output for each processed file. Other lines beginning with "#" are ignored. For example, this format file: # this is a comment line #[HEAD]# Generated by ExifTool $exifToolVersion File: $FileName - $DateTimeOriginal (f/$Aperture, ${ShutterSpeed}s, ISO $EXIF:ISO) #[TAIL]# end with this command: exiftool -p test.fmt a.jpg b.jpg produces output like this: # Generated by ExifTool 8.10 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 When -ee (-extractEmbedded) is combined with -p, embedded documents are effectively processed as separate input files. If a specified tag does not exist, a minor warning is issued and the line with the missing tag is not printed. However, the -f option may be used to set the value of missing tags to '-', or the -m option may be used to ignore minor warnings and leave the missing values empty. -P (-preserve) Preserve the filesystem modification date/time of the original file ("FileModifyDate") when writing. Note that some filesystems (ie. Mac and Windows) store a creation date which is not preserved by this option. For these systems, the -overwrite_original_in_place option may be used to preserve the creation date. -q (-quiet) Quiet processing. One -q suppresses normal informational messages, and a second -q suppresses warnings as well. Error messages can not be suppressed, although minor errors may be downgraded to warnings with the -m option. -r (-recurse) Recursively process files in subdirectories. Only meaningful if *FILE* is a directory name. -s (-short) Short output format. Prints tag names instead of descriptions. Add up to 3 -s options for even shorter formats: -s - print tag names instead of descriptions -s -s - no extra spaces to column-align values -s -s -s - print values only Also effective when combined with -t, -h, -X or -listx options. -S (-veryShort) Very short format. The same as two -s options. Tag names are printed instead of descriptions, and no extra spaces are added to column-align values. -scanForXMP Scan all files (even unrecognized formats) for XMP information unless found already. When combined with the -fast option, only unrecognized file types are scanned. Warning: It can be time consuming to scan large files. -sep *STR* (-separator) Specify separator string for items in List-type tags. When reading, the default is ", ". When writing, this option causes values assigned to list-type tags to be split into individual items at each substring matching specified separator. Space characters in the separator string match zero or more whitespace characters. -struct Output structured information instead of flattening to individual tags. Effective only for XML and JSON output formats (-X and -j) when extracting XMP information. -t (-tab) Output a tab-delimited list of description/values (useful for database import). May be combined with -s to print tag names instead of descriptions, or -S to print tag values only, tab-delimited on a single line. The -t option may also be used to add tag table information to the -X option output. -T (-table) Output tag values in table form. (Equivalent to -t -S -q -f.) -tagsFromFile *SRCFILE* or *FMT* Copy tag values from *SRCFILE* to *FILE*. Tag names on the command line after this option specify the tags to be copied, or excluded from the copy. If no tags are specified, then all tags from the source file are copied. More than one -tagsFromFile option may be used to copy tags from multiple files. By default, this option will commute information between same-named tags in different groups and write each tag to the preferred group. This allows some information to be automatically translated when copying between images of different formats. However, if a group name is specified for a tag then the information is written to the original group (unless redirected to another group, see below). This works even if "All" is used as a group name, so "-All:All" is used to specify that all information be copied to the same group in the destination file. *SRCFILE* may be the same as *FILE* to move information around within a file. In this case, "@" may be used to represent the source file (ie. "-tagsFromFile @"), permitting this feature to be used for batch processing multiple files (see note 3 below). Specified tags are then copied from each file in turn as it is rewritten. For advanced batch use, the source file name may also be specified using a *FMT* string in which %d, %f and %e represent the directory, file name and extension of *FILE*. See -w option for *FMT* string examples. A powerful redirection feature allows a destination tag to be specified for each extracted tag. With this feature, information may be written to a tag with a different name or group. This is done using "-*SRCTAG*>*DSTTAG*" on the command line after -tagsFromFile ("-*DSTTAG*<*SRCTAG*" also works). Note that this argument must be quoted to prevent shell redirection, and there is no "=" sign as when assigning new values. Both source and destination tags may be prefixed by a group name, and "All" or "*" may be used as a tag or group name. If no destination group is specified, the information is written to the preferred group. As a convenience, "-tagsFromFile @" is assumed for any redirected tags which are specified without a prior -tagsFromFile option. Copied tags may also be added or deleted from a list with arguments of the form "-*SRCTAG*+>*DSTTAG*" or "-*SRCTAG*->*DSTTAG*". An extension of the redirection feature allows strings involving tag names to be used on the right hand side of the "<" symbol with the syntax "-*DSTTAG*<*STR*", where tag names in *STR* are prefixed with a "$" symbol. See the -p option for more details about this syntax. Strings starting with a "=" sign must insert a single space after the "<" to avoid confusion with the "<=" syntax which would otherwise attempt to set 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 is preserved. See "COPYING EXAMPLES" for examples using -tagsFromFile. Notes: 1) Be aware of the difference between excluding a tag from being copied (--*TAG*), and deleting a tag (-*TAG*=). Excluding a tag prevents it from being copied to the destination image, but deleting will remove a pre-existing tag from the image. 2) The maker note information is copied as a block, so it isn't affected like other information by subsequent tag assignments on the command line. Also, since the PreviewImage referenced from the maker notes may be rather large, it is not copied, and must be transferred separately if desired. 3) When performing complex batch processing, it is important to note that the order of operations is different for tags copied in batch mode. In general, tags are copied from batch-mode files after all other command-line arguments have been applied. For example, the following two commands are not equivalent: # (not batch mode): Sets xmp:title to "NEW" exiftool -tagsfromfile a.jpg -xmp:title -xmp:title=NEW a.jpg # (batch mode): Preserves original title if it exists exiftool -tagsfromfile @ -xmp:title -xmp:title=NEW a.jpg 4) The normal behaviour of copied tags differs subtly from that of assigned tags for List-type tags. When copying to a list, each copied tag overrides any previous operations on the list. While this avoids duplicate list items when copying groups of tags from a file containing redundant information, it also prevents values of different tags from being copied into the same list when this is the intent. So a -addTagsFromFile option is provided which allows copying of multiple tags into the same list. ie) exiftool -addtagsfromfile @ "-subject out.txt Advanced features: 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: 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 For %c, 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, a copy number of zero is omitted, but this can be changed by adding a decimal point to the modifier. For example: -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 ... A special feature allows the copy number to be incremented for each processed file by using %C (upper case) instead of %c. This allows a sequential number to be added to output file names, even if the names are different. For %C, the number before the decimal place gives the starting index, and the number after the decimal place gives the field width. The following examples show the output filenames when used with the command "exiftool rose.jpg star.jpg jet.jpg ...": -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 All format codes may be modified by 'l' or 'u' to specify lower or upper case respectively (ie. %le for a lower case file extension). When used to modify %c or %C, the numbers are changed to an alphabetical base (see example H above). Also, %c may be modified by 'n' to count using natural numbers starting from 1, instead of 0 (see example F). This same *FMT* syntax is used with the -o and -tagsFromFile options, although %c is only valid for output file names. -x *TAG* (-exclude) Exclude the specified tag. There may be multiple -x options. This has the same effect as --*TAG* on the command line. May also be used following a -tagsFromFile option to exclude tags from being copied. -X (-xmlFormat) Use RDF/XML formatting for console output. Implies the -a option, so duplicate tags are extracted. The formatting options -b, -D, -H, -l, -s, -sep, -struct and -t may be used in combination with -X to affect the output, but note that the tag ID (-D, -H and -t), binary data (-b) and structured output (-struct) options are not effective for the short output (-s). Another restriction of -s is that only one tag with a given group and name may appear in the output. Note that the tag ID options (-D, -H and -t) will produce non-standard RDF/XML unless the -l option is also used. By default, list-type tags with multiple values are formatted as an RDF Bag, but they are combined into a single string when -s or -sep is used. Using -L changes the XML encoding from "UTF-8" to "windows-1252". Other -charset settings change the encoding only if there is a corresponding standard XML character set. The -b option causes binary data values to be written, encoded in base64 if necessary. The -t option adds tag table information to the output (table "name", decimal tag "id", and "index" for cases where multiple conditional tags exist with the same ID). -z (-zip) When reading, causes information to be extracted from .gz and .bz2 compressed images. (Only one image per archive. Requires gzip and bzip2 to be installed on the system.) When writing, causes compressed information to be written if supported by the image format. (ie. The PNG format supports compressed text.) Advanced Options Among other things, the advanced options allow complex processing to be performed from a single command without the need for additional scripting. This may be particularly useful for implementations such as Windows drag-and-drop applications. These options may also be used to improve performance in multi-pass processing by reducing the overhead required to load exiftool for each invocation. -common_args Specifies that all arguments following this option are common to all executed commands when -execute is used. This and the -config option are the only options that may not be used inside a -@ *ARGFILE*. -config *CFGFILE* Load specified configuration file instead of the default ".ExifTool_config". If used, this option must come before all other arguments on the command line. The *CFGFILE* name must include the full path specification, or may be set to an empty string ("") to disable loading of the config file. See the sample configuration file and "config.html" in the full ExifTool distribution for more information about the ExifTool configuration file. -execute Execute command for all arguments up to this point on the command line. Allows multiple commands to be executed from a single command line. -srcfile *FMT* Specify a different source file to be processed based on the name of the original file. This may be useful in some special situations for processing related preview images or sidecar files. See the -w option for a description of the *FMT* syntax. Note that file name *FMT* strings for all options are based on the original file name specified on the command line, not the name of the source file specified by -srcfile. READING EXAMPLES exiftool -a -u -g1 a.jpg Print all meta information in an image, including duplicate and unknown tags, sorted by group (for family 1). exiftool -common dir Print common meta information for all images in "dir". exiftool -T -createdate -aperture -shutterspeed -iso dir > out.txt List meta information in tab-delimited column form for all images in "dir" to an output text file named "out.txt". exiftool -s -ImageSize -ExposureTime b.jpg Print ImageSize and ExposureTime tag names and values. exiftool -l -canon c.jpg d.jpg Print standard Canon information from two image files. exiftool -r -w .txt -common pictures Recursively extract common meta information from files in "pictures" directory, writing text output into files with the same names but with a ".txt" extension. exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg Save thumbnail image from "image.jpg" to a file called "thumbnail.jpg". exiftool -b -PreviewImage 118_1834.JPG > preview.jpg Extract preview image from JPG file and write it to "preview.jpg". exiftool -b -JpgFromRaw -w _JFR.JPG -ext CRW -r . Recursively extract JPG image from all Canon CRW files in the current directory, adding "_JFR.JPG" for the name of the output JPG files. exiftool -d "%r %a, %B %e, %Y" -DateTimeOriginal -S -s *.jpg Print formatted date/time for all JPG files in a directory. exiftool -IFD1:XResolution -IFD1:YResolution image.jpg Extract image resolution from EXIF IFD1 information (thumbnail image IFD). exiftool -xmp:author:all -a image.jpg Extract all author-related XMP information from an image. exiftool -xmp -b a.jpg > out.xmp Extract complete XMP data record intact from "a.jpg" and write it to "out.xmp" using the special "XMP" tag (see the Extra tags in Image::ExifTool::TagNames). 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 "dir". exiftool -ee -p "$gpslatitude, $gpslongitude, $gpstimestamp" a.m2ts Extract all GPS positions from an AVCHD video. 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 ".icc". exiftool -htmldump -w tmp/%f_%e.html t/images Generate HTML pages from a hex dump of EXIF information in all images from the "t/images" directory. The output HTML files are written to the "tmp" directory (which is created if it didn't exist), with names of the form "FILENAME_EXT.html". WRITING EXAMPLES Note that quotes are necessary around arguments which contain certain special characters such as ">", "<" or any white space. These quoting techniques are shell dependent, but the examples below will work in the Windows CMD shell. exiftool -Comment="This is a new comment" dst.jpg Write new comment to a JPG image (replaces any existing comment). exiftool -comment= -o newdir *.jpg Remove comment from all JPG images in the current directory, writing the modified images to a new directory. exiftool -keywords=EXIF -keywords=editor dst.jpg Replace existing keyword list with two new keywords ("EXIF" and "editor"). exiftool -Keywords+=word -o newfile.jpg src.jpg Copy a source image to a new file, and add a keyword ("word") to the current list of keywords. exiftool -credit-=xxx dir Delete Credit information from all files in a directory where the Credit value was ("xxx"). exiftool -xmp:description-de="kühl" -E dst.jpg Write alternate language for XMP:Description, using HTML character escaping to input special characters. exiftool -all= dst.jpg Delete all meta information from an image. Note: You should NOT do this to RAW images (except DNG) since proprietary RAW image formats often contain information in the makernotes that is necessary for converting the image. 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: -comment="lonely" -all= would also delete the new comment.) exiftool -all= --jfif:all dst.jpg Delete all meta information except JFIF group from an image. exiftool -Photoshop:All= dst.jpg Delete Photoshop meta information from an image (note that the Photoshop information also includes IPTC). exiftool -r -XMP-crss:all= DIR Recursively delete all XMP-crss information from images in a directory. exiftool "-ThumbnailImage<=thumb.jpg" dst.jpg Set the thumbnail image from specified file (Note: The quotes are neccessary to prevent shell redirection). exiftool "-JpgFromRaw<=%d%f_JFR.JPG" -ext CRW -r . Recursively write JPEG images with filenames ending in "_JFR.JPG" to the JpgFromRaw tag of like-named files with extension ".CRW" in the current directory. (This is the inverse of the "-JpgFromRaw" command of the "READING EXAMPLES" section above.) exiftool -DateTimeOriginal-="0:0:0 1:30:0" dir Adjust original date/time of all images in directory "dir" by subtracting one hour and 30 minutes. (This is equivalent to "-DateTimeOriginal-=1.5". See Image::ExifTool::Shift.pl for details.) exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg Add 3 hours to the CreateDate and ModifyDate timestamps of two images. 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.) exiftool -xmp:city=Kingston image1.jpg image2.nef Write a tag to the XMP group of two images. (Without the "xmp:" this tag would get written to the IPTC group since "City" exists in both, and IPTC is preferred by default.) exiftool -LightSource-="Unknown (0)" dst.tiff Delete "LightSource" tag only if it is unknown with a value of 0. exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg Set "WhiteBalance" to "Tungsten" only if it was previously "Auto". exiftool -comment-= -comment="new comment" a.jpg Write a new comment only if the image doesn't have one already. exiftool -o %d%f.xmp dir Create XMP meta information data files for all images in "dir". exiftool -o test.xmp -owner=Phil -title="XMP File" Create an XMP data file only from tags defined on the command line. exiftool "-ICC_Profile<=%d%f.icc" image.jpg Write ICC_Profile to an image from a ".icc" file of the same name. exiftool -trailer:all= image.jpg Delete any trailer found after the end of image (EOI) in a JPEG file. A number of digital cameras store a large PreviewImage after the JPEG EOI, and the file size may be reduced significantly by deleting this trailer. See the JPEG Tags documentation for a list of recognized JPEG trailers. COPYING EXAMPLES These examples demonstrate the ability to copy tag values between files. exiftool -tagsFromFile src.crw dst.jpg Copy the values of all writable tags from "src.crw" to "dst.jpg", writing the information to the preferred groups. exiftool -TagsFromFile src.jpg -all:all dst.jpg Copy the values of all writable tags from "src.jpg" to "dst.jpg", preserving the original tag groups. exiftool -all= -tagsfromfile src.jpg -exif:all dst.jpg Erase all meta information from "dst.jpg" image, then copy EXIF tags from "src.jpg". exiftool -exif:all= -tagsfromfile @ -all:all -unsafe bad.jpg Rebuild all EXIF meta information from scratch in an image. This technique can be used in JPEG images to repair corrupted EXIF information which otherwise could not be written due to errors. The "Unsafe" tag is a shortcut for unsafe EXIF tags in JPEG images which are not normally copied. See the tag name documentation for more details about unsafe tags. exiftool -Tagsfromfile a.jpg out.xmp Copy meta information from "a.jpg" to an XMP data file. If the XMP data file "out.xmp" already exists, it will be updated with the new information. Otherwise the XMP data file will be created. Only XMP, ICC and MIE files may be created like this (other file types may be edited but not created). See "WRITING EXAMPLES" above for another technique to generate XMP files. exiftool -tagsFromFile a.jpg -XMP:All= -ThumbnailImage= -m b.jpg Copy all meta information from "a.jpg" to "b.jpg", deleting all XMP information and the thumbnail image from the destination. exiftool -TagsFromFile src.jpg -title -author=Phil dst.jpg Copy title from one image to another and set a new author name. exiftool -TagsFromFile a.jpg -ISO -TagsFromFile b.jpg -comment dst.jpg Copy ISO from one image and Comment from another image to a destination image. exiftool -tagsfromfile src.jpg -exif:all --subifd:all dst.jpg Copy only the EXIF information from one image to another, excluding SubIFD tags. exiftool "-DateTimeOriginal>FileModifyDate" dir Use the original date from the meta information to set the same file's filesystem modification date for all images in a directory. (Note that "-TagsFromFile @" is assumed if no other -TagsFromFile is specified when redirecting information as in this example.) exiftool -TagsFromFile src.jpg "-all>xmp:all" dst.jpg Copy all possible information from "src.jpg" and write in XMP format to "dst.jpg". exiftool -@ iptc2xmp.args -iptc:all= a.jpg Translate IPTC information to XMP with appropriate tag name conversions, and delete the original IPTC information from an image. This example uses iptc2xmp.args, which is a file included with the ExifTool distribution that contains the required arguments to convert IPTC information to XMP format. Also included with the distribution are xmp2iptc.args (which performs the inverse conversion) and a few more .args files for other conversions between EXIF, IPTC and XMP. exiftool -tagsfromfile %d%f.CRW -r -ext JPG dir Recursively rewrite all "JPG" images in "dir" with information copied from the corresponding "CRW" images in the same directories. exiftool "-make+>keywords" image.jpg Add camera make to list of keywords. exiftool "-comment for additional documentation and examples. exiftool -filename=new.jpg dir/old.jpg Rename "old.jpg" to "new.jpg" in directory "dir". exiftool -directory=%e dir Move all files from directory "dir" into directories named by the original file extensions. exiftool "-Directory for additional documentation. exiftool -geotag track.log a.jpg Geotag an image ("a.jpg") from position information in a GPS track log ("track.log"). Since the "Geotime" tag is not specified, the value of DateTimeOriginal is used for geotagging. Local system time is assumed unless DateTimeOriginal contains a timezone. exiftool -geotag t.log -geotime="2009:04:02 13:41:12-05:00" a.jpg Geotag an image with the GPS position for a specific time. (Note that the "Geotag" tag must be assigned before "Geotime" for the GPS data to be available when "Geotime" is set.) exiftool -geotag log.gpx "-xmp:geotime out.gpx Generate a GPX track log from all images in directory "dir". This example uses the "gpx.fmt" file included in the full ExifTool distribution package and assumes that the images in "dir" have all been previously geotagged. PIPING EXAMPLES type a.jpg | exiftool - Extract information from stdin. exiftool image.jpg -thumbnailimage -b | exiftool - Extract information from an embedded thumbnail image. type a.jpg | exiftool -iptc:keywords+=fantastic - > b.jpg Add an IPTC keyword in a pipeline, saving output to a new file. wget -qO - http://a.domain.com/bigfile.jpg | exiftool -fast - Extract information from an image over the internet using the GNU wget utility. The -fast option prevents exiftool from scanning for trailer information, so only the meta information header is transferred. 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.) DIAGNOSTICS The exiftool application exits with a status of 0 on success, or 1 if an error occured or if all files failed the -if condition. AUTHOR Copyright 2003-2010, Phil Harvey This is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO Image::ExifTool(3pm), Image::ExifTool::TagNames(3pm), Image::ExifTool::Shortcuts(3pm), Image::ExifTool::Shift.pl