exiftool - Read and write meta information in files
| Use Case | Command | Description |
|---|---|---|
| Read all metadata | exiftool FILE | Extract all available metadata from a file |
| Read specific tag | exiftool -TAG FILE | Extract value of a specific tag (e.g., -CreateDate) |
| Write metadata | exiftool -TAG=VALUE FILE | Set a tag value (e.g., -Comment='Hello') |
| Delete metadata | exiftool -TAG= FILE | Delete a tag by leaving value empty |
| Delete all metadata | exiftool -all= FILE | Remove all metadata from file |
| Copy metadata between files | exiftool -tagsFromFile SRCFILE DSTFILE | Copy all writable tags from source to destination |
| Rename/move files by date | exiftool '-FileName<CreateDate' -d %Y%m%d_%H%M%S%%-c.%%e DIR | Rename files based on CreateDate timestamp |
| Geotag from GPS track | exiftool -geotag TRACK.LOG FILE | Add GPS coordinates from a track log using DateTimeOriginal |
| Export to CSV | exiftool -common -csv DIR > out.csv | Export common tags to CSV file |
| Import from CSV | exiftool -csv=in.csv DIR | Update metadata from CSV file |
| Verbose debug | exiftool -v FILE | Show verbose processing messages |
| List all tag names | exiftool -list | Print all known tag names |
| List supported file types | exiftool -listf | Print all supported file extensions |
exiftool [*OPTIONS*] [-*TAG*...] [--*TAG*...] *FILE*...
exiftool [*OPTIONS*] -*TAG*[+-<]=[*VALUE*]... *FILE*...
exiftool [*OPTIONS*] -tagsFromFile *SRCFILE* [-[*DSTTAG*<]*SRCTAG*...] *FILE*...
exiftool [ -ver | -list[w|f|r|wf|g[*NUM*]|d|x] ]
For specific examples, see the EXAMPLES sections below.
This documentation is displayed if exiftool is run without an input *FILE* when one is expected.
A command-line interface to Image::ExifTool, used for reading and writing meta information in a variety of file types. *FILE* is one or more source file names, directory names, or "-" for the standard input. Metadata is read from source files and printed in readable form to the console (or written to output text files with -w).
To write or delete metadata, tag values are assigned using -*TAG*=[*VALUE*], and/or the -geotag, -csv= or -json= options. To copy or move metadata, the -tagsFromFile feature is used. 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 (in write mode only writable types are processed). However, files may be specified by name, or the -ext option may be used to force processing of files with any extension. Hidden files in the directory are also processed. Adding the -r option causes subdirectories to be processed recursively, but subdirectories with names beginning with "." are skipped unless -r. is used.
Below is a list of file types and meta information formats currently supported by ExifTool (r = read, w = write, c = create):
File Types -----------+-------------+-------------+-------------+------------ 360 r/w | DR4 r/w/c | JNG r/w | O r | RAW r/w 3FR r | DSS r | JP2 r/w | ODP r | RIFF r 3G2 r/w | DV r | JPEG r/w | ODS r | RSRC r 3GP r/w | DVB r/w | JSON r | ODT r | RTF r A r | DVR-MS r | JXL r | OFR r | RW2 r/w AA r | DYLIB r | K25 r | OGG r | RWL r/w AAE r | EIP r | KDC r | OGV r | RWZ r AAX r/w | EPS r/w | KEY r | ONP r | RM r ACR r | EPUB r | LA r | OPUS r | SEQ r AFM r | ERF r/w | LFP r | ORF r/w | SKETCH r AI r/w | EXE r | LIF r | ORI r/w | SO r AIFF r | EXIF r/w/c | LNK r | OTF r | SR2 r/w APE r | EXR r | LRV r/w | PAC r | SRF r ARQ r/w | EXV r/w/c | M2TS r | PAGES r | SRW r/w ARW r/w | F4A/V r/w | M4A/V r/w | PBM r/w | SVG r ASF r | FFF r/w | MACOS r | PCD r | SWF r AVI r | FITS r | MAX r | PCX r | THM r/w AVIF r/w | FLA r | MEF r/w | PDB r | TIFF r/w AZW r | FLAC r | MIE r/w/ | PDF r/w | TORRENT r BMP r | FLIF r/w | MIFF r c | PEF r/w | TTC r BPG r | FLV r | MKA r | PFA r | TTF r BTF r | FPF r | MKS r | PFB r | TXT r CHM r | FPX r | MKV r | PFM r | VCF r COS r | GIF r/w | MNG r/w | PGF r | VRD r/w/c CR2 r/w | GPR r/w | MOBI r | PGM r/w | VSD r CR3 r/w | GZ r | MODD r | PLIST r | WAV r CRM r/w | HDP r/w | MOI r | PICT r | WDP r/w CRW r/w | HDR r | MOS r/w | PMP r | WEBP r CS1 r/w | HEIC r/w | MOV r/w | PNG r/w | WEBM r CSV r | HEIF r/w | MP3 r | PPM r/w | WMA r CZI r | HTML r | MP4 r/w | PPT r | WMV r DCM r | ICC r/w/c | MPC r | PPTX r | WTV r DCP r/w | ICS r | MPG r | PS r/w | WV r DCR r | IDML r | MPO r/w | PSB r/w | X3F r/w DFONT r | IIQ r/w | MQV r/w | PSD r/w | XCF r DIVX r | IND r/w | MRC r | PSP r | XLS r DJVU r | INSP r/w | MRW r/w | QTIF r/w | XLSX r DLL r | INSV r | MXF r | R3D r | XMP r/w/c DNG r/w | INX r | NEF r/w | RA r | ZIP r DOC r | ISO r | NKSC r/w | RAF r/w | DOCX r | ITC r | NRW r/w | RAM r | DPX r | J2C r | NUMBERS r | RAR 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)
Case is not significant for any command-line option (including tag and group names), except for single-character options when the corresponding upper-case option exists. Many single-character options have equivalent long-name versions (shown in brackets), and some options have inverses which are invoked with a leading double-dash. Unrecognized options are interpreted as tag names (for this reason, multiple single-character options may NOT be combined into one argument). Contrary to standard practice, options may appear after source file names on the exiftool command line.
-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[+-]<SRCTAG — Copy tag value (see -tagsFromFile)-tagsFromFile SRCFILE — Copy tag values from file-x TAG (--exclude) — Exclude specified tag-args (--argFormat) — Format metadata as exiftool arguments-b (--binary) — Output metadata in binary format-c FMT (--coordFormat) — Set format for GPS coordinates-charset [[TYPE=]CHARSET] — Specify encoding for special characters-csv[[+]=CSVFILE] — Export/import tags in CSV format-csvDelim STR — Set delimiter for CSV file-d FMT (--dateFormat) — Set format for date/time values-D (--decimal) — Show tag ID numbers in decimal-E,-ex,-ec (--escape(HTML|XML|C)) — Escape tag values for HTML, XML or C-f (--forcePrint) — Force printing of all specified tags-g[NUM...] (--groupHeadings) — Organize output by tag group-G[NUM...] (--groupNames) — Print group name for each tag-h (--htmlFormat) — Use HTML formatting for output-H (--hex) — Show tag ID numbers in hexadecimal-htmlDump[OFFSET] — Generate HTML-format binary dump-j[[+]=JSONFILE] (--json) — Export/import tags in JSON format-l (--long) — Use long 2-line output format-L (--latin) — Use Windows Latin1 encoding-lang [LANG] — Set current language-listItem INDEX — Extract specific item from a list-n (--printConv) — No print conversion-p FMTFILE (--printFormat) — Print output in specified format-php — Export tags as a PHP Array-s[NUM] (--short) — Short output format-S (--veryShort) — Very short output format-sep STR (--separator) — Set separator string for list items-sort — Sort output alphabetically-struct — Enable output of structured information-t (--tab) — Output in tab-delimited list format-T (--table) — Output in tabular format-v[NUM] (--verbose) — Print verbose messages-w[+|!] EXT (--textOut) — Write (or overwrite!) output text files-W[+|!] FMT (--tagOut) — Write output text file for each tag-Wext EXT (--tagOutExt) — Write only specified file types with -W-X (--xmlFormat) — Use RDF/XML output format-a (--duplicates) — Allow duplicate tags to be extracted-e (--composite) — Do not generate composite tags-ee[NUM] (--extractEmbedded) — Extract information from embedded files-ext[+] EXT (--extension) — Process files with specified extension-F[OFFSET] (--fixBase) — Fix the base for maker notes offsets-fast[NUM] — Increase speed when extracting metadata-fileOrder[NUM] [-]TAG — Set file processing order-i DIR (--ignore) — Ignore specified directory name-if[NUM] EXPR — Conditionally process files-m (--ignoreMinorErrors) — Ignore minor errors and warnings-o OUTFILE (--out) — Set output file or directory name-overwrite_original — Overwrite original by renaming tmp file-overwrite_original_in_place — Overwrite original by copying tmp file-P (--preserve) — Preserve file modification date/time-password PASSWD — Password for processing protected files-progress[:[TITLE]] — Show file progress count-q (--quiet) — Quiet processing-r[.] (--recurse) — Recursively process subdirectories-scanForXMP — Brute force XMP scan-u (--unknown) — Extract unknown tags-U (--unknown2) — Extract unknown binary tags too-wm MODE (--writeMode) — Set mode for writing/creating tags-z (--zip) — Read/write compressed information-@ ARGFILE — Read command-line arguments from file-k (--pause) — Pause before terminating-list[w|f|wf|g[NUM]|d|x] — List various exiftool capabilities-ver — Print exiftool version number-- — End of options-geotag TRKFILE — Geotag images from specified GPS log-globalTimeShift SHIFT — Shift all formatted date/time values-use MODULE — Add features from plug-in module-delete_original[!] — Delete "_original" backups-restore_original — Restore from "_original" backups-api OPT[[^]=[VAL]] — Set ExifTool API option-common_args — Define common arguments-config CFGFILE — Specify configuration file name-echo[NUM] TEXT — Echo text to stdout or stderr-efile[NUM][!] ERRFILE — Save names of files with errors-execute[NUM] — Execute multiple commands on one line-list_dir — List directories, not their contents-srcfile FMT — Process a different source file-stay_open FLAG — Keep reading -@ argfile even after EOF-userParam PARAM[[^]=[VAL]] — Set user parameter (API UserParam opt)-*TAG*
-CreateDate). Multiple tags may be specified in a single command.-EXIF:CreateDate).--*TAG*
-x option.-*TAG*[+-^]=[*VALUE*]
+= and -= add or remove list entries, shift date/time, or increment/decrement numbers.^= writes empty string instead of deleting when no value.-*TAG*<=*DATFILE* or -*TAG*<=*FMT*
-tagsFromFile *SRCFILE* or *FMT*
'-*DSTTAG*<*SRCTAG*' or '-*SRCTAG*>*DSTTAG*'.$tag syntax.-x *TAG* (--exclude)
--*TAG*.-args (--argFormat)
-@.-b, --b (--binary, --binary)
-c *FMT* (--coordFormat)
-n to get signed decimal degrees.-charset [[*TYPE*=]*CHARSET*]
-csv[[+]=*CSVFILE*]
-f to delete.-sep to split.-csvDelim *STR*
-d *FMT* (--dateFormat)
-D (--decimal)
-E, -ex, -ec (--escapeHTML, --escapeXML, --escapeC)
-f (--forcePrint)
-g[*NUM*][:*NUM*...] (--groupHeadings)
-G[*NUM*][:*NUM*...] (--groupNames)
-h (--htmlFormat)
-H (--hex)
-htmlDump[*OFFSET*]
-j[[+]=*JSONFILE*] (--json)
-l (--long)
-L (--latin)
-lang [*LANG*]
-listItem *INDEX*
-n (--printConv)
-p *FMTFILE* or *STR* (--printFormat)
-php
-s[*NUM*] (--short)
-S (--veryShort)
-sep *STR* (--separator)
-sort, --sort
-struct, --struct
-t (--tab)
-T (--table)
-v[*NUM*] (--verbose)
-w[+|!] *EXT* or *FMT* (--textOut)
-W[+|!] *FMT* (--tagOut)
-Wext *EXT*, --Wext *EXT* (--tagOutExt)
-X (--xmlFormat)
-a, --a (--duplicates, --duplicates)
-e (--composite)
-ee[*NUM*] (--extractEmbedded)
-ext[+] *EXT*, --ext *EXT* (--extension)
-F[*OFFSET*] (--fixBase)
-fast[*NUM*]
-fileOrder[*NUM*] [-]*TAG*
-i *DIR* (--ignore)
-if[*NUM*] *EXPR*
-m (--ignoreMinorErrors)
-o *OUTFILE* or *FMT* (--out)
-overwrite_original
-overwrite_original_in_place
-P (--preserve)
-password *PASSWD*
-progress[:[*TITLE*]]
-q (--quiet)
-r[.] (--recurse)
-scanForXMP
-u (--unknown)
-U (--unknown2)
-wm *MODE* (--writeMode)
-z (--zip)
-@ *ARGFILE*
-k (--pause)
-list, -listw, -listf, -listr, -listwf, -listg[*NUM*], -listd, -listx
-ver
--
-geotag *TRKFILE*
-globalTimeShift *SHIFT*
-use *MODULE*
-restore_original
-delete_original[!]
-api *OPT[[^]=[VAL]]*
-common_args
-config *CFGFILE*
-echo[*NUM*] *TEXT*
-efile[*NUM*][!] *ERRFILE*
-execute[*NUM*]
-list_dir
-srcfile *FMT*
-stay_open *FLAG*
-userParam *PARAM[[^]=[VAL]]*
Allows modification of tag values in -if, -p, or -tagsFromFile strings using Perl expressions in braces after the tag name: ${TAG;EXPR}. Default expression removes illegal Windows file name characters. Helper functions: DateFmt, ShiftTime, NoDups.
In Windows, command-line arguments use the current code page. To support Unicode file names, use -charset filename=utf8 and place file names in a UTF-8 encoded -@ argfile. Wide-character i/o routines are triggered. Warning issued if filename contains special characters and charset not provided. FileName and Directory tag values use the same encoding as other tags.
ExifTool can write to read-only files if user has write permission in the directory. Exceptions: -overwrite_original_in_place, writing only pseudo System tags, Windows files with Unicode names when -overwrite_original or _original backup exists. Hidden files in Windows behave as read-only; use -if to avoid them.
exiftool -a -u -g1 a.jpg — Print all meta information including duplicate and unknown tags, sorted by group (family 1).exiftool -common dir — Print common meta information for all images in "dir".exiftool -T -createdate -aperture -shutterspeed -iso dir > out.txt — Tab-delimited column output.exiftool -s -ImageSize -ExposureTime b.jpg — Print tag names and values.exiftool -l -canon c.jpg d.jpg — Print standard Canon information.exiftool -r -w .txt -common pictures — Recursively extract to .txt files.exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg — Save thumbnail.exiftool -b -JpgFromRaw -w _JFR.JPG -ext NEF -r . — Extract JPG from NEF files.exiftool -a -b -W %d%f_%t%-c.%s -preview:all dir — Extract all preview images.exiftool -d '%r %a, %B %e, %Y' -DateTimeOriginal -S -s -ext jpg . — Formatted date/time.exiftool -IFD1:XResolution -IFD1:YResolution image.jpg — Extract thumbnail resolution.exiftool '-*resolution*' image.jpg — Extract all tags with "Resolution".exiftool -xmp:author:all -a image.jpg — Extract all author XMP.exiftool -xmp -b a.jpg > out.xmp — Extract complete XMP record.exiftool -p '$filename has date $dateTimeOriginal' -q -f dir — Custom format output.exiftool -ee3 -p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts — GPS from AVCHD.exiftool -icc_profile -b -w icc image.jpg — Save ICC_Profile.exiftool -htmldump -w tmp/%f_%e.html t/images — Generate HTML hex dump.exiftool -a -b -ee -embeddedimage -W Image_%.3g3.%s file.pdf — Extract embedded images from PDF.exiftool -Comment='This is a new comment' dst.jpg — Write new comment.exiftool -comment= -o newdir -ext jpg . — Remove comment and write to new directory.exiftool -keywords=EXIF -keywords=editor dst.jpg — Replace keywords.exiftool -Keywords+=word -o newfile.jpg src.jpg — Add keyword to list.exiftool -exposurecompensation+=-0.5 a.jpg — Decrement ExposureCompensation.exiftool -credit-=xxx dir — Delete Credit if value is "xxx".exiftool -xmp:description-de='kühl' -E dst.jpg — Write alternate language with HTML escape.exiftool -all= dst.jpg — Delete all metadata.exiftool -all= -comment='lonely' dst.jpg — Delete all then add comment.exiftool -all= --jfif:all dst.jpg — Delete all except JFIF.exiftool -Photoshop:All= dst.jpg — Delete Photoshop metadata.exiftool -r -XMP-crss:all= DIR — Recursively delete XMP-crss.exiftool '-ThumbnailImage<=thumb.jpg' dst.jpg — Set thumbnail from file.exiftool '-JpgFromRaw<=%d%f_JFR.JPG' -ext NEF -r . — Write JPG from raw sidecar.exiftool -DateTimeOriginal-='0:0:0 1:30:0' dir — Subtract 1.5 hours from date.exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg — Add 3 hours to timestamps.exiftool -AllDates+=1:30 -if '$make eq "Canon"' dir — Shift dates for Canon images.exiftool -xmp:city=Kingston image1.jpg image2.nef — Write to XMP group.exiftool -LightSource-='Unknown (0)' dst.tiff — Delete LightSource if unknown.exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg — Set WhiteBalance only if previous was Auto.exiftool -comment-= -comment='new comment' a.jpg — Write comment only if none exists.exiftool -o %d%f.xmp dir — Create XMP sidecar files.exiftool -o test.xmp -owner=Phil -title='XMP File' — Create XMP from scratch.exiftool '-ICC_Profile<=%d%f.icc' image.jpg — Write ICC_Profile from file.exiftool -hierarchicalkeywords='{keyword=one,children={keyword=B}}' — Write structured XMP.exiftool -trailer:all= image.jpg — Delete trailer after JPEG EOI.exiftool -tagsFromFile src.cr2 dst.jpg — Copy all writable tags.exiftool -TagsFromFile src.jpg -all:all dst.jpg — Copy preserving original groups.exiftool -all= -tagsfromfile src.jpg -exif:all dst.jpg — Erase all then copy EXIF.exiftool -exif:all= -tagsfromfile @ -all:all -unsafe bad.jpg — Rebuild EXIF from scratch.exiftool -Tagsfromfile a.jpg out.xmp — Copy to XMP data file.exiftool -tagsFromFile a.jpg -XMP:All= -ThumbnailImage= -m b.jpg — Copy all, delete XMP and thumbnail.exiftool -TagsFromFile src.jpg -title -author=Phil dst.jpg — Copy title and set author.exiftool -TagsFromFile a.jpg -ISO -TagsFromFile b.jpg -comment dst.jpg — Copy from multiple sources.exiftool -tagsfromfile src.jpg -exif:all --subifd:all dst.jpg — Copy EXIF excluding SubIFD.exiftool '-FileModifyDate<DateTimeOriginal' dir — Set file modification date from metadata.exiftool -TagsFromFile src.jpg '-xmp:all<all' dst.jpg — Copy all to XMP format.exiftool '-Description<${FileName;s/\.[^.]*$//}' dir — Set Description from filename.exiftool -@ iptc2xmp.args -iptc:all= a.jpg — Convert IPTC to XMP.exiftool -tagsfromfile %d%f.CR2 -r -ext JPG dir — Copy from CR2 to JPG.exiftool '-keywords+<make' image.jpg — Add camera make to keywords.exiftool '-comment<ISO=$exif:iso Exposure=${shutterspeed}' dir — Set comment from multiple tags.exiftool -TagsFromFile src.jpg -icc_profile dst.jpg — Copy ICC_Profile.exiftool -TagsFromFile src.jpg -all:all dst.mie — Copy all to MIE file.exiftool -o dst.mie -all:all src.jpg — Same as above but won't overwrite existing.exiftool -filename=new.jpg dir/old.jpg — Rename file.exiftool -directory=%e dir — Move files into directories named by extension.exiftool '-Directory<DateTimeOriginal' -d %Y/%m/%d dir — Move into date-based hierarchy.exiftool -o . '-Directory<DateTimeOriginal' -d %Y/%m/%d dir — Copy instead of move.exiftool '-filename<%f_${model;}.%e' dir — Add camera model to filename.exiftool '-FileName<CreateDate' -d %Y%m%d_%H%M%S%%-c.%%e dir — Rename by CreateDate.exiftool -r '-FileName<CreateDate' -d %Y-%m-%d/%H%M_%%f.%%e dir — Rename and move into date directories.exiftool '-FileName<${CreateDate}_$filenumber.jpg' -d %Y%m%d -ext jpg . — Set filename from CreateDate and FileNumber.exiftool -geotag track.log a.jpg — Geotag using DateTimeOriginal.exiftool -geotag t.log -geotime='2009:04:02 13:41:12-05:00' a.jpg — Geotag at specific time.exiftool -geotag log.gpx '-xmp:geotime<createdate' dir — Geotag with XMP tags.exiftool -geotag a.log -geosync=-20 dir — Account for time offset.exiftool -geotag a.log -geosync=1.jpg -geosync=2.jpg dir — Linear drift correction from two images.exiftool -geotag a.log '-geotime<${createdate}+01:00' dir — Specify timezone.exiftool -geotag= a.jpg — Delete geotag-added GPS tags.exiftool -xmp:geotag= a.jpg — Delete XMP GPS tags.exiftool -xmp:geotag=track.log a.jpg — Geotag with XMP tags.exiftool -geotag a.log -geotag b.log -r dir — Combine multiple track logs.exiftool -geotag 'tracks/*.log' -r dir — Read all logs from directory.exiftool -p gpx.fmt -d %Y-%m-%dT%H:%M:%SZ dir > out.gpx — Generate GPX track log from images.cat a.jpg | exiftool - — Extract info from stdin.exiftool image.jpg -thumbnailimage -b | exiftool - — Extract info from thumbnail.cat a.jpg | exiftool -iptc:keywords+=fantastic - > b.jpg — Add keyword in pipeline.curl -s http://a.domain.com/bigfile.jpg | exiftool -fast - — Extract info from URL.exiftool a.jpg -thumbnailimage -b | exiftool -comment=wow - | exiftool a.jpg -thumbnailimage'<=-' — Add comment to thumbnail.Interrupting with CTRL-C or SIGINT does not cause partially written files or temporary files. ExifTool traps SIGINT, defers it until critical processes complete, then cleans up.
The exiftool application exits with a status of 0 on success, 1 if an error occurred, or 2 if all files failed the -if condition (for any of the commands if -execute was used).
Copyright 2003-2022, Phil Harvey. This is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-10 16:13 @216.73.216.51
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)