exiftool_pod.html 142 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519
  1. <?xml version="1.0" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>exiftool Application Documentation</title>
  6. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  7. <link rev="made" href="mailto:_securityagent@gamma.local" />
  8. </head>
  9. <body style="background-color: white">
  10. <table border="0" width="100%" cellspacing="0" cellpadding="3">
  11. <tr><td class="block" style="background-color: #cccccc" valign="middle">
  12. <big><strong><span class="block">&nbsp;exiftool Application Documentation</span></strong></big>
  13. </td></tr>
  14. </table>
  15. <!-- INDEX BEGIN -->
  16. <div name="index">
  17. <p><a name="__index__"></a></p>
  18. <ul>
  19. <li><a href="#name">NAME</a></li>
  20. <li><a href="#synopsis">SYNOPSIS</a></li>
  21. <li><a href="#description">DESCRIPTION</a></li>
  22. <li><a href="#options">OPTIONS</a></li>
  23. <ul>
  24. <li><a href="#option_summary">Option Summary</a></li>
  25. <li><a href="#option_details">Option Details</a></li>
  26. <ul>
  27. <li><a href="#tag_operations">Tag operations</a></li>
  28. <li><a href="#input_output_text_formatting">Input-output text formatting</a></li>
  29. <li><a href="#processing_control">Processing control</a></li>
  30. <li><a href="#other_options">Other options</a></li>
  31. <li><a href="#special_features">Special features</a></li>
  32. <li><a href="#utilities">Utilities</a></li>
  33. <li><a href="#advanced_options">Advanced options</a></li>
  34. </ul>
  35. </ul>
  36. <li><a href="#windows_unicode_file_names">WINDOWS UNICODE FILE NAMES</a></li>
  37. <li><a href="#writing_read_only_files">WRITING READ-ONLY FILES</a></li>
  38. <li><a href="#reading_examples">READING EXAMPLES</a></li>
  39. <li><a href="#writing_examples">WRITING EXAMPLES</a></li>
  40. <li><a href="#copying_examples">COPYING EXAMPLES</a></li>
  41. <li><a href="#renaming_examples">RENAMING EXAMPLES</a></li>
  42. <li><a href="#geotagging_examples">GEOTAGGING EXAMPLES</a></li>
  43. <li><a href="#piping_examples">PIPING EXAMPLES</a></li>
  44. <li><a href="#diagnostics">DIAGNOSTICS</a></li>
  45. <li><a href="#author">AUTHOR</a></li>
  46. <li><a href="#see_also">SEE ALSO</a></li>
  47. </ul>
  48. <hr name="index" />
  49. </div>
  50. <!-- INDEX END -->
  51. <p>
  52. </p>
  53. <h1><a name="name">NAME</a></h1>
  54. <p>exiftool - Read and write meta information in files</p>
  55. <p>
  56. </p>
  57. <hr />
  58. <h1><a name="synopsis">SYNOPSIS</a></h1>
  59. <dl>
  60. <dt><strong><a name="exiftool_options_tag_tag_file" class="item"><strong>exiftool</strong> [<em>OPTIONS</em>] [-<em>TAG</em>...] [--<em>TAG</em>...] <em>FILE</em>...</a></strong></dt>
  61. <dt><strong><a name="exiftool_options_tag_value_file" class="item"><strong>exiftool</strong> [<em>OPTIONS</em>] -<em>TAG</em>[+-&lt;]=[<em>VALUE</em>]... <em>FILE</em>...</a></strong></dt>
  62. <dt><strong><a name="exiftool_options_tagsfromfile_srcfile_srctag_dsttag_file" class="item"><strong>exiftool</strong> [<em>OPTIONS</em>] <strong>-tagsFromFile</strong> <em>SRCFILE</em>
  63. [-<em>SRCTAG</em>[&gt;<em>DSTTAG</em>]...] <em>FILE</em>...</a></strong></dt>
  64. <dt><strong><a name="exiftool_ver_list_w_f_r_wf_g_num_d_x" class="item"><strong>exiftool</strong> [ <strong>-ver</strong> |
  65. <strong>-list</strong>[<strong>w</strong>|<strong>f</strong>|<strong>r</strong>|<strong>wf</strong>|<strong>g</strong>[<em>NUM</em>]|<strong>d</strong>|<strong>x</strong>] ]</a></strong></dt>
  66. </dl>
  67. <p>For specific examples, see the <a href="#reading_examples">EXAMPLES</a> sections below.</p>
  68. <p>This documentation is displayed if exiftool is run without an input <em>FILE</em>
  69. when one is expected.</p>
  70. <p>
  71. </p>
  72. <hr />
  73. <h1><a name="description">DESCRIPTION</a></h1>
  74. <p>A command-line interface to <a href="ExifTool.html">Image::ExifTool</a>, used for
  75. reading and writing meta information in a variety of file types. <em>FILE</em> is
  76. one or more source file names, directory names, or <code>-</code> for the standard
  77. input. Metadata is read from source files and printed in readable form
  78. to the console (or written to output text files with <strong>-w</strong>).</p>
  79. <p>To write or delete metadata, tag values are assigned using the
  80. -<em>TAG</em>=[<em>VALUE</em>] syntax, or the <strong>-geotag</strong> option. To copy or move
  81. metadata, the <strong>-tagsFromFile</strong> feature is used. By default the original
  82. files are preserved with <code>_original</code> appended to their names -- be sure to
  83. verify that the new files are OK before erasing the originals. Once in
  84. write mode, exiftool will ignore any read-specific options.</p>
  85. <p>Note: If <em>FILE</em> is a directory name then only supported file types in the
  86. directory are processed (in write mode only writable types are processed).
  87. However, files may be specified by name, or the <strong>-ext</strong> option may be used
  88. to force processing of files with any extension. Hidden files in the
  89. directory are also processed. Adding the <strong>-r</strong> option causes subdirectories
  90. to be processed recursively, but those with names beginning with &quot;.&quot; are
  91. skipped unless <strong>-r.</strong> is used.</p>
  92. <p>Below is a list of file types and meta information formats currently
  93. supported by ExifTool (r = read, w = write, c = create):</p>
  94. <pre>
  95. File Types
  96. ------------+-------------+-------------+-------------+------------
  97. 3FR r | DVB r/w | KEY r | ORF r/w | RWL r/w
  98. 3G2 r/w | DYLIB r | LA r | OTF r | RWZ r
  99. 3GP r/w | EIP r | LFP r | PAC r | RM r
  100. AA r | EPS r/w | LNK r | PAGES r | SEQ r
  101. AAX r/w | EPUB r | M2TS r | PBM r/w | SO r
  102. ACR r | ERF r/w | M4A/V r/w | PCD r | SR2 r/w
  103. AFM r | EXE r | MEF r/w | PDB r | SRF r
  104. AI r/w | EXIF r/w/c | MIE r/w/c | PDF r/w | SRW r/w
  105. AIFF r | EXR r | MIFF r | PEF r/w | SVG r
  106. APE r | EXV r/w/c | MKA r | PFA r | SWF r
  107. ARW r/w | F4A/V r/w | MKS r | PFB r | THM r/w
  108. ASF r | FFF r/w | MKV r | PFM r | TIFF r/w
  109. AVI r | FLA r | MNG r/w | PGF r | TORRENT r
  110. AZW r | FLAC r | MOBI r | PGM r/w | TTC r
  111. BMP r | FLV r | MODD r | PLIST r | TTF r
  112. BTF r | FPF r | MOI r | PICT r | VCF r
  113. CHM r | FPX r | MOS r/w | PMP r | VRD r/w/c
  114. COS r | GIF r/w | MOV r/w | PNG r/w | VSD r
  115. CR2 r/w | GZ r | MP3 r | PPM r/w | WAV r
  116. CRW r/w | HDP r/w | MP4 r/w | PPT r | WDP r/w
  117. CS1 r/w | HDR r | MPC r | PPTX r | WEBP r
  118. DCM r | HTML r | MPG r | PS r/w | WEBM r
  119. DCP r/w | ICC r/w/c | MPO r/w | PSB r/w | WMA r
  120. DCR r | ICS r | MQV r/w | PSD r/w | WMV r
  121. DFONT r | IDML r | MRW r/w | PSP r | WV r
  122. DIVX r | IIQ r/w | MXF r | QTIF r/w | X3F r/w
  123. DJVU r | IND r/w | NEF r/w | RA r | XCF r
  124. DLL r | INX r | NRW r/w | RAF r/w | XLS r
  125. DNG r/w | ITC r | NUMBERS r | RAM r | XLSX r
  126. DOC r | J2C r | ODP r | RAR r | XMP r/w/c
  127. DOCX r | JNG r/w | ODS r | RAW r/w | ZIP r
  128. DPX r | JP2 r/w | ODT r | RIFF r |
  129. DR4 r/w/c | JPEG r/w | OFR r | RSRC r |
  130. DSS r | K25 r | OGG r | RTF r |
  131. DV r | KDC r | OGV r | RW2 r/w |</pre>
  132. <pre>
  133. Meta Information
  134. ----------------------+----------------------+---------------------
  135. EXIF r/w/c | CIFF r/w | Ricoh RMETA r
  136. GPS r/w/c | AFCP r/w | Picture Info r
  137. IPTC r/w/c | Kodak Meta r/w | Adobe APP14 r
  138. XMP r/w/c | FotoStation r/w | MPF r
  139. MakerNotes r/w/c | PhotoMechanic r/w | Stim r
  140. Photoshop IRB r/w/c | JPEG 2000 r | DPX r
  141. ICC Profile r/w/c | DICOM r | APE r
  142. MIE r/w/c | Flash r | Vorbis r
  143. JFIF r/w/c | FlashPix r | SPIFF r
  144. Ducky APP12 r/w/c | QuickTime r | DjVu r
  145. PDF r/w/c | Matroska r | M2TS r
  146. PNG r/w/c | MXF r | PE/COFF r
  147. Canon VRD r/w/c | PrintIM r | AVCHD r
  148. Nikon Capture r/w/c | FLAC r | ZIP r
  149. GeoTIFF r/w/c | ID3 r | (and more)</pre>
  150. <p>
  151. </p>
  152. <hr />
  153. <h1><a name="options">OPTIONS</a></h1>
  154. <p>Case is not significant for any command-line option (including tag and group
  155. names), except for single-character options when the corresponding
  156. upper-case option exists. Many single-character options have equivalent
  157. long-name versions (shown in brackets), and some options have inverses which
  158. are invoked with a leading double-dash. Unrecognized options are
  159. interpreted as tag names (for this reason, multiple single-character options
  160. may NOT be combined into one argument). Contrary to standard practice,
  161. options may appear after source file names on the exiftool command line.</p>
  162. <p>
  163. </p>
  164. <h2><a name="option_summary">Option Summary</a></h2>
  165. <p><a href="#tag_operations">Tag operations</a></p>
  166. <pre>
  167. -TAG or --TAG Extract or exclude specified tag
  168. -TAG[+-]=[VALUE] Write new value for tag
  169. -TAG[+-]&lt;=DATFILE Write tag value from contents of file
  170. -TAG[+-]&lt;SRCTAG Copy tag value (see -tagsFromFile)</pre>
  171. <pre>
  172. -tagsFromFile SRCFILE Copy tag values from file
  173. -x TAG (-exclude) Exclude specified tag</pre>
  174. <p><a href="#input_output_text_formatting">Input-output text formatting</a></p>
  175. <pre>
  176. -args (-argFormat) Format metadata as exiftool arguments
  177. -b (-binary) Output metadata in binary format
  178. -c FMT (-coordFormat) Set format for GPS coordinates
  179. -charset [[TYPE=]CHARSET] Specify encoding for special characters
  180. -csv[=CSVFILE] Export/import tags in CSV format
  181. -d FMT (-dateFormat) Set format for date/time values
  182. -D (-decimal) Show tag ID numbers in decimal
  183. -E, -ex (-escape(HTML|XML)) Escape values for HTML (-E) or XML (-ex)
  184. -f (-forcePrint) Force printing of all specified tags
  185. -g[NUM...] (-groupHeadings) Organize output by tag group
  186. -G[NUM...] (-groupNames) Print group name for each tag
  187. -h (-htmlFormat) Use HMTL formatting for output
  188. -H (-hex) Show tag ID number in hexadecimal
  189. -htmlDump[OFFSET] Generate HTML-format binary dump
  190. -j[=JSONFILE] (-json) Export/import tags in JSON format
  191. -l (-long) Use long 2-line output format
  192. -L (-latin) Use Windows Latin1 encoding
  193. -lang [LANG] Set current language
  194. -listItem INDEX Extract specific item from a list
  195. -n (--printConv) Read/write numerical tag values
  196. -p FMTFILE (-printFormat) Print output in specified format
  197. -php Export tags as a PHP Array
  198. -s[NUM] (-short) Short output format
  199. -S (-veryShort) Very short output format
  200. -sep STR (-separator) Set separator string for list items
  201. -sort Sort output alphabetically
  202. -struct Enable output of structured information
  203. -t (-tab) Output in tab-delimited list format
  204. -T (-table) Output in tabular format
  205. -v[NUM] (-verbose) Print verbose messages
  206. -w[+|!] EXT (-textOut) Write (or overwrite!) output text files
  207. -W[+|!] FMT (-tagOut) Write output text file for each tag
  208. -Wext EXT (-tagOutExt) Write only specified file types with -W
  209. -X (-xmlFormat) Use RDF/XML output format</pre>
  210. <p><a href="#processing_control">Processing control</a></p>
  211. <pre>
  212. -a (-duplicates) Allow duplicate tags to be extracted
  213. -e (--composite) Do not calculate composite tags
  214. -ee (-extractEmbedded) Extract information from embedded files
  215. -ext EXT (-extension) Process files with specified extension
  216. -F[OFFSET] (-fixBase) Fix the base for maker notes offsets
  217. -fast[NUM] Increase speed for slow devices
  218. -fileOrder [-]TAG Set file processing order
  219. -i DIR (-ignore) Ignore specified directory name
  220. -if EXPR Conditionally process files
  221. -m (-ignoreMinorErrors) Ignore minor errors and warnings
  222. -o OUTFILE (-out) Set output file or directory name
  223. -overwrite_original Overwrite original by renaming tmp file
  224. -overwrite_original_in_place Overwrite original by copying tmp file
  225. -P (-preserve) Preserve date/time of original file
  226. -password PASSWD Password for processing protected files
  227. -progress Show file progress count
  228. -q (-quiet) Quiet processing
  229. -r[.] (-recurse) Recursively process subdirectories
  230. -scanForXMP Brute force XMP scan
  231. -u (-unknown) Extract unknown tags
  232. -U (-unknown2) Extract unknown binary tags too
  233. -wm MODE (-writeMode) Set mode for writing/creating tags
  234. -z (-zip) Read/write compressed information</pre>
  235. <p><a href="#other_options">Other options</a></p>
  236. <pre>
  237. -@ ARGFILE Read command-line arguments from file
  238. -k (-pause) Pause before terminating
  239. -list[w|f|wf|g[NUM]|d|x] List various exiftool capabilities
  240. -ver Print exiftool version number</pre>
  241. <p><a href="#special_features">Special features</a></p>
  242. <pre>
  243. -geotag TRKFILE Geotag images from specified GPS log
  244. -globalTimeShift SHIFT Shift all formatted date/time values
  245. -use MODULE Add features from plug-in module</pre>
  246. <p><a href="#utilities">Utilities</a></p>
  247. <pre>
  248. -delete_original[!] Delete &quot;_original&quot; backups
  249. -restore_original Restore from &quot;_original&quot; backups</pre>
  250. <p><a href="#advanced_options">Advanced options</a></p>
  251. <pre>
  252. -api OPT[=VAL] Set ExifTool API option
  253. -common_args Define common arguments
  254. -config CFGFILE Specify configuration file name
  255. -echo[NUM] TEXT Echo text to stdout or stderr
  256. -execute[NUM] Execute multiple commands on one line
  257. -srcfile FMT Set different source file name
  258. -stay_open FLAG Keep reading -@ argfile even after EOF
  259. -userParam PARAM[=VAL] Set user parameter (API UserParam opt)</pre>
  260. <p>
  261. </p>
  262. <h2><a name="option_details">Option Details</a></h2>
  263. <p>
  264. </p>
  265. <h3><a name="tag_operations">Tag operations</a></h3>
  266. <dl>
  267. <dt><strong><a name="tag" class="item"><strong>-</strong><em>TAG</em></a></strong></dt>
  268. <dd>
  269. <p>Extract information for the specified tag (eg. <code>-CreateDate</code>). Multiple
  270. tags may be specified in a single command. A tag name is the handle by
  271. which a piece of information is referenced. See
  272. <a href="TagNames/index.html">Image::ExifTool::TagNames</a> for documentation on
  273. available tag names. A tag name may include leading group names separated
  274. by colons (eg. <code>-EXIF:CreateDate</code>, or <code>-Doc1:XMP:Creator</code>), and each group
  275. name may be prefixed by a digit to specify family number (eg.
  276. <code>-1IPTC:City</code>). Use the <strong>-listg</strong> option to list available group names by
  277. family.</p>
  278. <p>A special tag name of <code>All</code> may be used to indicate all meta information.
  279. This is particularly useful when a group name is specified to extract all
  280. information in a group (but beware that unless the <strong>-a</strong> option is also
  281. used, some tags in the group may be suppressed by same-named tags in other
  282. groups). The wildcard characters <code>?</code> and <code>*</code> may be used in a tag name to
  283. match any single character and zero or more characters respectively. These
  284. may not be used in a group name, with the exception that a group name of
  285. <code>*</code> (or <code>All</code>) may be used to extract all instances of a tag (as if <strong>-a</strong>
  286. was used). Note that arguments containing wildcards must be quoted on the
  287. command line of most systems to prevent shell globbing.</p>
  288. <p>A <code>#</code> may be appended to the tag name to disable the print conversion on a
  289. per-tag basis (see the <strong>-n</strong> option). This may also be used when writing or
  290. copying tags.</p>
  291. <p>If no tags are specified, all available information is extracted (as if
  292. <code>-All</code> had been specified).</p>
  293. <p>Note: Descriptions, not tag names, are shown by default when extracting
  294. information. Use the <strong>-s</strong> option to see the tag names instead.</p>
  295. </dd>
  296. <dt><strong><a name="tag2" class="item"><strong>--</strong><em>TAG</em></a></strong></dt>
  297. <dd>
  298. <p>Exclude specified tag from extracted information. Same as the <strong>-x</strong> option.
  299. Group names and wildcards are permitted as described above for <strong>-TAG</strong>.
  300. Once excluded from the output, a tag may not be re-included by a subsequent
  301. option. May also be used following a <strong>-tagsFromFile</strong> option to exclude
  302. tags from being copied (when redirecting to another tag, it is the source
  303. tag that should be excluded), or to exclude groups from being deleted when
  304. deleting all information (eg. <code>-all= --exif:all</code> deletes all but EXIF
  305. information). But note that this will not exclude individual tags from a
  306. group delete (unless a family 2 group is specified, see note 4 below).
  307. Instead, individual tags may be recovered using the <strong>-tagsFromFile</strong> option
  308. (eg. <code>-all= -tagsfromfile @ -artist</code>).</p>
  309. </dd>
  310. <dt><strong><a name="tag_value" class="item"><strong>-</strong><em>TAG</em>[+-]<strong>=</strong>[<em>VALUE</em>]</a></strong></dt>
  311. <dd>
  312. <p>Write a new value for the specified tag (eg. <code>-comment=wow</code>), or delete the
  313. tag if no <em>VALUE</em> is given (eg. <code>-comment=</code>). <code>+=</code> and <code>-=</code> are used to
  314. add or remove existing entries from a list, or to shift date/time values
  315. (see <a href="Shift.html">Image::ExifTool::Shift.pl</a> for details).
  316. <code>+=</code> may also be used to increment numerical values, and <code>-=</code> may be used
  317. to conditionally delete or replace a tag (see <a href="#writing_examples">WRITING EXAMPLES</a> for
  318. examples).</p>
  319. <p><em>TAG</em> may contain one or more leading family 0, 1 or 2 group names,
  320. prefixed by optional family numbers, and separated colons. If no group name
  321. is specified, the tag is created in the preferred group, and updated in any
  322. other location where a same-named tag already exists. The preferred group
  323. is the first group in the following list where <em>TAG</em> is valid: 1) EXIF, 2)
  324. IPTC, 3) XMP.</p>
  325. <p>The wildcards <code>*</code> and <code>?</code> may be used in tag names to assign the same
  326. value to multiple tags. When specified with wildcards, &quot;unsafe&quot; tags are
  327. not written. A tag name of <code>All</code> is eqivalent to <code>*</code> (except that it
  328. doesn't require quoting, while arguments with wildcards do on systems with
  329. shell globbing), and is often used when deleting all metadata (ie. <code>-All=</code>)
  330. or an entire group (eg. <code>-GROUP:All=</code>, see note 4 below). Note that not
  331. all groups are deletable, and that the JPEG APP14 &quot;Adobe&quot; group is not
  332. removed by default with <code>-All=</code> because it may affect the appearance of the
  333. image. However, this will remove color space information, so the colors may
  334. be affected (but this may be avoided by copying back the tags defined by the
  335. ColorSpaceTags shortcut). Use the <strong>-listd</strong> option for a complete list of
  336. deletable groups, and see note 5 below regarding the &quot;APP&quot; groups. Also,
  337. within an image some groups may be contained within others, and these groups
  338. are removed if the containing group is deleted:</p>
  339. <pre>
  340. JPEG Image:
  341. - Deleting EXIF or IFD0 also deletes ExifIFD, GlobParamIFD,
  342. GPS, IFD1, InteropIFD, MakerNotes, PrintIM and SubIFD.
  343. - Deleting ExifIFD also deletes InteropIFD and MakerNotes.
  344. - Deleting Photoshop also deletes IPTC.</pre>
  345. <pre>
  346. TIFF Image:
  347. - Deleting EXIF only removes ExifIFD which also deletes
  348. InteropIFD and MakerNotes.</pre>
  349. <p>Notes:</p>
  350. <p>1) <strong>Many tag values may be assigned in a single command</strong>. If two
  351. assignments affect the same tag, the latter takes precedence (except for
  352. list-type tags, for which both values are written).</p>
  353. <p>2) In general, MakerNotes tags are considered &quot;Permanent&quot;, and may be edited
  354. but not created or deleted individually. This avoids many potential
  355. problems, including the inevitable compatibility problems with OEM software
  356. which may be very inflexible about the information it expects to find in the
  357. maker notes.</p>
  358. <p>3) Changes to PDF files are reversible because the original information is
  359. never actually deleted from the file. So ExifTool alone may not be used to
  360. securely edit metadata in PDF files.</p>
  361. <p>4) Specifying <code>-GROUP:all=</code> deletes the entire group as a block only if a
  362. single family 0 or 1 group is specified. Otherwise all deletable tags in
  363. the specified group(s) are removed individually, and in this case is it
  364. possible to exclude individual tags from a mass delete. For example,
  365. <code>-time:all --Exif:Time:All</code> removes all deletable Time tags except those in
  366. the EXIF. This difference also applies if family 2 is specified when
  367. deleting all groups. For example, <code>-2all:all=</code> deletes tags individually,
  368. while <code>-all:all=</code> deletes entire blocks.</p>
  369. <p>5) The &quot;APP&quot; group names (&quot;APP0&quot; through &quot;APP15&quot;) are used to delete JPEG
  370. application segments which are not associated with another deletable group.
  371. For example, specifying <code>-APP14:All=</code> will NOT delete the APP14 &quot;Adobe&quot;
  372. segment because this is accomplished with <code>-Adobe:All</code>.</p>
  373. <p>Special feature: Integer values may be specified in hexadecimal with a
  374. leading <code>0x</code>, and simple rational values may be specified as fractions.</p>
  375. </dd>
  376. <dt><strong><a name="tag_datfile_or_tag_fmt" class="item"><strong>-</strong><em>TAG</em>&lt;=<em>DATFILE</em> or <strong>-</strong><em>TAG</em>&lt;=<em>FMT</em></a></strong></dt>
  377. <dd>
  378. <p>Set the value of a tag from the contents of file <em>DATFILE</em>. The file name
  379. may also be given by a <em>FMT</em> string where %d, %f and %e represent the
  380. directory, file name and extension of the original <em>FILE</em> (see the <strong>-w</strong>
  381. option for more details). Note that quotes are required around this
  382. argument to prevent shell redirection since it contains a <code>&lt;</code> symbol.
  383. If <em>DATFILE</em>/<em>FMT</em> is not provided, the effect is the same as <a href="#tag"><code>-TAG=</code></a>,
  384. and the tag is simply deleted. <code>+&lt;=</code> or <code>-&lt;=</code> may also be used to
  385. add or delete specific list entries, or to shift date/time values.</p>
  386. </dd>
  387. <dt><strong><a name="tagsfromfile_srcfile_or_fmt" class="item"><strong>-tagsFromFile</strong> <em>SRCFILE</em> or <em>FMT</em></a></strong></dt>
  388. <dd>
  389. <p>Copy tag values from <em>SRCFILE</em> to <em>FILE</em>. Tag names on the command line
  390. after this option specify the tags to be copied, or excluded from the copy.
  391. Wildcards are permitted in these tag names. If no tags are specified, then
  392. all possible tags (see note 1 below) from the source file are copied to
  393. same-named tags in the preferred location of the output file (the same as
  394. specifying <code>-all</code>). More than one <strong>-tagsFromFile</strong> option may be used to
  395. copy tags from multiple files.</p>
  396. <p>By default, this option will update any existing and writable same-named
  397. tags in the output <em>FILE</em>, but will create new tags only in their preferred
  398. groups. This allows some information to be automatically transferred to the
  399. appropriate group when copying between images of different formats. However,
  400. if a group name is specified for a tag then the information is written only
  401. to this group (unless redirected to another group, see below). If <code>All</code> is
  402. used as a group name, then the specified tag(s) are written to the same
  403. family 1 group they had in the source file (ie. the same specific location,
  404. like ExifIFD or XMP-dc). For example, the common operation of copying all
  405. writable tags to the same specific locations in the output <em>FILE</em> is
  406. achieved by adding <code>-all:all</code>. A different family may be specified by
  407. adding a leading family number to the group name (eg. <code>-0all:all</code> preserves
  408. the same general location, like EXIF or XMP).</p>
  409. <p><em>SRCFILE</em> may be the same as <em>FILE</em> to move information around within a
  410. single file. In this case, <code>@</code> may be used to represent the source file
  411. (ie. <code>-tagsFromFile @</code>), permitting this feature to be used for batch
  412. processing multiple files. Specified tags are then copied from each file in
  413. turn as it is rewritten. For advanced batch use, the source file name may
  414. also be specified using a <em>FMT</em> string in which %d, %f and %e represent the
  415. directory, file name and extension of <em>FILE</em>. See <strong>-w</strong> option for <em>FMT</em>
  416. string examples.</p>
  417. <p>A powerful redirection feature allows a destination tag to be specified for
  418. each copied tag. With this feature, information may be written to a tag
  419. with a different name or group. This is done using
  420. &quot;'-<em>DSTTAG</em>&lt;<em>SRCTAG</em>'&quot; or
  421. &quot;'-<em>SRCTAG</em>&gt;<em>DSTTAG</em>'&quot; on the command line after
  422. <strong>-tagsFromFile</strong>, and causes the value of <em>SRCTAG</em> to be copied from
  423. <em>SRCFILE</em> and written to <em>DSTTAG</em> in <em>FILE</em>. Note that this argument
  424. must be quoted to prevent shell redirection, and there is no <code>=</code> sign as
  425. when assigning new values. Source and/or destination tags may be prefixed
  426. by a group name and/or suffixed by <code>#</code>. Wildcards are allowed in both the
  427. source and destination tag names. A destination group and/or tag name of
  428. <code>All</code> or <code>*</code> writes to the same family 1 group and/or tag name as the
  429. source. If no destination group is specified, the information is written to
  430. the preferred group. Whitespace around the <code>&gt;</code> or <code>&lt;</code> is ignored.
  431. As a convenience, <code>-tagsFromFile @</code> is assumed for any redirected tags
  432. which are specified without a prior <strong>-tagsFromFile</strong> option. Copied tags
  433. may also be added or deleted from a list with arguments of the form
  434. &quot;'-<em>SRCTAG</em>+&lt;<em>DSTTAG</em>'&quot; or
  435. &quot;'-<em>SRCTAG</em>-&lt;<em>DSTTAG</em>'&quot;.</p>
  436. <p>An extension of the redirection feature allows strings involving tag names
  437. to be used on the right hand side of the <code>&lt;</code> symbol with the syntax
  438. &quot;'-<em>DSTTAG</em>&lt;<em>STR</em>'&quot;, where tag names in <em>STR</em> are
  439. prefixed with a <code>$</code> symbol. See the <strong>-p</strong> option for more details about
  440. this syntax. Strings starting with a <code>=</code> sign must insert a single space
  441. after the <code>&lt;</code> to avoid confusion with the <code>&lt;=</code> operator which sets
  442. the tag value from the contents of a file. A single space at the start of
  443. the string is removed if it exists, but all other whitespace in the string
  444. is preserved. See note 8 below about using shortcuts or wildcards with the
  445. redirection feature.</p>
  446. <p>See <a href="#copying_examples">COPYING EXAMPLES</a> for examples using <strong>-tagsFromFile</strong>.</p>
  447. <p>Notes:</p>
  448. <p>1) Some tags (generally tags which may affect the appearance of the image)
  449. are considered &quot;unsafe&quot; to write, and are only copied if specified
  450. explicitly (ie. no wildcards). See the
  451. <a href="TagNames/index.html">tag name documentation</a> for more details about
  452. &quot;unsafe&quot; tags.</p>
  453. <p>2) Be aware of the difference between excluding a tag from being copied
  454. (--<em>TAG</em>), and deleting a tag (-<em>TAG</em>=). Excluding a tag prevents it from
  455. being copied to the destination image, but deleting will remove a
  456. pre-existing tag from the image.</p>
  457. <p>3) The maker note information is copied as a block, so it isn't affected
  458. like other information by subsequent tag assignments on the command line.
  459. Also, since the PreviewImage referenced from the maker notes may be rather
  460. large, it is not copied, and must be transferred separately if desired.</p>
  461. <p>4) The order of operations is to copy all specified tags at the point of the
  462. <strong>-tagsFromFile</strong> option in the command line. Any tag assignment to the
  463. right of the <strong>-tagsFromFile</strong> option is made after all tags are copied. For
  464. example, new tag values are set in the order One, Two, Three then Four with
  465. this command:</p>
  466. <pre>
  467. exiftool -One=1 -tagsFromFile s.jpg -Two -Four=4 -Three d.jpg</pre>
  468. <p>This is significant in the case where an overlap exists between the copied
  469. and assigned tags because later operations may override earlier ones.</p>
  470. <p>5) The normal behaviour of copied tags differs subtly from that of assigned
  471. tags for list-type tags. When copying to a list, each copied tag overrides
  472. any previous operations on the list. While this avoids duplicate list items
  473. when copying groups of tags from a file containing redundant information, it
  474. also prevents values of different tags from being copied into the same list
  475. when this is the intent. So a <strong>-addTagsFromFile</strong> option is provided which
  476. allows copying of multiple tags into the same list. eg)</p>
  477. <pre>
  478. exiftool -addtagsfromfile @ '-subject&lt;make' '-subject&lt;model' ...</pre>
  479. <p>Other than this difference, the <strong>-tagsFromFile</strong> and <strong>-addTagsFromFile</strong>
  480. options are equivalent.</p>
  481. <p>6) The <strong>-a</strong> option (allow duplicate tags) is always in effect when copying
  482. tags from <em>SRCFILE</em>.</p>
  483. <p>7) Structured tags are copied by default when copying tags. See the
  484. <strong>-struct</strong> option for details.</p>
  485. <p>8) With the redirection feature, copying a tag directly (ie.
  486. &quot;'-<em>DSTTAG</em>&lt;<em>SRCTAG</em>'&quot;) is not the same as interpolating
  487. its value inside a string (ie. &quot;'-<em>DSTTAG</em>&lt;$<em>SRCTAG</em>'&quot;)
  488. for <a href="http://search.cpan.org/dist/Image-ExifTool/lib/Image/ExifTool/Shortcuts.pm">shortcut tags</a> or tag names containing
  489. wildcards. When copying directly, the values of each matching source tag
  490. are copied individually to the destination tag (as if multiple redirection
  491. arguments were used). However, when interpolated inside a string, the
  492. values of shortcut tags are concatenated, and wildcards are not allowed.</p>
  493. </dd>
  494. <dt><strong><strong>-x</strong> <em>TAG</em> (<strong>-exclude</strong>)</strong></dt>
  495. <dd>
  496. <p>Exclude the specified tag. There may be multiple <strong>-x</strong> options. This has
  497. the same effect as --<em>TAG</em> on the command line. See the --<em>TAG</em>
  498. documentation above for a complete description.</p>
  499. </dd>
  500. </dl>
  501. <p>
  502. </p>
  503. <h3><a name="input_output_text_formatting">Input-output text formatting</a></h3>
  504. <p>Note that trailing spaces are removed from extracted values for most output
  505. text formats. The exceptions are <a href="#b"><code>-b</code></a>, <code>-csv</code>, <code>-j</code> and <a href="#x"><code>-X</code></a>.</p>
  506. <dl>
  507. <dt><strong><a name="args" class="item"><strong>-args</strong> (<strong>-argFormat</strong>)</a></strong></dt>
  508. <dd>
  509. <p>Output information in the form of exiftool arguments, suitable for use with
  510. the <strong>-@</strong> option when writing. May be combined with the <strong>-G</strong> option to
  511. include group names. This feature may be used to effectively copy tags
  512. between images, but allows the metadata to be altered by editing the
  513. intermediate file (<code>out.args</code> in this example):</p>
  514. <pre>
  515. exiftool -args -G1 --filename --directory src.jpg &gt; out.args
  516. exiftool -@ out.args dst.jpg</pre>
  517. <p>Note: Be careful when copying information with this technique since it is
  518. easy to write tags which are normally considered &quot;unsafe&quot;. For instance,
  519. the FileName and Directory tags are excluded in the example above to avoid
  520. renaming and moving the destination file. Also note that the second command
  521. above will produce warning messages for any tags which are not writable.</p>
  522. <p>As well, the <strong>-sep</strong> option should be used when reading back to maintain
  523. separate list items, and the <strong>-struct</strong> option may be used when extracting
  524. to preserve structured XMP information.</p>
  525. </dd>
  526. <dt><strong><a name="b" class="item"><strong>-b</strong> (<strong>-binary</strong>)</a></strong></dt>
  527. <dd>
  528. <p>Output requested metadata in binary format without tag names or
  529. descriptions. This option is mainly used for extracting embedded images or
  530. other binary data, but it may also be useful for some text strings since
  531. control characters (such as newlines) are not replaced by '.' as they are in
  532. the default output. List items are separated by a newline when extracted
  533. with the <strong>-b</strong> option. May be combined with <code>-j</code>, <a href="#php"><code>-php</code></a> or <a href="#x"><code>-X</code></a> to
  534. extract binary data in JSON, PHP or XML format.</p>
  535. </dd>
  536. <dt><strong><a name="fmt" class="item"><strong>-c</strong> <em>FMT</em> (<strong>-coordFormat</strong>)</a></strong></dt>
  537. <dd>
  538. <p>Set the print format for GPS coordinates. <em>FMT</em> uses the same syntax as
  539. the <code>printf</code> format string. The specifiers correspond to degrees, minutes
  540. and seconds in that order, but minutes and seconds are optional. For
  541. example, the following table gives the output for the same coordinate using
  542. various formats:</p>
  543. <pre>
  544. FMT Output
  545. ------------------- ------------------
  546. &quot;%d deg %d' %.2f&quot;\&quot; 54 deg 59' 22.80&quot; (default for reading)
  547. &quot;%d %d %.8f&quot; 54 59 22.80000000 (default for copying)
  548. &quot;%d deg %.4f min&quot; 54 deg 59.3800 min
  549. &quot;%.6f degrees&quot; 54.989667 degrees</pre>
  550. <p>Notes:</p>
  551. <p>1) To avoid loss of precision, the default coordinate format is different
  552. when copying tags using the <strong>-tagsFromFile</strong> option.</p>
  553. <p>2) If the hemisphere is known, a reference direction (N, S, E or W) is
  554. appended to each printed coordinate, but adding a <code>+</code> to the format
  555. specifier (eg. <code>%+.6f</code>) prints a signed coordinate instead.</p>
  556. <p>3) This print formatting may be disabled with the <strong>-n</strong> option to extract
  557. coordinates as signed decimal degrees.</p>
  558. </dd>
  559. <dt><strong><a name="charset_type_charset" class="item"><strong>-charset</strong> [[<em>TYPE</em>=]<em>CHARSET</em>]</a></strong></dt>
  560. <dd>
  561. <p>If <em>TYPE</em> is <code>ExifTool</code> or not specified, this option sets the ExifTool
  562. character encoding for output tag values when reading and input values when
  563. writing. The default ExifTool encoding is <code>UTF8</code>. If no <em>CHARSET</em> is
  564. given, a list of available character sets is returned. Valid <em>CHARSET</em>
  565. values are:</p>
  566. <pre>
  567. CHARSET Alias(es) Description
  568. ---------- --------------- ----------------------------------
  569. UTF8 cp65001, UTF-8 UTF-8 characters (default)
  570. Latin cp1252, Latin1 Windows Latin1 (West European)
  571. Latin2 cp1250 Windows Latin2 (Central European)
  572. Cyrillic cp1251, Russian Windows Cyrillic
  573. Greek cp1253 Windows Greek
  574. Turkish cp1254 Windows Turkish
  575. Hebrew cp1255 Windows Hebrew
  576. Arabic cp1256 Windows Arabic
  577. Baltic cp1257 Windows Baltic
  578. Vietnam cp1258 Windows Vietnamese
  579. Thai cp874 Windows Thai
  580. MacRoman cp10000, Roman Macintosh Roman
  581. MacLatin2 cp10029 Macintosh Latin2 (Central Europe)
  582. MacCyrillic cp10007 Macintosh Cyrillic
  583. MacGreek cp10006 Macintosh Greek
  584. MacTurkish cp10081 Macintosh Turkish
  585. MacRomanian cp10010 Macintosh Romanian
  586. MacIceland cp10079 Macintosh Icelandic
  587. MacCroatian cp10082 Macintosh Croatian</pre>
  588. <p><em>TYPE</em> may be <code>FileName</code> to specify the encoding of file names on the
  589. command line (ie. <em>FILE</em> arguments). In Windows, this triggers use of
  590. wide-character i/o routines, thus providing support for Unicode file names.
  591. See the <a href="#windows_unicode_file_names">WINDOWS UNICODE FILE NAMES</a> section below for details.</p>
  592. <p>Other values of <em>TYPE</em> listed below are used to specify the internal
  593. encoding of various meta information formats.</p>
  594. <pre>
  595. TYPE Description Default
  596. --------- ------------------------------------------- -------
  597. EXIF Internal encoding of EXIF &quot;ASCII&quot; strings (none)
  598. ID3 Internal encoding of ID3v1 information Latin
  599. IPTC Internal IPTC encoding to assume when Latin
  600. IPTC:CodedCharacterSet is not defined
  601. Photoshop Internal encoding of Photoshop IRB strings Latin
  602. QuickTime Internal encoding of QuickTime strings MacRoman</pre>
  603. <p>See <a href="http://owl.phy.queensu.ca/~phil/exiftool/faq.html#Q10">http://owl.phy.queensu.ca/~phil/exiftool/faq.html#Q10</a> for more
  604. information about coded character sets.</p>
  605. </dd>
  606. <dt><strong><a name="csv_csvfile" class="item"><strong>-csv</strong>[=<em>CSVFILE</em>]</a></strong></dt>
  607. <dd>
  608. <p>Export information in CSV format, or import information if <em>CSVFILE</em> is
  609. specified. When importing, the CSV file must be in exactly the same format
  610. as the exported file. The first row of the <em>CSVFILE</em> must be the ExifTool
  611. tag names (with optional group names) for each column of the file, and
  612. values must be separated by commas. A special &quot;SourceFile&quot; column specifies
  613. the files associated with each row of information (and a SourceFile of &quot;*&quot;
  614. may be used to define default tags to be imported for all files). The
  615. following examples demonstrate basic use of this option:</p>
  616. <pre>
  617. # generate CSV file with common tags from all images in a directory
  618. exiftool -common -csv dir &gt; out.csv</pre>
  619. <pre>
  620. # update metadata for all images in a directory from CSV file
  621. exiftool -csv=a.csv dir</pre>
  622. <p>Empty values are ignored when importing. Also, FileName and Directory
  623. columns are ignored if they exist (ie. ExifTool will not attempt to write
  624. these tags with a CSV import). To force a tag to be deleted, use the <strong>-f</strong>
  625. option and set the value to &quot;-&quot; in the CSV file (or to the MissingTagValue
  626. if this API option was used). Multiple databases may be imported in a
  627. single command.</p>
  628. <p>When exporting a CSV file, the <strong>-g</strong> or <strong>-G</strong> option to add group names to
  629. the tag headings. If the <strong>-a</strong> option is used to allow duplicate tag names,
  630. the duplicate tags are only included in the CSV output if the column
  631. headings are unique. Adding the <strong>-G4</strong> option ensures a unique column
  632. heading for each tag. When exporting specific tags, the CSV columns are
  633. arranged in the same order as the specified tags provided the column
  634. headings exactly match the specified tag names, otherwise the columns are
  635. sorted in alphabetical order.</p>
  636. <p>When importing from a CSV file, only files specified on the command line are
  637. processed. Any extra entries in the CSV file are ignored.</p>
  638. <p>List-type tags are stored as simple strings in a CSV file, but the <strong>-sep</strong>
  639. option may be used to split them back into separate items when importing.</p>
  640. <p>Special feature: <strong>-csv</strong>+=<em>CSVFILE</em> may be used to add items to existing
  641. lists. This affects only list-type tags. Also applies to the <strong>-j</strong> option.</p>
  642. <p>Note that this option is fundamentally different than all other output
  643. format options because it requires information from all input files to be
  644. buffered in memory before the output is written. This may result in
  645. excessive memory usage when processing a very large number of files with a
  646. single command. Also, it makes this option incompatible with the <strong>-w</strong>
  647. option.</p>
  648. </dd>
  649. <dt><strong><strong>-d</strong> <em>FMT</em> (<strong>-dateFormat</strong>)</strong></dt>
  650. <dd>
  651. <p>Set the format for date/time tag values. The specifics of the <em>FMT</em> syntax
  652. are system dependent -- consult the <code>strftime</code> man page on your system for
  653. details. The default format is equivalent to &quot;%Y:%m:%d %H:%M:%S&quot;. This
  654. option has no effect on date-only or time-only tags and ignores timezone
  655. information if present. Only one <strong>-d</strong> option may be used per command. The
  656. inverse operation (ie. un-formatting a date/time value) is currently not
  657. applied when writing a date/time tag.</p>
  658. </dd>
  659. <dt><strong><a name="d" class="item"><strong>-D</strong> (<strong>-decimal</strong>)</a></strong></dt>
  660. <dd>
  661. <p>Show tag ID number in decimal when extracting information.</p>
  662. </dd>
  663. <dt><strong><a name="ex" class="item"><strong>-E</strong>, <strong>-ex</strong> (<strong>-escapeHTML</strong>, <strong>-escapeXML</strong>)</a></strong></dt>
  664. <dd>
  665. <p>Escape characters in output values for HTML (<strong>-E</strong>) or XML (<strong>-ex</strong>). For
  666. HTML, all characters with Unicode code points above U+007F are escaped as
  667. well as the following 5 characters: &amp; (&amp;amp;) &#39; (&amp;#39;) &quot; (&amp;quot;)
  668. &gt; (&amp;gt;) and &lt; (&amp;lt;). For XML, only these 5 characters are
  669. escaped. The <strong>-E</strong> option is implied with <strong>-h</strong>, and <strong>-ex</strong> is implied with
  670. <strong>-X</strong>. The inverse conversion is applied when writing tags.</p>
  671. </dd>
  672. <dt><strong><a name="f" class="item"><strong>-f</strong> (<strong>-forcePrint</strong>)</a></strong></dt>
  673. <dd>
  674. <p>Force printing of tags even if their values are not found. This option only
  675. applies when specific tags are requested on the command line (ie. not with
  676. wildcards or by <code>-all</code>). With this option, a dash (<code>-</code>) is printed for
  677. the value of any missing tag, but the dash may be changed via the API
  678. MissingTagValue option. May also be used to add a 'flags' attribute to the
  679. <strong>-listx</strong> output, or to allow tags to be deleted when writing with the
  680. <strong>-csv</strong>=<em>CSVFILE</em> feature.</p>
  681. </dd>
  682. <dt><strong><a name="g_num_num_groupheadings" class="item"><strong>-g</strong>[<em>NUM</em>][:<em>NUM</em>...] (<strong>-groupHeadings</strong>)</a></strong></dt>
  683. <dd>
  684. <p>Organize output by tag group. <em>NUM</em> specifies a group family number, and
  685. may be 0 (general location), 1 (specific location), 2 (category), 3
  686. (document number) or 4 (instance number). Multiple families may be
  687. specified by separating them with colons. By default the resulting group
  688. name is simplified by removing any leading <code>Main:</code> and collapsing adjacent
  689. identical group names, but this can be avoided by placing a colon before the
  690. first family number (eg. <strong>-g:3:1</strong>). If <em>NUM</em> is not specified, <strong>-g0</strong> is
  691. assumed. Use the <strong>-listg</strong> option to list group names for a specified
  692. family.</p>
  693. </dd>
  694. <dt><strong><a name="g_num_num_groupnames" class="item"><strong>-G</strong>[<em>NUM</em>][:<em>NUM</em>...] (<strong>-groupNames</strong>)</a></strong></dt>
  695. <dd>
  696. <p>Same as <strong>-g</strong> but print group name for each tag.</p>
  697. </dd>
  698. <dt><strong><a name="h" class="item"><strong>-h</strong> (<strong>-htmlFormat</strong>)</a></strong></dt>
  699. <dd>
  700. <p>Use HTML table formatting for output. Implies the <strong>-E</strong> option. The
  701. formatting options <strong>-D</strong>, <strong>-H</strong>, <strong>-g</strong>, <strong>-G</strong>, <strong>-l</strong> and <strong>-s</strong> may be used
  702. in combination with <strong>-h</strong> to influence the HTML format.</p>
  703. </dd>
  704. <dt><strong><a name="h" class="item"><strong>-H</strong> (<strong>-hex</strong>)</a></strong></dt>
  705. <dd>
  706. <p>Show tag ID number in hexadecimal when extracting information.</p>
  707. </dd>
  708. <dt><strong><a name="htmldump_offset" class="item"><strong>-htmlDump</strong>[<em>OFFSET</em>]</a></strong></dt>
  709. <dd>
  710. <p>Generate a dynamic web page containing a hex dump of the EXIF information.
  711. This can be a very powerful tool for low-level analysis of EXIF information.
  712. The <strong>-htmlDump</strong> option is also invoked if the <strong>-v</strong> and <strong>-h</strong> options are
  713. used together. The verbose level controls the maximum length of the blocks
  714. dumped. An <em>OFFSET</em> may be given to specify the base for displayed
  715. offsets. If not provided, the EXIF/TIFF base offset is used. Use
  716. <strong>-htmlDump0</strong> for absolute offsets. Currently only EXIF/TIFF and JPEG
  717. information is dumped, but the -u option can be used to give a raw hex dump
  718. of other file formats.</p>
  719. </dd>
  720. <dt><strong><a name="j_jsonfile_json" class="item"><strong>-j</strong>[=<em>JSONFILE</em>] (<strong>-json</strong>)</a></strong></dt>
  721. <dd>
  722. <p>Use JSON (JavaScript Object Notation) formatting for console output, or
  723. import JSON file if <em>JSONFILE</em> is specified. This option may be combined
  724. with <strong>-g</strong> to organize the output into objects by group, or <strong>-G</strong> to add
  725. group names to each tag. List-type tags with multiple items are output as
  726. JSON arrays unless <strong>-sep</strong> is used. By default XMP structures are flattened
  727. into individual tags in the JSON output, but the original structure may be
  728. preserved with the <strong>-struct</strong> option (this also causes all list-type XMP
  729. tags to be output as JSON arrays, otherwise single-item lists are output as
  730. simple strings). The <strong>-a</strong> option is implied if the <strong>-g</strong> or <strong>-G</strong> options
  731. are used, otherwise it is ignored and duplicate tags are suppressed. Adding
  732. the <strong>-D</strong> or <strong>-H</strong> option changes tag values to JSON objects with &quot;val&quot; and
  733. &quot;id&quot; fields, and adding <strong>-l</strong> adds a &quot;desc&quot; field, and a &quot;num&quot; field if the
  734. numerical value is different from the converted &quot;val&quot;. The <strong>-b</strong> option may
  735. be added to output binary data, encoded in base64 if necessary (indicated by
  736. &quot;base64:&quot; as the first 7 bytes of the value). The JSON output is UTF-8
  737. regardless of any <strong>-L</strong> or <strong>-charset</strong> option setting, but the UTF-8
  738. validation is disabled if a character set other than UTF-8 is specified.</p>
  739. <p>If <em>JSONFILE</em> is specified, the file is imported and the tag definitions
  740. from the file are used to set tag values on a per-file basis. The special
  741. &quot;SourceFile&quot; entry in each JSON object associates the information with a
  742. specific target file. An object with a missing SourceFile or a SourceFile
  743. of &quot;*&quot; defines default tags for all target files. The imported JSON file
  744. must have the same format as the exported JSON files with the exception that
  745. the <strong>-g</strong> option is not compatible with the import file format (use <strong>-G</strong>
  746. instead). Additionally, tag names in the input JSON file may be suffixed
  747. with a <code>#</code> to disable print conversion.</p>
  748. <p>Unlike CSV import, empty values are not ignored, and will cause an empty
  749. value to be written if supported by the specific metadata type. Tags are
  750. deleted by using the <strong>-f</strong> option and setting the tag value to &quot;-&quot; (or to
  751. the MissingTagValue setting if this API option was used). Importing with
  752. <strong>-j</strong>+=<em>JSONFILE</em> causes new values to be added to existing lists.</p>
  753. </dd>
  754. <dt><strong><a name="l" class="item"><strong>-l</strong> (<strong>-long</strong>)</a></strong></dt>
  755. <dd>
  756. <p>Use long 2-line Canon-style output format. Adds a description and
  757. unconverted value (if it is different from the converted value) to the XML,
  758. JSON or PHP output when <strong>-X</strong>, <strong>-j</strong> or <strong>-php</strong> is used. May also be
  759. combined with <strong>-listf</strong>, <strong>-listr</strong> or <strong>-listwf</strong> to add descriptions of the
  760. file types.</p>
  761. </dd>
  762. <dt><strong><a name="l" class="item"><strong>-L</strong> (<strong>-latin</strong>)</a></strong></dt>
  763. <dd>
  764. <p>Use Windows Latin1 encoding (cp1252) for output tag values instead of the
  765. default UTF-8. When writing, <strong>-L</strong> specifies that input text values are
  766. Latin1 instead of UTF-8. Equivalent to <code>-charset latin</code>.</p>
  767. </dd>
  768. <dt><strong><a name="lang_lang" class="item"><strong>-lang</strong> [<em>LANG</em>]</a></strong></dt>
  769. <dd>
  770. <p>Set current language for tag descriptions and converted values. <em>LANG</em> is
  771. <code>de</code>, <code>fr</code>, <code>ja</code>, etc. Use <strong>-lang</strong> with no other arguments to get a
  772. list of available languages. The default language is <code>en</code> if <strong>-lang</strong> is
  773. not specified. Note that tag/group names are always English, independent of
  774. the <strong>-lang</strong> setting, and translation of warning/error messages has not yet
  775. been implemented. May also be combined with <strong>-listx</strong> to output
  776. descriptions in one language only.</p>
  777. <p>By default, ExifTool uses UTF-8 encoding for special characters, but the
  778. the <strong>-L</strong> or <strong>-charset</strong> option may be used to invoke other encodings.</p>
  779. <p>Currently, the language support is not complete, but users are welcome to
  780. help improve this by submitting their own translations. To submit a set of
  781. translations, first use the <strong>-listx</strong> option and redirect the output to a
  782. file to generate an XML tag database, then add entries for other languages,
  783. zip this file, and email it to phil at owl.phy.queensu.ca for inclusion in
  784. ExifTool.</p>
  785. </dd>
  786. <dt><strong><a name="listitem_index" class="item"><strong>-listItem</strong> <em>INDEX</em></a></strong></dt>
  787. <dd>
  788. <p>For list-type tags, this causes only the item with the specified index to be
  789. extracted. <em>INDEX</em> is 0 for the first item in the list. Negative indices
  790. may also be used to reference items from the end of the list. Has no effect
  791. on single-valued tags. Also applies to tag values when copying, and in
  792. <strong>-if</strong> conditions.</p>
  793. </dd>
  794. <dt><strong><a name="n" class="item"><strong>-n</strong> (<strong>--printConv</strong>)</a></strong></dt>
  795. <dd>
  796. <p>Read and write values as numbers instead of words. By default, extracted
  797. values are converted to a more human-readable format for printing, but the
  798. <strong>-n</strong> option disables this print conversion for all tags. For example:</p>
  799. <pre>
  800. &gt; exiftool -Orientation -S a.jpg
  801. Orientation: Rotate 90 CW
  802. &gt; exiftool -Orientation -S -n a.jpg
  803. Orientation: 6</pre>
  804. <p>The print conversion may also be disabled on a per-tag basis by suffixing
  805. the tag name with a <code>#</code> character:</p>
  806. <pre>
  807. &gt; exiftool -Orientation# -Orientation -S a.jpg
  808. Orientation: 6
  809. Orientation: Rotate 90 CW</pre>
  810. <p>These techniques may also be used to disable the inverse print conversion
  811. when writing. For example, the following commands all have the same effect:</p>
  812. <pre>
  813. &gt; exiftool -Orientation='Rotate 90 CW' a.jpg
  814. &gt; exiftool -Orientation=6 -n a.jpg
  815. &gt; exiftool -Orientation#=6 a.jpg</pre>
  816. </dd>
  817. <dt><strong><a name="str" class="item"><strong>-p</strong> <em>FMTFILE</em> or <em>STR</em> (<strong>-printFormat</strong>)</a></strong></dt>
  818. <dd>
  819. <p>Print output in the format specified by the given file or string (and ignore
  820. other format options). Tag names in the format file or string begin with a
  821. <code>$</code> symbol and may contain a leading group names and/or a trailing <code>#</code>.
  822. Case is not significant. Braces <code>{}</code> may be used around the tag name to
  823. separate it from subsequent text. Use <code>$$</code> to represent a <code>$</code> symbol, and
  824. <code>$/</code> for a newline. Multiple <strong>-p</strong> options may be used, each contributing
  825. a line of text to the output. Lines beginning with <code>#[HEAD]</code> and
  826. <code>#[TAIL]</code> are output only for the first and last processed files
  827. respectively. Lines beginning with <code>#[BODY]</code> and lines not beginning with
  828. <code>#</code> are output for each processed file. Other lines beginning with <code>#</code>
  829. are ignored. For example, this format file:</p>
  830. <pre>
  831. # this is a comment line
  832. #[HEAD]-- Generated by ExifTool $exifToolVersion --
  833. File: $FileName - $DateTimeOriginal
  834. (f/$Aperture, ${ShutterSpeed}s, ISO $EXIF:ISO)
  835. #[TAIL]-- end --</pre>
  836. <p>with this command:</p>
  837. <pre>
  838. exiftool -p test.fmt a.jpg b.jpg</pre>
  839. <p>produces output like this:</p>
  840. <pre>
  841. -- Generated by ExifTool 10.10 --
  842. File: a.jpg - 2003:10:31 15:44:19
  843. (f/5.6, 1/60s, ISO 100)
  844. File: b.jpg - 2006:05:23 11:57:38
  845. (f/8.0, 1/13s, ISO 100)
  846. -- end --</pre>
  847. <p>When <strong>-ee</strong> (<strong>-extractEmbedded</strong>) is combined with <strong>-p</strong>, embedded documents
  848. are effectively processed as separate input files.</p>
  849. <p>If a specified tag does not exist, a minor warning is issued and the line
  850. with the missing tag is not printed. However, the <strong>-f</strong> option may be used
  851. to set the value of missing tags to '-' (but this may be configured via the
  852. MissingTagValue API option), or the <strong>-m</strong> option may be used to ignore minor
  853. warnings and leave the missing values empty.</p>
  854. <p>An advanced formatting feature allows an arbitrary Perl expression to be
  855. applied to the value of any tag by placing it inside the braces after a
  856. semicolon following the tag name. The expression has access to the value of
  857. this tag through the default input variable (<code>$_</code>), and the full API
  858. through the current ExifTool object (<code>$self</code>). It may contain any valid
  859. Perl code, including translation (<code>tr///</code>) and substitution (<code>s///</code>)
  860. operations, but note that braces within the expression must be balanced.
  861. The example below prints the camera Make with spaces translated to
  862. underlines, and multiple consecutive underlines replaced by a single
  863. underline:</p>
  864. <pre>
  865. exiftool -p '${make;tr/ /_/;s/__+/_/g}' image.jpg</pre>
  866. <p>A default expression of <code>tr(/\\?*:|&quot;&lt;&gt;\0)()d</code> is assumed if the
  867. expression is empty. This removes the characters / \ ? * : | &lt; &gt;
  868. and null from the printed value. (These characters are illegal in Windows
  869. file names, so this feature is useful if tag values are used in file names.)</p>
  870. </dd>
  871. <dt><strong><a name="php" class="item"><strong>-php</strong></a></strong></dt>
  872. <dd>
  873. <p>Format output as a PHP Array. The <strong>-g</strong>, <strong>-G</strong>, <strong>-D</strong>, <strong>-H</strong>, <strong>-l</strong>,
  874. <strong>-sep</strong> and <strong>-struct</strong> options combine with <strong>-php</strong>, and duplicate tags are
  875. handled in the same way as with the <strong>-json</strong> option. As well, the <strong>-b</strong>
  876. option may be added to output binary data. Here is a simple example showing
  877. how this could be used in a PHP script:</p>
  878. <pre>
  879. &lt;?php
  880. eval('$array=' . `exiftool -php -q image.jpg`);
  881. print_r($array);
  882. ?&gt;</pre>
  883. </dd>
  884. <dt><strong><a name="s_num_short" class="item"><strong>-s</strong>[<em>NUM</em>] (<strong>-short</strong>)</a></strong></dt>
  885. <dd>
  886. <p>Short output format. Prints tag names instead of descriptions. Add <em>NUM</em>
  887. or up to 3 <strong>-s</strong> options for even shorter formats:</p>
  888. <pre>
  889. -s1 or -s - print tag names instead of descriptions
  890. -s2 or -s -s - no extra spaces to column-align values
  891. -s3 or -s -s -s - print values only (no tag names)</pre>
  892. <p>Also effective when combined with <strong>-t</strong>, <strong>-h</strong>, <strong>-X</strong> or <strong>-listx</strong> options.</p>
  893. </dd>
  894. <dt><strong><a name="s" class="item"><strong>-S</strong> (<strong>-veryShort</strong>)</a></strong></dt>
  895. <dd>
  896. <p>Very short format. The same as <strong>-s2</strong> or two <strong>-s</strong> options. Tag names are
  897. printed instead of descriptions, and no extra spaces are added to
  898. column-align values.</p>
  899. </dd>
  900. <dt><strong><strong>-sep</strong> <em>STR</em> (<strong>-separator</strong>)</strong></dt>
  901. <dd>
  902. <p>Specify separator string for items in list-type tags. When reading, the
  903. default is to join list items with &quot;, &quot;. When writing, this option causes
  904. values assigned to list-type tags to be split into individual items at each
  905. substring matching <em>STR</em> (otherwise they are not split by default). Space
  906. characters in <em>STR</em> match zero or more whitespace characters in the value.</p>
  907. <p>Note that an empty separator (&quot;&quot;) is allowed, and will join items with no
  908. separator when reading, or split the value into individual characters when
  909. writing.</p>
  910. </dd>
  911. <dt><strong><a name="sort_sort" class="item"><strong>-sort</strong>, <strong>--sort</strong></a></strong></dt>
  912. <dd>
  913. <p>Sort output by tag description, or by tag name if the <strong>-s</strong> option is used.
  914. When sorting by description, the sort order will depend on the <strong>-lang</strong>
  915. option setting. Without the <strong>-sort</strong> option, tags appear in the order they
  916. were specified on the command line, or if not specified, the order they were
  917. extracted from the file. By default, tags are organized by groups when
  918. combined with the <strong>-g</strong> or <strong>-G</strong> option, but this grouping may be disabled
  919. with <strong>--sort</strong>.</p>
  920. </dd>
  921. <dt><strong><a name="struct_struct" class="item"><strong>-struct</strong>, <strong>--struct</strong></a></strong></dt>
  922. <dd>
  923. <p>Output structured XMP information instead of flattening to individual tags.
  924. This option works well when combined with the XML (<strong>-X</strong>) and JSON (<strong>-j</strong>)
  925. output formats. For other output formats, the structures are serialized
  926. into the same format as when writing structured information (see
  927. <a href="http://owl.phy.queensu.ca/~phil/exiftool/struct.html">http://owl.phy.queensu.ca/~phil/exiftool/struct.html</a> for details). When
  928. copying, structured tags are copied by default unless <strong>--struct</strong> is used to
  929. disable this feature (although flattened tags may still be copied by
  930. specifying them individually unless <strong>-struct</strong> is used). These options have
  931. no effect when assigning new values since both flattened and structured tags
  932. may always be used when writing.</p>
  933. </dd>
  934. <dt><strong><a name="t" class="item"><strong>-t</strong> (<strong>-tab</strong>)</a></strong></dt>
  935. <dd>
  936. <p>Output a tab-delimited list of description/values (useful for database
  937. import). May be combined with <strong>-s</strong> to print tag names instead of
  938. descriptions, or <strong>-S</strong> to print tag values only, tab-delimited on a single
  939. line. The <strong>-t</strong> option may also be used to add tag table information to the
  940. <strong>-X</strong> option output.</p>
  941. </dd>
  942. <dt><strong><a name="t" class="item"><strong>-T</strong> (<strong>-table</strong>)</a></strong></dt>
  943. <dd>
  944. <p>Output tag values in table form. Equivalent to <strong>-t -S -q -f</strong>.</p>
  945. </dd>
  946. <dt><strong><a name="v_num_verbose" class="item"><strong>-v</strong>[<em>NUM</em>] (<strong>-verbose</strong>)</a></strong></dt>
  947. <dd>
  948. <p>Print verbose messages. <em>NUM</em> specifies the level of verbosity in the
  949. range 0-5, with higher numbers being more verbose. If <em>NUM</em> is not given,
  950. then each <strong>-v</strong> option increases the level of verbosity by 1. With any
  951. level greater than 0, most other options are ignored and normal console
  952. output is suppressed unless specific tags are extracted. Using <strong>-v0</strong>
  953. causes the console output buffer to be flushed after each line (which may be
  954. useful to avoid delays when piping exiftool output), and prints the name of
  955. each processed file when writing. Also see the <strong>-progress</strong> option.</p>
  956. </dd>
  957. <dt><strong><strong>-w</strong>[+|!] <em>EXT</em> or <em>FMT</em> (<strong>-textOut</strong>)</strong></dt>
  958. <dd>
  959. <p>Write console output to files with names ending in <em>EXT</em>, one for each
  960. source file. The output file name is obtained by replacing the source file
  961. extension (including the '.') with the specified extension (and a '.' is
  962. added to the start of <em>EXT</em> if it doesn't already contain one).
  963. Alternatively, a <em>FMT</em> string may be used to give more control over the
  964. output file name and directory. In the format string, %d, %f and %e
  965. represent the directory, filename and extension of the source file, and %c
  966. represents a copy number which is automatically incremented if the file
  967. already exists. %d includes the trailing '/' if necessary, but %e does not
  968. include the leading '.'. For example:</p>
  969. <pre>
  970. -w %d%f.txt # same effect as &quot;-w txt&quot;
  971. -w dir/%f_%e.out # write files to &quot;dir&quot; as &quot;FILE_EXT.out&quot;
  972. -w dir2/%d%f.txt # write to &quot;dir2&quot;, keeping dir structure
  973. -w a%c.txt # write to &quot;a.txt&quot; or &quot;a1.txt&quot; or &quot;a2.txt&quot;...</pre>
  974. <p>Existing files will not be overwritten unless an exclamation point is added
  975. to the option name (ie. <strong>-w!</strong> or <strong>-textOut!</strong>), or a plus sign to append to
  976. the existing file (ie. <strong>-w+</strong> or <strong>-textOut+</strong>). Both may be used (ie.
  977. <strong>-w+!</strong> or <strong>-textOut+!</strong>) to overwrite output files that didn't exist before
  978. the command was run, and append the output from multiple source files. For
  979. example, to write one output file for all source files in each directory:</p>
  980. <pre>
  981. exiftool -filename -createdate -T -w+! %d/out.txt -r DIR</pre>
  982. <p>Notes:</p>
  983. <p>1) In a Windows BAT file the <code>%</code> character is represented by <code>%%</code>, so an
  984. argument like <code>%d%f.txt</code> is written as <code>%%d%%f.txt</code>.</p>
  985. <p>2) If the argument for <strong>-w</strong> does not contain a format code (%d, %f or %e),
  986. then it is interpreted as a file extension. Therefore it is not possible to
  987. specify a simple filename as an argument, so creating a single output file
  988. from multiple source files is typically done by shell redirection, ie)</p>
  989. <pre>
  990. exiftool FILE1 FILE2 ... &gt; out.txt</pre>
  991. <p>But if necessary, an empty format code may be used to force the argument to
  992. be interpreted as a format string, and the same result may be obtained
  993. without the use of shell redirection:</p>
  994. <pre>
  995. exiftool -w+! %0fout.txt FILE1 FILE2 ...</pre>
  996. <p>Advanced features:</p>
  997. <p>A substring of the original file name, directory or extension may be taken
  998. by specifying a field width immediately following the '%' character. If the
  999. width is negative, the substring is taken from the end. The substring
  1000. position (characters to ignore at the start or end of the string) may be
  1001. given by a second optional value after a decimal point. For example:</p>
  1002. <pre>
  1003. Input File Name Format Specifier Output File Name
  1004. ---------------- ---------------- ----------------
  1005. Picture-123.jpg %7f.txt Picture.txt
  1006. Picture-123.jpg %-.4f.out Picture.out
  1007. Picture-123.jpg %7f.%-3f Picture.123
  1008. Picture-123a.jpg Meta%-3.1f.txt Meta123.txt</pre>
  1009. <p>For %d, the field width/position specifiers may be applied to the directory
  1010. levels instead of substring position by using a colon instead of a decimal
  1011. point in the format specifier. For example:</p>
  1012. <pre>
  1013. Source Dir Format Result Notes
  1014. ------------ ------ ---------- ------------------
  1015. pics/2012/02 %2:d pics/2012/ take top 2 levels
  1016. pics/2012/02 %-:1d pics/2012/ up one directory level
  1017. pics/2012/02 %:1d 2012/02/ ignore top level
  1018. pics/2012/02 %1:1d 2012/ take 1 level after top
  1019. /Users/phil %:2d phil/ ignore top 2 levels</pre>
  1020. <p>(Note that the root directory counts as one level when an absolute path is
  1021. used as in the last example above.)</p>
  1022. <p>For %c, these modifiers have a different effects. If a field width is
  1023. given, the copy number is padded with zeros to the specified width. A
  1024. leading '-' adds a dash before the copy number, and a '+' adds an underline.
  1025. By default, the copy number is omitted from the first file of a given name,
  1026. but this can be changed by adding a decimal point to the modifier. For
  1027. example:</p>
  1028. <pre>
  1029. -w A%-cZ.txt # AZ.txt, A-1Z.txt, A-2Z.txt ...
  1030. -w B%5c.txt # B.txt, B00001.txt, B00002.txt ...
  1031. -w C%.c.txt # C0.txt, C1.txt, C2.txt ...
  1032. -w D%-.c.txt # D-0.txt, D-1.txt, D-2.txt ...
  1033. -w E%-.4c.txt # E-0000.txt, E-0001.txt, E-0002.txt ...
  1034. -w F%-.4nc.txt # F-0001.txt, F-0002.txt, F-0003.txt ...
  1035. -w G%+c.txt # G.txt, G_1.txt G_2.txt ...
  1036. -w H%-lc.txt # H.txt, H-b.txt, H-c.txt ...
  1037. -w I.%.3uc.txt # I.AAA.txt, I.AAB.txt, I.AAC.txt ...</pre>
  1038. <p>A special feature allows the copy number to be incremented for each
  1039. processed file by using %C (upper case) instead of %c. This allows a
  1040. sequential number to be added to output file names, even if the names are
  1041. different. For %C, a copy number of zero is not omitted as it is with %c.
  1042. The number before the decimal place gives the starting index, the number
  1043. after the decimal place gives the field width. The following examples show
  1044. the output filenames when used with the command
  1045. <code>exiftool rose.jpg star.jpg jet.jpg ...</code>:</p>
  1046. <pre>
  1047. -w %C%f.txt # 0rose.txt, 1star.txt, 2jet.txt
  1048. -w %f-%10C.txt # rose-10.txt, star-11.txt, jet-12.txt
  1049. -w %.3C-%f.txt # 000-rose.txt, 001-star.txt, 002-jet.txt
  1050. -w %57.4C%f.txt # 0057rose.txt, 0058star.txt, 0059jet.txt</pre>
  1051. <p>All format codes may be modified by 'l' or 'u' to specify lower or upper
  1052. case respectively (ie. <code>%le</code> for a lower case file extension). When used
  1053. to modify %c or %C, the numbers are changed to an alphabetical base (see
  1054. example H above). Also, %c may be modified by 'n' to count using natural
  1055. numbers starting from 1, instead of 0 (see example F above).</p>
  1056. <p>This same <em>FMT</em> syntax is used with the <strong>-o</strong> and <strong>-tagsFromFile</strong> options,
  1057. although %c is only valid for output file names.</p>
  1058. </dd>
  1059. <dt><strong><strong>-W</strong>[!|+] <em>FMT</em> (<strong>-tagOut</strong>)</strong></dt>
  1060. <dd>
  1061. <p>This enhanced version of the <strong>-w</strong> option allows a separate output file to
  1062. be created for each extracted tag. The differences between <strong>-W</strong> and <strong>-w</strong>
  1063. are as follows:</p>
  1064. <p>1) With <strong>-W</strong>, a new output file is created for each extracted tag.</p>
  1065. <p>2) <strong>-W</strong> supports three additional format codes: %t, %g and %s represent
  1066. the tag name, group name, and suggested extension for the output file (based
  1067. on the format of the data). The %g code may be followed by a single digit
  1068. to specify the group family number (eg. %g1), otherwise family 0 is assumed.
  1069. The substring width/position/case specifiers may be used with these format
  1070. codes in exactly the same way as with %f and %e.</p>
  1071. <p>3) The argument for <strong>-W</strong> is interpreted as a file name if it contains no
  1072. format codes. (For <strong>-w</strong>, this would be a file extension.) This change
  1073. allows a simple file name to be specified, which, when combined with the
  1074. append feature, provides a method to write metadata from multiple source
  1075. files to a single output file without the need for shell redirection.</p>
  1076. <p>4) Adding the <strong>-v</strong> option to <strong>-W</strong> generates a list of the tags and output
  1077. file names instead of giving a verbose dump of the entire file. (Unless
  1078. appending all output to one file for each source file by using <strong>-W+</strong> with
  1079. an output file <em>FMT</em> that does not contain %t, $g or %s.)</p>
  1080. <p>5) Individual list items are stored in separate files when <strong>-W</strong> is combined
  1081. with <strong>-b</strong>, but note that for separate files to be created %c must be used
  1082. in <em>FMT</em> to give the files unique names.</p>
  1083. </dd>
  1084. <dt><strong><a name="ext" class="item"><strong>-Wext</strong> <em>EXT</em>, <strong>--Wext</strong> <em>EXT</em> (<strong>-tagOutExt</strong>)</a></strong></dt>
  1085. <dd>
  1086. <p>This option is used to specify the type of output file(s) written by the
  1087. <strong>-W</strong> option. An output file is written only if the suggested extension
  1088. matches <em>EXT</em>. Multiple <strong>-Wext</strong> options may be used to write more than
  1089. one type of file. Use <strong>--Wext</strong> to write all but the specified type(s).</p>
  1090. </dd>
  1091. <dt><strong><a name="x" class="item"><strong>-X</strong> (<strong>-xmlFormat</strong>)</a></strong></dt>
  1092. <dd>
  1093. <p>Use ExifTool-specific RDF/XML formatting for console output. Implies the
  1094. <strong>-a</strong> option, so duplicate tags are extracted. The formatting options
  1095. <strong>-b</strong>, <strong>-D</strong>, <strong>-H</strong>, <strong>-l</strong>, <strong>-s</strong>, <strong>-sep</strong>, <strong>-struct</strong> and <strong>-t</strong> may be used
  1096. in combination with <strong>-X</strong> to affect the output, but note that the tag ID
  1097. (<strong>-D</strong>, <strong>-H</strong> and <strong>-t</strong>), binary data (<strong>-b</strong>) and structured output
  1098. (<strong>-struct</strong>) options are not effective for the short output (<strong>-s</strong>). Another
  1099. restriction of <strong>-s</strong> is that only one tag with a given group and name may
  1100. appear in the output. Note that the tag ID options (<strong>-D</strong>, <strong>-H</strong> and <strong>-t</strong>)
  1101. will produce non-standard RDF/XML unless the <strong>-l</strong> option is also used.</p>
  1102. <p>By default, <strong>-X</strong> outputs flattened tags, so <strong>-struct</strong> should be added if
  1103. required to preserve XMP structures. List-type tags with multiple values
  1104. are formatted as an RDF Bag, but they are combined into a single string when
  1105. <strong>-s</strong> or <strong>-sep</strong> is used. Using <strong>-L</strong> changes the XML encoding from &quot;UTF-8&quot;
  1106. to &quot;windows-1252&quot;. Other <strong>-charset</strong> settings change the encoding only if
  1107. there is a corresponding standard XML character set. The <strong>-b</strong> option
  1108. causes binary data values to be written, encoded in base64 if necessary.
  1109. The <strong>-t</strong> option adds tag table information to the output (table <code>name</code>,
  1110. decimal tag <code>id</code>, and <code>index</code> for cases where multiple conditional tags
  1111. exist with the same ID).</p>
  1112. <p>Note: This output is NOT the same as XMP because it uses
  1113. dynamically-generated property names corresponding to the ExifTool tag
  1114. names, and not the standard XMP properties. To write XMP instead, use the
  1115. <strong>-o</strong> option with an XMP extension for the output file.</p>
  1116. </dd>
  1117. </dl>
  1118. <p>
  1119. </p>
  1120. <h3><a name="processing_control">Processing control</a></h3>
  1121. <dl>
  1122. <dt><strong><a name="a" class="item"><strong>-a</strong>, <strong>--a</strong> (<strong>-duplicates</strong>, <strong>--duplicates</strong>)</a></strong></dt>
  1123. <dd>
  1124. <p>Allow (<strong>-a</strong>) or suppress (<strong>--a</strong>) duplicate tag names to be extracted. By
  1125. default, duplicate tags are suppressed unless the <strong>-ee</strong> or <strong>-X</strong> options
  1126. are used or the Duplicates option is enabled in the configuration file.</p>
  1127. </dd>
  1128. <dt><strong><a name="e" class="item"><strong>-e</strong> (<strong>--composite</strong>)</a></strong></dt>
  1129. <dd>
  1130. <p>Extract existing tags only -- don't calculate composite tags.</p>
  1131. </dd>
  1132. <dt><strong><a name="ee" class="item"><strong>-ee</strong> (<strong>-extractEmbedded</strong>)</a></strong></dt>
  1133. <dd>
  1134. <p>Extract information from embedded documents in EPS files, embedded EPS
  1135. information and JPEG and Jpeg2000 images in PDF files, embedded MPF images
  1136. in JPEG and MPO files, streaming metadata in AVCHD videos, and the resource
  1137. fork of Mac OS files. Implies the <strong>-a</strong> option. Use <strong>-g3</strong> or <strong>-G3</strong> to
  1138. identify the originating document for extracted information. Embedded
  1139. documents containing sub-documents are indicated with dashes in the family 3
  1140. group name. (eg. <code>Doc2-3</code> is the 3rd sub-document of the 2nd embedded
  1141. document.) Note that this option may increase processing time substantially,
  1142. especially for PDF files with many embedded images.</p>
  1143. </dd>
  1144. <dt><strong><strong>-ext</strong> <em>EXT</em>, <strong>--ext</strong> <em>EXT</em> (<strong>-extension</strong>)</strong></dt>
  1145. <dd>
  1146. <p>Process only files with (<strong>-ext</strong>) or without (<strong>--ext</strong>) a specified
  1147. extension. There may be multiple <strong>-ext</strong> and <strong>--ext</strong> options. Extensions
  1148. may begin with a leading '.', and case is not significant. For example:</p>
  1149. <pre>
  1150. exiftool -ext .JPG DIR # process only JPG files
  1151. exiftool --ext cr2 --ext dng DIR # supported files but CR2/DNG
  1152. exiftool --ext . DIR # ignore if no extension
  1153. exiftool -ext &quot;*&quot; DIR # process all files
  1154. exiftool -ext &quot;*&quot; --ext xml DIR # process all but XML files</pre>
  1155. <p>The extension may be <code>&quot;*&quot;</code> as in the last two examples above to force
  1156. processing files with any extension (not just supported files).</p>
  1157. <p>Using this option has two main advantages over specifying <code>*.EXT</code> on the
  1158. command line: 1) It applies to files in subdirectories when combined with
  1159. the <strong>-r</strong> option. 2) The <strong>-ext</strong> option is case-insensitive, which is
  1160. useful when processing files on case-sensitive filesystems.</p>
  1161. </dd>
  1162. <dt><strong><a name="f_offset_fixbase" class="item"><strong>-F</strong>[<em>OFFSET</em>] (<strong>-fixBase</strong>)</a></strong></dt>
  1163. <dd>
  1164. <p>Fix the base for maker notes offsets. A common problem with some image
  1165. editors is that offsets in the maker notes are not adjusted properly when
  1166. the file is modified. This may cause the wrong values to be extracted for
  1167. some maker note entries when reading the edited file. This option allows an
  1168. integer <em>OFFSET</em> to be specified for adjusting the maker notes base offset.
  1169. If no <em>OFFSET</em> is given, ExifTool takes its best guess at the correct base.
  1170. Note that exiftool will automatically fix the offsets for images which store
  1171. original offset information (eg. newer Canon models). Offsets are fixed
  1172. permanently if <strong>-F</strong> is used when writing EXIF to an image. eg)</p>
  1173. <pre>
  1174. exiftool -F -exif:resolutionunit=inches image.jpg</pre>
  1175. </dd>
  1176. <dt><strong><a name="fast_num" class="item"><strong>-fast</strong>[<em>NUM</em>]</a></strong></dt>
  1177. <dd>
  1178. <p>Increase speed of extracting information from JPEG images. With this
  1179. option, ExifTool will not scan to the end of a JPEG image to check for an
  1180. AFCP or PreviewImage trailer, or past the first comment in GIF images or the
  1181. audio/video data in WAV/AVI files to search for additional metadata. These
  1182. speed benefits are small when reading images directly from disk, but can be
  1183. substantial if piping images through a network connection. For more
  1184. substantial speed benefits, <strong>-fast2</strong> also causes exiftool to avoid
  1185. extracting any EXIF MakerNote information. <strong>-fast3</strong> avoids processing the
  1186. file entirely, and returns only an initial guess at FileType and the pseudo
  1187. System tags.</p>
  1188. </dd>
  1189. <dt><strong><a name="fileorder_tag" class="item"><strong>-fileOrder</strong> [-]<em>TAG</em></a></strong></dt>
  1190. <dd>
  1191. <p>Set file processing order according to the sorted value of the specified
  1192. <em>TAG</em>. For example, to process files in order of date:</p>
  1193. <pre>
  1194. exiftool -fileOrder DateTimeOriginal DIR</pre>
  1195. <p>Additional <strong>-fileOrder</strong> options may be added for secondary sort keys.
  1196. Numbers are sorted numerically, and all other values are sorted
  1197. alphabetically. The sort order may be reversed by prefixing the tag name
  1198. with a <code>-</code> (eg. <code>-fileOrder -createdate</code>). Print conversion of the sorted
  1199. values is disabled with the <strong>-n</strong> option, or a <code>#</code> appended to the tag
  1200. name. Other formatting options (eg. <strong>-d</strong>) have no effect on the sorted
  1201. values. Note that the <strong>-fileOrder</strong> option has a large performance impact
  1202. since it involves an additional processing pass of each file.</p>
  1203. </dd>
  1204. <dt><strong><a name="dir" class="item"><strong>-i</strong> <em>DIR</em> (<strong>-ignore</strong>)</a></strong></dt>
  1205. <dd>
  1206. <p>Ignore specified directory name. <em>DIR</em> may be either an individual folder
  1207. name, or a full path. If a full path is specified, it must match the
  1208. Directory tag exactly to be ignored. Use multiple <strong>-i</strong> options to ignore
  1209. more than one directory name. A special <em>DIR</em> value of <code>SYMLINKS</code> (case
  1210. sensitive) may be specified to ignore symbolic links when the <strong>-r</strong> option
  1211. is used.</p>
  1212. </dd>
  1213. <dt><strong><a name="if_expr" class="item"><strong>-if</strong> <em>EXPR</em></a></strong></dt>
  1214. <dd>
  1215. <p>Specify a condition to be evaluated before processing each <em>FILE</em>. <em>EXPR</em>
  1216. is a Perl-like logic expression containing tag names prefixed by <code>$</code>
  1217. symbols. It is evaluated with the tags from each <em>FILE</em> in turn, and the
  1218. file is processed only if the expression returns true. Unlike Perl variable
  1219. names, tag names are not case sensitive and may contain a hyphen. As well,
  1220. tag names may have a leading group names separated by colons, and/or a
  1221. trailing <code>#</code> character to disable print conversion. The expression
  1222. <code>$GROUP:all</code> evaluates to 1 if any tag exists in the specified <code>GROUP</code>, or
  1223. 0 otherwise (see note 2 below). When multiple <strong>-if</strong> options are used, all
  1224. conditions must be satisfied to process the file. Returns an exit status of
  1225. 1 if all files fail the condition. Below are a few examples:</p>
  1226. <pre>
  1227. # extract shutterspeed from all Canon images in a directory
  1228. exiftool -shutterspeed -if '$make eq &quot;Canon&quot;' dir</pre>
  1229. <pre>
  1230. # add one hour to all images created on or after Apr. 2, 2006
  1231. exiftool -alldates+=1 -if '$CreateDate ge &quot;2006:04:02&quot;' dir</pre>
  1232. <pre>
  1233. # set EXIF ISO value if possible, unless it is set already
  1234. exiftool '-exif:iso&lt;iso' -if 'not $exif:iso' dir</pre>
  1235. <pre>
  1236. # find images containing a specific keyword (case insensitive)
  1237. exiftool -if '$keywords =~ /harvey/i' -filename dir</pre>
  1238. <p>Notes:</p>
  1239. <p>1) The <strong>-n</strong> and <strong>-b</strong> options also apply to tags used in <em>EXPR</em>.</p>
  1240. <p>2) Some binary data blocks are not extracted unless specified explicitly.
  1241. These tags are not available for use in the <strong>-if</strong> condition unless they are
  1242. also specified on the command line. The alternative is to use the
  1243. <code>$GROUP:all</code> syntax. (eg. Use <code>$exif:all</code> instead of <code>$exif</code> in <em>EXPR</em>
  1244. to test for the existence of EXIF tags.)</p>
  1245. <p>3) Tags in the string are interpolated the same way as with <strong>-p</strong> before the
  1246. expression is evaluated. In this interpolation, <code>$/</code> is converted to a
  1247. newline and <code>$$</code> represents a single <code>$</code> symbol (so Perl variables, if
  1248. used, require a double <code>$</code>).</p>
  1249. <p>4) The condition may only test tags from the file being processed. To
  1250. process one file based on tags from another, two steps are required. For
  1251. example, to process XMP sidecar files in directory <a href="#dir"><code>DIR</code></a> based on tags from
  1252. the associated NEF:</p>
  1253. <pre>
  1254. exiftool -if EXPR -p '$directory/$filename' -ext nef DIR &gt; nef.txt
  1255. exiftool -@ nef.txt -srcfile %d%f.xmp ...</pre>
  1256. <p>5) The <strong>-a</strong> option has no effect on the evaluation of the expression, and
  1257. the values of duplicate tags are accessible only by specifying a group name
  1258. (such as a family 4 instance number, eg. <code>$Copy1:TAG</code>, <code>$Copy2:TAG</code>, etc).</p>
  1259. </dd>
  1260. <dt><strong><a name="m" class="item"><strong>-m</strong> (<strong>-ignoreMinorErrors</strong>)</a></strong></dt>
  1261. <dd>
  1262. <p>Ignore minor errors and warnings. This enables writing to files with minor
  1263. errors and disables some validation checks which could result in minor
  1264. warnings. Generally, minor errors/warnings indicate a problem which usually
  1265. won't result in loss of metadata if ignored. However, there are exceptions,
  1266. so ExifTool leaves it up to you to make the final decision. Minor errors
  1267. and warnings are indicated by &quot;[minor]&quot; at the start of the message.
  1268. Warnings which affect processing when ignored are indicated by &quot;[Minor]&quot;
  1269. (with a capital &quot;M&quot;).</p>
  1270. </dd>
  1271. <dt><strong><strong>-o</strong> <em>OUTFILE</em> or <em>FMT</em> (<strong>-out</strong>)</strong></dt>
  1272. <dd>
  1273. <p>Set the output file or directory name when writing information. Without
  1274. this option, when any &quot;real&quot; tags are written the original file is renamed
  1275. to <code>FILE_original</code> and output is written to <em>FILE</em>. When writing only
  1276. FileName and/or Directory &quot;pseudo&quot; tags, <strong>-o</strong> causes the file to be copied
  1277. instead of moved, but directories specified for either of these tags take
  1278. precedence over that specified by the <strong>-o</strong> option.</p>
  1279. <p><em>OUTFILE</em> may be <code>-</code> to write to stdout. The output file name may also be
  1280. specified using a <em>FMT</em> string in which %d, %f and %e represent the
  1281. directory, file name and extension of <em>FILE</em>. Also, %c may be used to add
  1282. a copy number. See the <strong>-w</strong> option for <em>FMT</em> string examples.</p>
  1283. <p>The output file is taken to be a directory name if it already exists as a
  1284. directory or if the name ends with '/'. Output directories are created if
  1285. necessary. Existing files will not be overwritten. Combining the
  1286. <strong>-overwrite_original</strong> option with <strong>-o</strong> causes the original source file to
  1287. be erased after the output file is successfully written.</p>
  1288. <p>A special feature of this option allows the creation of certain types of
  1289. files from scratch, or with the metadata from another type of file. The
  1290. following file types may be created using this technique:</p>
  1291. <pre>
  1292. XMP, ICC/ICM, MIE, VRD, DR4, EXIF, EXV</pre>
  1293. <p>The output file type is determined by the extension of <em>OUTFILE</em> (specified
  1294. as <a href="#ext"><code>-.EXT</code></a> when writing to stdout). The output file is then created from a
  1295. combination of information in <em>FILE</em> (as if the <strong>-tagsFromFile</strong> option was
  1296. used), and tag values assigned on the command line. If no <em>FILE</em> is
  1297. specified, the output file may be created from scratch using only tags
  1298. assigned on the command line.</p>
  1299. </dd>
  1300. <dt><strong><a name="overwrite_original" class="item"><strong>-overwrite_original</strong></a></strong></dt>
  1301. <dd>
  1302. <p>Overwrite the original <em>FILE</em> (instead of preserving it by adding
  1303. <code>_original</code> to the file name) when writing information to an image.
  1304. Caution: This option should only be used if you already have separate backup
  1305. copies of your image files. The overwrite is implemented by renaming a
  1306. temporary file to replace the original. This deletes the original file and
  1307. replaces it with the edited version in a single operation. When combined
  1308. with <strong>-o</strong>, this option causes the original file to be deleted if the output
  1309. file was successfully written (ie. the file is moved instead of copied).</p>
  1310. </dd>
  1311. <dt><strong><a name="overwrite_original_in_place" class="item"><strong>-overwrite_original_in_place</strong></a></strong></dt>
  1312. <dd>
  1313. <p>Similar to <strong>-overwrite_original</strong> except that an extra step is added to
  1314. allow the original file attributes to be preserved. For example, on a Mac
  1315. this causes the original file creation date, type, creator, label color,
  1316. icon, Finder tags and hard links to the file to be preserved (but note that
  1317. the Mac OS resource fork is always preserved unless specifically deleted
  1318. with <code>-rsrc:all=</code>). This is implemented by opening the original file in
  1319. update mode and replacing its data with a copy of a temporary file before
  1320. deleting the temporary. The extra step results in slower performance, so
  1321. the <strong>-overwrite_original</strong> option should be used instead unless necessary.</p>
  1322. </dd>
  1323. <dt><strong><a name="p" class="item"><strong>-P</strong> (<strong>-preserve</strong>)</a></strong></dt>
  1324. <dd>
  1325. <p>Preserve the filesystem modification date/time of the original file
  1326. (<code>FileModifyDate</code>) when writing. Note that some filesystems store a
  1327. creation date (<code>FileCreateDate</code>) which is not affected by this option.
  1328. This creation date is preserved only on Windows systems where Win32API::File
  1329. and Win32::API are available. For other systems, the
  1330. <strong>-overwrite_original_in_place</strong> option may be used if necessary to preserve
  1331. the creation date. This option is superseded by writing FileModifyDate (and
  1332. FileCreateDate) manually.</p>
  1333. </dd>
  1334. <dt><strong><a name="password_passwd" class="item"><strong>-password</strong> <em>PASSWD</em></a></strong></dt>
  1335. <dd>
  1336. <p>Specify password to allow processing of password-protected PDF documents.
  1337. If a password is required but not given, a warning is issued and the
  1338. document is not processed. Ignored if a password is not required.</p>
  1339. </dd>
  1340. <dt><strong><a name="progress" class="item"><strong>-progress</strong></a></strong></dt>
  1341. <dd>
  1342. <p>Show file progress count in messages. The progress count appears in
  1343. brackets after the name of each processed file, and gives the current file
  1344. number and the total number of files to be processed. Implies the <strong>-v0</strong>
  1345. option, which prints the name of each processed file when writing. When
  1346. combined with the <strong>-if</strong> option, the total count includes all files before
  1347. the condition is applied, but files that fail the condition will not have
  1348. their names printed.</p>
  1349. </dd>
  1350. <dt><strong><a name="q" class="item"><strong>-q</strong> (<strong>-quiet</strong>)</a></strong></dt>
  1351. <dd>
  1352. <p>Quiet processing. One <strong>-q</strong> suppresses normal informational messages, and a
  1353. second <strong>-q</strong> suppresses warnings as well. Error messages can not be
  1354. suppressed, although minor errors may be downgraded to warnings with the
  1355. <strong>-m</strong> option, which may then be suppressed with <code>-q -q</code>.</p>
  1356. </dd>
  1357. <dt><strong><a name="r_recurse" class="item"><strong>-r</strong>[.] (<strong>-recurse</strong>)</a></strong></dt>
  1358. <dd>
  1359. <p>Recursively process files in subdirectories. Only meaningful if <em>FILE</em> is
  1360. a directory name. Subdirectories with names beginning with &quot;.&quot; are not
  1361. processed unless &quot;.&quot; is added to the option name (ie. <strong>-r.</strong> or
  1362. <strong>-recurse.</strong>). By default, exiftool will also follow symbolic links to
  1363. directories if supported by the system, but this may be disabled with <code>-i
  1364. SYMLINKS</code> (see the <strong>-i</strong> option for details).</p>
  1365. </dd>
  1366. <dt><strong><a name="scanforxmp" class="item"><strong>-scanForXMP</strong></a></strong></dt>
  1367. <dd>
  1368. <p>Scan all files (even unsupported formats) for XMP information unless found
  1369. already. When combined with the <strong>-fast</strong> option, only unsupported file
  1370. types are scanned. Warning: It can be time consuming to scan large files.</p>
  1371. </dd>
  1372. <dt><strong><a name="u" class="item"><strong>-u</strong> (<strong>-unknown</strong>)</a></strong></dt>
  1373. <dd>
  1374. <p>Extract values of unknown tags. Add another <strong>-u</strong> to also extract unknown
  1375. information from binary data blocks. This option applies to tags with
  1376. numerical tag ID's, and causes tag names like &quot;Exif_0xc5d9&quot; to be generated
  1377. for unknown information. It has no effect on information types which have
  1378. human-readable tag ID's (such as XMP), since unknown tags are extracted
  1379. automatically from these formats.</p>
  1380. </dd>
  1381. <dt><strong><a name="u" class="item"><strong>-U</strong> (<strong>-unknown2</strong>)</a></strong></dt>
  1382. <dd>
  1383. <p>Extract values of unknown tags as well as unknown information from some
  1384. binary data blocks. This is the same as two <strong>-u</strong> options.</p>
  1385. </dd>
  1386. <dt><strong><a name="mode" class="item"><strong>-wm</strong> <em>MODE</em> (<strong>-writeMode</strong>)</a></strong></dt>
  1387. <dd>
  1388. <p>Set mode for writing/creating tags. <em>MODE</em> is a string of one or more
  1389. characters from the list below. Write mode is <code>wcg</code> unless otherwise
  1390. specified.</p>
  1391. <pre>
  1392. w - Write existing tags
  1393. c - Create new tags
  1394. g - create new Groups as necessary</pre>
  1395. <p>For example, use <code>-wm cg</code> to only create new tags (and avoid editing
  1396. existing ones).</p>
  1397. <p>The level of the group is the SubDirectory level in the metadata structure.
  1398. For XMP or IPTC this is the full XMP/IPTC block (the family 0 group), but
  1399. for EXIF this is the individual IFD (the family 1 group).</p>
  1400. </dd>
  1401. <dt><strong><a name="z" class="item"><strong>-z</strong> (<strong>-zip</strong>)</a></strong></dt>
  1402. <dd>
  1403. <p>When reading, causes information to be extracted from .gz and .bz2
  1404. compressed images. (Only one image per archive. Requires gzip and bzip2 to
  1405. be installed on the system.) When writing, causes compressed information to
  1406. be written if supported by the metadata format. (eg. PNG supports
  1407. compressed textual metadata.) This option also disables the recommended
  1408. padding in embedded XMP, saving 2424 bytes when writing XMP in a file.</p>
  1409. </dd>
  1410. </dl>
  1411. <p>
  1412. </p>
  1413. <h3><a name="other_options">Other options</a></h3>
  1414. <dl>
  1415. <dt><strong><a name="argfile" class="item"><strong>-@</strong> <em>ARGFILE</em></a></strong></dt>
  1416. <dd>
  1417. <p>Read command-line arguments from the specified file. The file contains one
  1418. argument per line (NOT one option per line -- some options require
  1419. additional arguments, and all arguments must be placed on separate lines).
  1420. Blank lines and lines beginning with <code>#</code> and are ignored. Normal shell
  1421. processing of arguments is not performed, which among other things means
  1422. that arguments should not be quoted and spaces are treated as any other
  1423. character. <em>ARGFILE</em> may exist relative to either the current directory or
  1424. the exiftool directory unless an absolute pathname is given.</p>
  1425. <p>For example, the following <em>ARGFILE</em> will set the value of Copyright to
  1426. &quot;Copyright YYYY, Phil Harvey&quot;, where &quot;YYYY&quot; is the year of CreateDate:</p>
  1427. <pre>
  1428. -d
  1429. %Y
  1430. -copyright&lt;Copyright $createdate, Phil Harvey</pre>
  1431. </dd>
  1432. <dt><strong><a name="k" class="item"><strong>-k</strong> (<strong>-pause</strong>)</a></strong></dt>
  1433. <dd>
  1434. <p>Pause with the message <code>-- press any key --</code> or <code>-- press RETURN --</code>
  1435. (depending on your system) before terminating. This option is used to
  1436. prevent the command window from closing when run as a Windows drag and drop
  1437. application.</p>
  1438. </dd>
  1439. <dt><strong><a name="list_listw_listf_listr_listwf_listg_num_listd_listx" class="item"><strong>-list</strong>, <strong>-listw</strong>, <strong>-listf</strong>, <strong>-listr</strong>, <strong>-listwf</strong>,
  1440. <strong>-listg</strong>[<em>NUM</em>], <strong>-listd</strong>, <strong>-listx</strong></a></strong></dt>
  1441. <dd>
  1442. <p>Print a list of all valid tag names (<strong>-list</strong>), all writable tag names
  1443. (<strong>-listw</strong>), all supported file extensions (<strong>-listf</strong>), all recognized file
  1444. extensions (<strong>-listr</strong>), all writable file extensions (<strong>-listwf</strong>), all tag
  1445. groups [in a specified family] (<strong>-listg</strong>[<em>NUM</em>]), all deletable tag groups
  1446. (<strong>-listd</strong>), or an XML database of tag details including language
  1447. translations (<strong>-listx</strong>). The <strong>-list</strong>, <strong>-listw</strong> and <strong>-listx</strong> options may
  1448. be followed by an additional argument of the form <code>-GROUP:All</code> to list only
  1449. tags in a specific group, where <code>GROUP</code> is one or more family 0-2 group
  1450. names (excepting EXIF IFD groups) separated by colons. With <strong>-listg</strong>,
  1451. <em>NUM</em> may be given to specify the group family, otherwise family 0 is
  1452. assumed. The <strong>-l</strong> option may be combined with <strong>-listf</strong>, <strong>-listr</strong> or
  1453. <strong>-listwf</strong> to add file descriptions to the list. The <strong>-lang</strong> option may be
  1454. combined with <strong>-listx</strong> to output descriptions in a single language. Here
  1455. are some examples:</p>
  1456. <pre>
  1457. -list # list all tag names
  1458. -list -EXIF:All # list all EXIF tags
  1459. -list -xmp:time:all # list all XMP tags relating to time
  1460. -listw -XMP-dc:All # list all writable XMP-dc tags
  1461. -listf # list all supported file extensions
  1462. -listr # list all recognized file extensions
  1463. -listwf # list all writable file extensions
  1464. -listg1 # list all groups in family 1
  1465. -listd # list all deletable groups
  1466. -listx -EXIF:All # list database of EXIF tags in XML format
  1467. -listx -XMP:All -s # list short XML database of XMP tags</pre>
  1468. <p>When combined with <strong>-listx</strong>, the <strong>-s</strong> option shortens the output by
  1469. omitting the descriptions and values (as in the last example above), and
  1470. <strong>-f</strong> adds a 'flags' attribute if applicable. The flags are formatted as a
  1471. comma-separated list of the following possible values: Avoid, Binary, List,
  1472. Mandatory, Permanent, Protected, Unknown and Unsafe (see the <a href="TagNames/index.html">Tag Name documentation</a>). For XMP List tags, the list type
  1473. (Alt, Bag or Seq) is added to the flags, and flattened structure tags are
  1474. indicated by a Flattened flag.</p>
  1475. <p>Note that none of the <strong>-list</strong> options require an input <em>FILE</em>.</p>
  1476. </dd>
  1477. <dt><strong><a name="ver" class="item"><strong>-ver</strong></a></strong></dt>
  1478. <dd>
  1479. <p>Print exiftool version number.</p>
  1480. </dd>
  1481. </dl>
  1482. <p>
  1483. </p>
  1484. <h3><a name="special_features">Special features</a></h3>
  1485. <dl>
  1486. <dt><strong><a name="geotag_trkfile" class="item"><strong>-geotag</strong> <em>TRKFILE</em></a></strong></dt>
  1487. <dd>
  1488. <p>Geotag images from the specified GPS track log file. Using the <strong>-geotag</strong>
  1489. option is equivalent to writing a value to the <code>Geotag</code> tag. After the
  1490. <strong>-geotag</strong> option has been specified, the value of the <code>Geotime</code> tag is
  1491. written to define a date/time for the position interpolation. If <code>Geotime</code>
  1492. is not specified, the value is copied from <code>DateTimeOriginal</code>. For
  1493. example, the following two commands are equivalent:</p>
  1494. <pre>
  1495. exiftool -geotag track.log image.jpg
  1496. exiftool -geotag &quot;-Geotime&lt;DateTimeOriginal&quot; image.jpg</pre>
  1497. <p>When the <code>Geotime</code> value is converted to UTC, the local system timezone is
  1498. assumed unless the date/time value contains a timezone. Writing <code>Geotime</code>
  1499. causes the following tags to be written (provided they can be calculated
  1500. from the track log, and they are supported by the destination metadata
  1501. format): GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef,
  1502. GPSAltitude, GPSAltitudeRef, GPSDateStamp, GPSTimeStamp, GPSDateTime,
  1503. GPSTrack, GPSTrackRef, GPSSpeed, GPSSpeedRef, GPSImgDirection,
  1504. GPSImgDirectionRef, GPSPitch and GPSRoll. By default, tags are created in
  1505. EXIF, and updated in XMP only if they already exist. However,
  1506. <code>EXIF:Geotime</code> or <code>XMP:Geotime</code> may be specified to write only EXIF or XMP
  1507. tags respectively. Note that GPSPitch and GPSRoll are non-standard, and
  1508. require user-defined tags in order to be written.</p>
  1509. <p>The <code>Geosync</code> tag may be used to specify a time correction which is applied
  1510. to each <code>Geotime</code> value for synchronization with GPS time. For example,
  1511. the following command compensates for image times which are 1 minute and 20
  1512. seconds behind GPS:</p>
  1513. <pre>
  1514. exiftool -geosync=+1:20 -geotag a.log DIR</pre>
  1515. <p><code>Geosync</code> must be set before <code>Geotime</code> (if specified) to be effective.
  1516. Advanced <code>Geosync</code> features allow a linear time drift correction and
  1517. synchronization from previously geotagged images. See &quot;geotag.html&quot; in the
  1518. full ExifTool distribution for more information.</p>
  1519. <p>Multiple <strong>-geotag</strong> options may be used to concatinate GPS track log data.
  1520. Also, a single <strong>-geotag</strong> option may be used to load multiple track log
  1521. files by using wildcards in the <em>TRKFILE</em> name, but note that in this case
  1522. <em>TRKFILE</em> must be quoted on most systems (with the notable exception of
  1523. Windows) to prevent filename expansion. For example:</p>
  1524. <pre>
  1525. exiftool -geotag &quot;TRACKDIR/*.log&quot; IMAGEDIR</pre>
  1526. <p>Currently supported track file formats are GPX, NMEA RMC/GGA/GLL, KML, IGC,
  1527. Garmin XML and TCX, Magellan PMGNTRK, Honeywell PTNTHPR, Winplus Beacon
  1528. text, and Bramor gEO log files. See <a href="#geotagging_examples">GEOTAGGING EXAMPLES</a> for examples.
  1529. Also see &quot;geotag.html&quot; in the full ExifTool distribution and the
  1530. <a href="ExifTool.html#options">Image::ExifTool Options</a> for more details and for
  1531. information about geotag configuration options.</p>
  1532. </dd>
  1533. <dt><strong><a name="globaltimeshift_shift" class="item"><strong>-globalTimeShift</strong> <em>SHIFT</em></a></strong></dt>
  1534. <dd>
  1535. <p>Shift all formatted date/time values by the specified amount when reading.
  1536. Does not apply to unformatted (<strong>-n</strong>) output. <em>SHIFT</em> takes the same form
  1537. as the date/time shift when writing (see
  1538. <a href="Shift.html">Image::ExifTool::Shift.pl</a> for details), with a
  1539. negative shift being indicated with a minus sign (<code>-</code>) at the start of the
  1540. <em>SHIFT</em> string. For example:</p>
  1541. <pre>
  1542. # return all date/times, shifted back by 1 hour
  1543. exiftool -globalTimeShift -1 -time:all a.jpg</pre>
  1544. <pre>
  1545. # set the file name from the shifted CreateDate (-1 day) for
  1546. # all images in a directory
  1547. exiftool &quot;-filename&lt;createdate&quot; -globaltimeshift &quot;-0:0:1 0:0:0&quot; \
  1548. -d %Y%m%d-%H%M%S.%%e dir</pre>
  1549. </dd>
  1550. <dt><strong><a name="use_module" class="item"><strong>-use</strong> <em>MODULE</em></a></strong></dt>
  1551. <dd>
  1552. <p>Add features from specified plug-in <em>MODULE</em>. Currently, the MWG module is
  1553. the only plug-in module distributed with exiftool. This module adds
  1554. read/write support for tags as recommended by the Metadata Working Group.
  1555. To save typing, <code>-use MWG</code> is assumed if the <code>MWG</code> group is specified for
  1556. any tag on the command line. See the
  1557. <a href="TagNames/MWG.html">MWG Tags documentation</a> for more
  1558. details. Note that this option is not reversible, and remains in effect
  1559. until the application terminates, even across the <code>-execute</code> option.</p>
  1560. </dd>
  1561. </dl>
  1562. <p>
  1563. </p>
  1564. <h3><a name="utilities">Utilities</a></h3>
  1565. <dl>
  1566. <dt><strong><a name="restore_original" class="item"><strong>-restore_original</strong></a></strong></dt>
  1567. <dt><strong><a name="delete_original" class="item"><strong>-delete_original</strong>[!]</a></strong></dt>
  1568. <dd>
  1569. <p>These utility options automate the maintenance of the <code>_original</code> files
  1570. created by exiftool. They have no effect on files without an <code>_original</code>
  1571. copy. The <strong>-restore_original</strong> option restores the specified files from
  1572. their original copies by renaming the <code>_original</code> files to replace the
  1573. edited versions. For example, the following command restores the originals
  1574. of all JPG images in directory <a href="#dir"><code>DIR</code></a>:</p>
  1575. <pre>
  1576. exiftool -restore_original -ext jpg DIR</pre>
  1577. <p>The <strong>-delete_original</strong> option deletes the <code>_original</code> copies of all files
  1578. specified on the command line. Without a trailing <code>!</code> this option prompts
  1579. for confirmation before continuing. For example, the following command
  1580. deletes <code>a.jpg_original</code> if it exists, after asking &quot;Are you sure?&quot;:</p>
  1581. <pre>
  1582. exiftool -delete_original a.jpg</pre>
  1583. <p>These options may not be used with other options to read or write tag values
  1584. in the same command, but may be combined with options such <strong>-ext</strong>, <strong>-if</strong>,
  1585. <strong>-r</strong>, <strong>-q</strong> and <strong>-v</strong>.</p>
  1586. </dd>
  1587. </dl>
  1588. <p>
  1589. </p>
  1590. <h3><a name="advanced_options">Advanced options</a></h3>
  1591. <p>Among other things, the advanced options allow complex processing to be
  1592. performed from a single command without the need for additional scripting.
  1593. This may be particularly useful for implementations such as Windows
  1594. drag-and-drop applications. These options may also be used to improve
  1595. performance in multi-pass processing by reducing the overhead required to
  1596. load exiftool for each invocation.</p>
  1597. <dl>
  1598. <dt><strong><a name="api_opt_val" class="item"><strong>-api</strong> <em>OPT[=VAL]</em></a></strong></dt>
  1599. <dd>
  1600. <p>Set ExifTool API option. <em>OPT</em> is an API option name. The option value is
  1601. set to 1 if <em>=VAL</em> is omitted, or undef if just <em>VAL</em> is omitted. An
  1602. option may not be set to an empty string (&quot;&quot;) via the command line, but the
  1603. config file may be used to accomplish this if necessary. See
  1604. <a href="ExifTool.html#options">Image::ExifTool Options</a> for a list of available
  1605. API options. This overrides API options set via the config file.</p>
  1606. </dd>
  1607. <dt><strong><a name="common_args" class="item"><strong>-common_args</strong></a></strong></dt>
  1608. <dd>
  1609. <p>Specifies that all arguments following this option are common to all
  1610. executed commands when <strong>-execute</strong> is used. This and the <strong>-config</strong> option
  1611. are the only options that may not be used inside a <strong>-@</strong> <em>ARGFILE</em>. Note
  1612. that by definition this option and its arguments MUST come after all other
  1613. options on the command line.</p>
  1614. </dd>
  1615. <dt><strong><a name="config_cfgfile" class="item"><strong>-config</strong> <em>CFGFILE</em></a></strong></dt>
  1616. <dd>
  1617. <p>Load specified configuration file instead of the default &quot;.ExifTool_config&quot;.
  1618. If used, this option must come before all other arguments on the command
  1619. line. The <em>CFGFILE</em> name may contain a directory specification (otherwise
  1620. the file must exist in the current directory), or may be set to an empty
  1621. string (&quot;&quot;) to disable loading of the config file. See the sample
  1622. configuration file and &quot;config.html&quot; in the full ExifTool distribution for
  1623. more information about the ExifTool configuration file.</p>
  1624. </dd>
  1625. <dt><strong><a name="echo_num_text" class="item"><strong>-echo</strong>[<em>NUM</em>] <em>TEXT</em></a></strong></dt>
  1626. <dd>
  1627. <p>Echo text to stdout (<strong>-echo</strong> or <strong>-echo1</strong>) or stderr (<strong>-echo2</strong>). Text is
  1628. output as the command line is parsed, before the processing of any input
  1629. files. <em>NUM</em> may also be 3 or 4 to output text (to stdout or stderr
  1630. respectively) after processing is complete.</p>
  1631. </dd>
  1632. <dt><strong><a name="execute_num" class="item"><strong>-execute</strong>[<em>NUM</em>]</a></strong></dt>
  1633. <dd>
  1634. <p>Execute command for all arguments up to this point on the command line (plus
  1635. any arguments specified by <strong>-common_args</strong>). Allows multiple commands to be
  1636. executed from a single command line. <em>NUM</em> is an optional number that is
  1637. echoed in the &quot;{ready}&quot; message when using the <strong>-stay_open</strong> feature.</p>
  1638. </dd>
  1639. <dt><strong><a name="srcfile_fmt" class="item"><strong>-srcfile</strong> <em>FMT</em></a></strong></dt>
  1640. <dd>
  1641. <p>Specify a different source file to be processed based on the name of the
  1642. original <em>FILE</em>. This may be useful in some special situations for
  1643. processing related preview images or sidecar files. See the <strong>-w</strong> option
  1644. for a description of the <em>FMT</em> syntax. Note that file name <em>FMT</em> strings
  1645. for all options are based on the original <em>FILE</em> specified from the command
  1646. line, not the name of the source file specified by <strong>-srcfile</strong>.</p>
  1647. <p>For example, to copy metadata from NEF files to the corresponding JPG
  1648. previews in a directory where other JPG images may exist:</p>
  1649. <pre>
  1650. exiftool -ext nef -tagsfromfile @ -srcfile %d%f.jpg dir</pre>
  1651. <p>If than one <strong>-srcfile</strong> option is specified, the files are tested in order
  1652. and the first existing source file is processed. If none of the source
  1653. files already exist, then exiftool uses the first <strong>-srcfile</strong> specified.</p>
  1654. <p>A <em>FMT</em> of <code>@</code> may be used to represent the original <em>FILE</em>, which may be
  1655. useful when specifying multiple <strong>-srcfile</strong> options (eg. to fall back to
  1656. processing the original <em>FILE</em> if no sidecar exists).</p>
  1657. </dd>
  1658. <dt><strong><a name="stay_open_flag" class="item"><strong>-stay_open</strong> <em>FLAG</em></a></strong></dt>
  1659. <dd>
  1660. <p>If <em>FLAG</em> is <code>1</code> or <code>True</code>, causes exiftool keep reading from the <strong>-@</strong>
  1661. <em>ARGFILE</em> even after reaching the end of file. This feature allows calling
  1662. applications to pre-load exiftool, thus avoiding the overhead of loading
  1663. exiftool for each command. The procedure is as follows:</p>
  1664. <p>1) Execute <code>exiftool -stay_open True -@ ARGFILE</code>, where <em>ARGFILE</em> is the
  1665. name of an existing (possibly empty) argument file or <code>-</code> to pipe arguments
  1666. from the standard input.</p>
  1667. <p>2) Write exiftool command-line arguments to <em>ARGFILE</em>, one argument per
  1668. line (see the <strong>-@</strong> option for details).</p>
  1669. <p>3) Write <code>-execute\n</code> to <em>ARGFILE</em>, where <a href="#n"><code>\n</code></a> represents a newline
  1670. sequence. (Note: You may need to flush your write buffers here if using
  1671. buffered output.) Exiftool will then execute the command with the arguments
  1672. received up to this point, send a &quot;{ready}&quot; message to stdout when done
  1673. (unless the <strong>-q</strong> or <strong>-T</strong> option is used), and continue trying to read
  1674. arguments for the next command from <em>ARGFILE</em>. To aid in command/response
  1675. synchronization, any number appended to the <code>-execute</code> option is echoed in
  1676. the &quot;{ready}&quot; message. For example, <code>-execute613</code> results in &quot;{ready613}&quot;.</p>
  1677. <p>4) Repeat steps 2 and 3 for each command.</p>
  1678. <p>5) Write <code>-stay_open\nFalse\n</code> to <em>ARGFILE</em> when done. This will cause
  1679. exiftool to process any remaining command-line arguments then exit normally.</p>
  1680. <p>The input <em>ARGFILE</em> may be changed at any time before step 5 above by
  1681. writing the following lines to the currently open <em>ARGFILE</em>:</p>
  1682. <pre>
  1683. -stay_open
  1684. True
  1685. -@
  1686. NEWARGFILE</pre>
  1687. <p>This causes <em>ARGFILE</em> to be closed, and <em>NEWARGFILE</em> to be kept open.
  1688. (Without the <strong>-stay_open</strong> here, exiftool would have returned to reading
  1689. arguments from <em>ARGFILE</em> after reaching the end of <em>NEWARGFILE</em>.)</p>
  1690. <p>Note: When writing arguments to a disk file there is a delay of up to 0.01
  1691. seconds after writing <code>-execute\n</code> before exiftool starts processing the
  1692. command. This delay may be avoided by sending a CONT signal to the exiftool
  1693. process immediately after writing <code>-execute\n</code>. (There is no associated
  1694. delay when writing arguments via a pipe with <code>-@ -</code>, so the signal is not
  1695. necessary when using this technique.)</p>
  1696. </dd>
  1697. <dt><strong><a name="userparam_param_val" class="item"><strong>-userParam</strong> <em>PARAM[=VAL]</em></a></strong></dt>
  1698. <dd>
  1699. <p>Set user parameter. <em>PARAM</em> is an arbitrary user parameter name. This
  1700. is an interface to the API UserParam option (see the
  1701. <a href="ExifTool.html#options">Image::ExifTool Options</a> documentation), and
  1702. provides a method to access user-defined parameters from inside tag name
  1703. expressions (as if it were any other tag, see example below), and from
  1704. PrintConv/ValueConv logic (via the ExifTool Options function). Similar to
  1705. the <strong>-api</strong> option, the parameter value is set to 1 if <em>=VAL</em> is omitted,
  1706. or undef if just <em>VAL</em> is omitted.</p>
  1707. <pre>
  1708. exiftool -p '$test from $filename' -userparam test=Hello FILE</pre>
  1709. </dd>
  1710. </dl>
  1711. <p>
  1712. </p>
  1713. <hr />
  1714. <h1><a name="windows_unicode_file_names">WINDOWS UNICODE FILE NAMES</a></h1>
  1715. <p>In Windows, by default, file and directory names are specified on the
  1716. command line (or in arg files) using the system code page, which varies with
  1717. the system settings. Unfortunately, these code pages are not complete
  1718. character sets, so not all file names may be represented.</p>
  1719. <p>ExifTool 9.79 and later allow the file name encoding to be specified with
  1720. <code>-charset filename=CHARSET</code>, where <code>CHARSET</code> is the name of a valid
  1721. ExifTool character set, preferably <code>UTF8</code> (see the <strong>-charset</strong> option for a
  1722. complete list). Setting this triggers the use of Windows wide-character i/o
  1723. routines, thus providing support for all Unicode file names. But note that
  1724. it is not trivial to pass properly encoded file names on the Windows command
  1725. line (see <a href="http://owl.phy.queensu.ca/~phil/exiftool/faq.html#Q18">http://owl.phy.queensu.ca/~phil/exiftool/faq.html#Q18</a> for
  1726. details), so placing them in a UTF-8 encoded <strong>-@</strong> argfile is recommended if
  1727. possible.</p>
  1728. <p>When a directory name is provided, the file name encoding need not be
  1729. specified (unless the directory name contains special characters), and
  1730. ExifTool will automatically use wide-character routines to scan the
  1731. directory.</p>
  1732. <p>The filename character set applies to the <em>FILE</em> arguments as well as
  1733. filename arguments of <strong>-@</strong>, <strong>-geotag</strong>, <strong>-o</strong>, <strong>-p</strong>, <strong>-srcfile</strong>,
  1734. <strong>-tagsFromFile</strong>, <strong>-csv</strong>=, <strong>-j</strong>= and <strong>-</strong><em>TAG</em>&lt;=. However, it does
  1735. not apply to the <strong>-config</strong> filename, which always uses the system character
  1736. set. The <code>-charset filename=</code> option must come before the <strong>-@</strong> option to
  1737. be effective, but the order doesn't matter with respect to other options.</p>
  1738. <p>Notes:</p>
  1739. <p>1) FileName and Directory tag values still use the same encoding as other
  1740. tag values, and are converted to/from the filename character set when
  1741. writing/reading if specified.</p>
  1742. <p>2) Unicode support is not yet implemented for other Windows-based systems
  1743. like Cygwin.</p>
  1744. <p>3) See <a href="#writing_read_only_files">WRITING READ-ONLY FILES</a> below for a note about editing read-only
  1745. files with Unicode names.</p>
  1746. <p>
  1747. </p>
  1748. <hr />
  1749. <h1><a name="writing_read_only_files">WRITING READ-ONLY FILES</a></h1>
  1750. <p>In general, ExifTool may be used to write metadata to read-only files
  1751. provided that the user has write permission in the directory. However,
  1752. there are two cases where file write permission is also required:</p>
  1753. <p>1) When using the <strong>-overwrite_original_in_place</strong> option.</p>
  1754. <p>2) On Windows if the file has Unicode characters in its name, and a) the
  1755. <strong>-overwrite_original</strong> option is used, or b) the <code>_original</code> backup already
  1756. exists.</p>
  1757. <p>
  1758. </p>
  1759. <hr />
  1760. <h1><a name="reading_examples">READING EXAMPLES</a></h1>
  1761. <p><strong>Note</strong>: Beware when cutting and pasting these examples into your terminal!
  1762. Some characters such as single and double quotes and hyphens may have been
  1763. changed into similar-looking yet functionally-different characters by the
  1764. text formatter used to display this documentation. Also note that Windows
  1765. users must use double quotes instead of single quotes as below around
  1766. arguments containing special characters.</p>
  1767. <dl>
  1768. <dt><strong><a name="exiftool_a_u_g1_a_jpg" class="item">exiftool -a -u -g1 a.jpg</a></strong></dt>
  1769. <dd>
  1770. <p>Print all meta information in an image, including duplicate and unknown
  1771. tags, sorted by group (for family 1).</p>
  1772. </dd>
  1773. <dt><strong><a name="exiftool_common_dir" class="item">exiftool -common dir</a></strong></dt>
  1774. <dd>
  1775. <p>Print common meta information for all images in <code>dir</code>. <code>-common</code> is a
  1776. <a href="http://search.cpan.org/dist/Image-ExifTool/lib/Image/ExifTool/Shortcuts.pm">shortcut tag</a> representing common EXIF meta
  1777. information.</p>
  1778. </dd>
  1779. <dt><strong><a name="exiftool_t_createdate_aperture_shutterspeed_iso_dir_out_txt" class="item">exiftool -T -createdate -aperture -shutterspeed -iso dir &gt; out.txt</a></strong></dt>
  1780. <dd>
  1781. <p>List specified meta information in tab-delimited column form for all images
  1782. in <code>dir</code> to an output text file named &quot;out.txt&quot;.</p>
  1783. </dd>
  1784. <dt><strong><a name="exiftool_s_imagesize_exposuretime_b_jpg" class="item">exiftool -s -ImageSize -ExposureTime b.jpg</a></strong></dt>
  1785. <dd>
  1786. <p>Print ImageSize and ExposureTime tag names and values.</p>
  1787. </dd>
  1788. <dt><strong><a name="exiftool_l_canon_c_jpg_d_jpg" class="item">exiftool -l -canon c.jpg d.jpg</a></strong></dt>
  1789. <dd>
  1790. <p>Print standard Canon information from two image files.</p>
  1791. </dd>
  1792. <dt><strong><a name="exiftool_r_w_txt_common_pictures" class="item">exiftool -r -w .txt -common pictures</a></strong></dt>
  1793. <dd>
  1794. <p>Recursively extract common meta information from files in <code>pictures</code>
  1795. directory, writing text output to <code>.txt</code> files with the same names.</p>
  1796. </dd>
  1797. <dt><strong><a name="exiftool_b_thumbnailimage_image_jpg_thumbnail_jpg" class="item">exiftool -b -ThumbnailImage image.jpg &gt; thumbnail.jpg</a></strong></dt>
  1798. <dd>
  1799. <p>Save thumbnail image from <code>image.jpg</code> to a file called <code>thumbnail.jpg</code>.</p>
  1800. </dd>
  1801. <dt><strong><a name="exiftool_b_jpgfromraw_w_jfr_jpg_ext_nef_r" class="item">exiftool -b -JpgFromRaw -w _JFR.JPG -ext NEF -r .</a></strong></dt>
  1802. <dd>
  1803. <p>Recursively extract JPG image from all Nikon NEF files in the current
  1804. directory, adding <code>_JFR.JPG</code> for the name of the output JPG files.</p>
  1805. </dd>
  1806. <dt><strong><a name="exiftool_a_b_w_d_f_t_c_s_preview_all_dir" class="item">exiftool -a -b -W %d%f_%t%-c.%s -preview:all dir</a></strong></dt>
  1807. <dd>
  1808. <p>Extract all types of preview images (ThumbnailImage, PreviewImage,
  1809. JpgFromRaw, etc.) from files in directory &quot;dir&quot;, adding the tag name to the
  1810. output preview image file names.</p>
  1811. </dd>
  1812. <dt><strong><a name="exiftool_d_r_a_b_e_y_datetimeoriginal_s_s_ext_jpg" class="item">exiftool -d '%r %a, %B %e, %Y' -DateTimeOriginal -S -s -ext jpg .</a></strong></dt>
  1813. <dd>
  1814. <p>Print formatted date/time for all JPG files in the current directory.</p>
  1815. </dd>
  1816. <dt><strong><a name="exiftool_ifd1_xresolution_ifd1_yresolution_image_jpg" class="item">exiftool -IFD1:XResolution -IFD1:YResolution image.jpg</a></strong></dt>
  1817. <dd>
  1818. <p>Extract image resolution from EXIF IFD1 information (thumbnail image IFD).</p>
  1819. </dd>
  1820. <dt><strong><a name="exiftool_resolution_image_jpg" class="item">exiftool '-*resolution*' image.jpg</a></strong></dt>
  1821. <dd>
  1822. <p>Extract all tags with names containing the word &quot;Resolution&quot; from an image.</p>
  1823. </dd>
  1824. <dt><strong><a name="exiftool_xmp_author_all_a_image_jpg" class="item">exiftool -xmp:author:all -a image.jpg</a></strong></dt>
  1825. <dd>
  1826. <p>Extract all author-related XMP information from an image.</p>
  1827. </dd>
  1828. <dt><strong><a name="exiftool_xmp_b_a_jpg_out_xmp" class="item">exiftool -xmp -b a.jpg &gt; out.xmp</a></strong></dt>
  1829. <dd>
  1830. <p>Extract complete XMP data record intact from <code>a.jpg</code> and write it to
  1831. <code>out.xmp</code> using the special <code>XMP</code> tag (see the Extra tags in
  1832. <a href="TagNames/index.html">Image::ExifTool::TagNames</a>).</p>
  1833. </dd>
  1834. <dt><strong><a name="exiftool_p_filename_has_date_datetimeoriginal_q_f_dir" class="item">exiftool -p '$filename has date $dateTimeOriginal' -q -f dir</a></strong></dt>
  1835. <dd>
  1836. <p>Print one line of output containing the file name and DateTimeOriginal for
  1837. each image in directory <code>dir</code>.</p>
  1838. </dd>
  1839. <dt><strong><a name="exiftool_ee_p_gpslatitude_gpslongitude_gpstimestamp_a_m2ts" class="item">exiftool -ee -p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts</a></strong></dt>
  1840. <dd>
  1841. <p>Extract all GPS positions from an AVCHD video.</p>
  1842. </dd>
  1843. <dt><strong><a name="exiftool_icc_profile_b_w_icc_image_jpg" class="item">exiftool -icc_profile -b -w icc image.jpg</a></strong></dt>
  1844. <dd>
  1845. <p>Save complete ICC_Profile from an image to an output file with the same name
  1846. and an extension of <code>.icc</code>.</p>
  1847. </dd>
  1848. <dt><strong><a name="exiftool_htmldump_w_tmp_f_e_html_t_images" class="item">exiftool -htmldump -w tmp/%f_%e.html t/images</a></strong></dt>
  1849. <dd>
  1850. <p>Generate HTML pages from a hex dump of EXIF information in all images from
  1851. the <code>t/images</code> directory. The output HTML files are written to the <code>tmp</code>
  1852. directory (which is created if it didn't exist), with names of the form
  1853. 'FILENAME_EXT.html'.</p>
  1854. </dd>
  1855. <dt><strong><a name="exiftool_a_b_ee_embeddedimage_w_image_3g3_s_file_pdf" class="item">exiftool -a -b -ee -embeddedimage -W Image_%.3g3.%s file.pdf</a></strong></dt>
  1856. <dd>
  1857. <p>Extract embedded JPG and JP2 images from a PDF file. The output images will
  1858. have file names like &quot;Image_#.jpg&quot; or &quot;Image_#.jp2&quot;, where &quot;#&quot; is the
  1859. ExifTool family 3 embedded document number for the image.</p>
  1860. </dd>
  1861. </dl>
  1862. <p>
  1863. </p>
  1864. <hr />
  1865. <h1><a name="writing_examples">WRITING EXAMPLES</a></h1>
  1866. <p>Note that quotes are necessary around arguments which contain certain
  1867. special characters such as <code>&gt;</code>, <code>&lt;</code> or any white space. These
  1868. quoting techniques are shell dependent, but the examples below will work for
  1869. most Unix shells. With the Windows cmd shell however, double quotes should
  1870. be used (eg. -Comment=&#34;This is a new comment&#34;).</p>
  1871. <dl>
  1872. <dt><strong><a name="exiftool_comment_this_is_a_new_comment_dst_jpg" class="item">exiftool -Comment='This is a new comment' dst.jpg</a></strong></dt>
  1873. <dd>
  1874. <p>Write new comment to a JPG image (replaces any existing comment).</p>
  1875. </dd>
  1876. <dt><strong><a name="exiftool_comment_o_newdir_ext_jpg" class="item">exiftool -comment= -o newdir -ext jpg .</a></strong></dt>
  1877. <dd>
  1878. <p>Remove comment from all JPG images in the current directory, writing the
  1879. modified images to a new directory.</p>
  1880. </dd>
  1881. <dt><strong><a name="exiftool_keywords_exif_keywords_editor_dst_jpg" class="item">exiftool -keywords=EXIF -keywords=editor dst.jpg</a></strong></dt>
  1882. <dd>
  1883. <p>Replace existing keyword list with two new keywords (<code>EXIF</code> and <code>editor</code>).</p>
  1884. </dd>
  1885. <dt><strong><a name="exiftool_keywords_word_o_newfile_jpg_src_jpg" class="item">exiftool -Keywords+=word -o newfile.jpg src.jpg</a></strong></dt>
  1886. <dd>
  1887. <p>Copy a source image to a new file, and add a keyword (<code>word</code>) to the
  1888. current list of keywords.</p>
  1889. </dd>
  1890. <dt><strong><a name="exiftool_exposurecompensation_0_5_a_jpg" class="item">exiftool -exposurecompensation+=-0.5 a.jpg</a></strong></dt>
  1891. <dd>
  1892. <p>Decrement the value of ExposureCompensation by 0.5 EV. Note that += with a
  1893. negative value is used for decrementing because the -= operator is used for
  1894. conditional deletion (see next example).</p>
  1895. </dd>
  1896. <dt><strong><a name="exiftool_credit_xxx_dir" class="item">exiftool -credit-=xxx dir</a></strong></dt>
  1897. <dd>
  1898. <p>Delete Credit information from all files in a directory where the Credit
  1899. value was <code>xxx</code>.</p>
  1900. </dd>
  1901. <dt><strong><a name="exiftool_xmp_description_de_k_uuml_hl_e_dst_jpg" class="item">exiftool -xmp:description-de='k&amp;uuml;hl' -E dst.jpg</a></strong></dt>
  1902. <dd>
  1903. <p>Write alternate language for XMP:Description, using HTML character escaping
  1904. to input special characters.</p>
  1905. </dd>
  1906. <dt><strong><a name="exiftool_all_dst_jpg" class="item">exiftool -all= dst.jpg</a></strong></dt>
  1907. <dd>
  1908. <p>Delete all meta information from an image. Note: You should NOT do this to
  1909. RAW images (except DNG) since proprietary RAW image formats often contain
  1910. information in the makernotes that is necessary for converting the image.</p>
  1911. </dd>
  1912. <dt><strong><a name="exiftool_all_comment_lonely_dst_jpg" class="item">exiftool -all= -comment='lonely' dst.jpg</a></strong></dt>
  1913. <dd>
  1914. <p>Delete all meta information from an image and add a comment back in. (Note
  1915. that the order is important: <code>-comment='lonely' -all=</code> would also delete
  1916. the new comment.)</p>
  1917. </dd>
  1918. <dt><strong><a name="exiftool_all_jfif_all_dst_jpg" class="item">exiftool -all= --jfif:all dst.jpg</a></strong></dt>
  1919. <dd>
  1920. <p>Delete all meta information except JFIF group from an image.</p>
  1921. </dd>
  1922. <dt><strong><a name="exiftool_photoshop_all_dst_jpg" class="item">exiftool -Photoshop:All= dst.jpg</a></strong></dt>
  1923. <dd>
  1924. <p>Delete Photoshop meta information from an image (note that the Photoshop
  1925. information also includes IPTC).</p>
  1926. </dd>
  1927. <dt><strong><a name="exiftool_r_xmp_crss_all_dir" class="item">exiftool -r -XMP-crss:all= DIR</a></strong></dt>
  1928. <dd>
  1929. <p>Recursively delete all XMP-crss information from images in a directory.</p>
  1930. </dd>
  1931. <dt><strong><a name="exiftool_thumbnailimage_thumb_jpg_dst_jpg" class="item">exiftool '-ThumbnailImage&lt;=thumb.jpg' dst.jpg</a></strong></dt>
  1932. <dd>
  1933. <p>Set the thumbnail image from specified file (Note: The quotes are necessary
  1934. to prevent shell redirection).</p>
  1935. </dd>
  1936. <dt><strong><a name="exiftool_jpgfromraw_d_f_jfr_jpg_ext_nef_r" class="item">exiftool '-JpgFromRaw&lt;=%d%f_JFR.JPG' -ext NEF -r .</a></strong></dt>
  1937. <dd>
  1938. <p>Recursively write JPEG images with filenames ending in <code>_JFR.JPG</code> to the
  1939. JpgFromRaw tag of like-named files with extension <code>.NEF</code> in the current
  1940. directory. (This is the inverse of the <code>-JpgFromRaw</code> command of the
  1941. <a href="#reading_examples">READING EXAMPLES</a> section above.)</p>
  1942. </dd>
  1943. <dt><strong><a name="exiftool_datetimeoriginal_0_0_0_1_30_0_dir" class="item">exiftool -DateTimeOriginal-='0:0:0 1:30:0' dir</a></strong></dt>
  1944. <dd>
  1945. <p>Adjust original date/time of all images in directory <code>dir</code> by subtracting
  1946. one hour and 30 minutes. (This is equivalent to <code>-DateTimeOriginal-=1.5</code>.
  1947. See <a href="Shift.html">Image::ExifTool::Shift.pl</a> for details.)</p>
  1948. </dd>
  1949. <dt><strong><a name="exiftool_createdate_3_modifydate_3_a_jpg_b_jpg" class="item">exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg</a></strong></dt>
  1950. <dd>
  1951. <p>Add 3 hours to the CreateDate and ModifyDate timestamps of two images.</p>
  1952. </dd>
  1953. <dt><strong><a name="exiftool_alldates_1_30_if_make_eq_canon_dir" class="item">exiftool -AllDates+=1:30 -if '$make eq &#34;Canon&#34;' dir</a></strong></dt>
  1954. <dd>
  1955. <p>Shift the values of DateTimeOriginal, CreateDate and ModifyDate forward by 1
  1956. hour and 30 minutes for all Canon images in a directory. (The AllDates tag
  1957. is provided as a shortcut for these three tags, allowing them to be accessed
  1958. via a single tag.)</p>
  1959. </dd>
  1960. <dt><strong><a name="exiftool_xmp_city_kingston_image1_jpg_image2_nef" class="item">exiftool -xmp:city=Kingston image1.jpg image2.nef</a></strong></dt>
  1961. <dd>
  1962. <p>Write a tag to the XMP group of two images. (Without the <code>xmp:</code> this tag
  1963. would get written to the IPTC group since <code>City</code> exists in both, and IPTC
  1964. is preferred by default.)</p>
  1965. </dd>
  1966. <dt><strong><a name="unknown" class="item">exiftool -LightSource-='Unknown (0)' dst.tiff</a></strong></dt>
  1967. <dd>
  1968. <p>Delete <code>LightSource</code> tag only if it is unknown with a value of 0.</p>
  1969. </dd>
  1970. <dt><strong><a name="exiftool_whitebalance_auto_whitebalance_tung_dst_jpg" class="item">exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg</a></strong></dt>
  1971. <dd>
  1972. <p>Set <code>WhiteBalance</code> to <code>Tungsten</code> only if it was previously <code>Auto</code>.</p>
  1973. </dd>
  1974. <dt><strong><a name="exiftool_comment_comment_new_comment_a_jpg" class="item">exiftool -comment-= -comment='new comment' a.jpg</a></strong></dt>
  1975. <dd>
  1976. <p>Write a new comment only if the image doesn't have one already.</p>
  1977. </dd>
  1978. <dt><strong><a name="exiftool_o_d_f_xmp_dir" class="item">exiftool -o %d%f.xmp dir</a></strong></dt>
  1979. <dd>
  1980. <p>Create XMP meta information data files for all images in <code>dir</code>.</p>
  1981. </dd>
  1982. <dt><strong><a name="exiftool_o_test_xmp_owner_phil_title_xmp_file" class="item">exiftool -o test.xmp -owner=Phil -title='XMP File'</a></strong></dt>
  1983. <dd>
  1984. <p>Create an XMP data file only from tags defined on the command line.</p>
  1985. </dd>
  1986. <dt><strong><a name="exiftool_icc_profile_d_f_icc_image_jpg" class="item">exiftool '-ICC_Profile&lt;=%d%f.icc' image.jpg</a></strong></dt>
  1987. <dd>
  1988. <p>Write ICC_Profile to an image from a <code>.icc</code> file of the same name.</p>
  1989. </dd>
  1990. <dt><strong><a name="exiftool_hierarchicalkeywords_keyword_one_children_keyword_b" class="item">exiftool -hierarchicalkeywords='{keyword=one,children={keyword=B}}'</a></strong></dt>
  1991. <dd>
  1992. <p>Write structured XMP information. See
  1993. <a href="http://owl.phy.queensu.ca/~phil/exiftool/struct.html">http://owl.phy.queensu.ca/~phil/exiftool/struct.html</a> for more details.</p>
  1994. </dd>
  1995. <dt><strong><a name="exiftool_trailer_all_image_jpg" class="item">exiftool -trailer:all= image.jpg</a></strong></dt>
  1996. <dd>
  1997. <p>Delete any trailer found after the end of image (EOI) in a JPEG file. A
  1998. number of digital cameras store a large PreviewImage after the JPEG EOI, and
  1999. the file size may be reduced significantly by deleting this trailer. See
  2000. the <a href="TagNames/JPEG.html">JPEG Tags documentation</a> for a
  2001. list of recognized JPEG trailers.</p>
  2002. </dd>
  2003. </dl>
  2004. <p>
  2005. </p>
  2006. <hr />
  2007. <h1><a name="copying_examples">COPYING EXAMPLES</a></h1>
  2008. <p>These examples demonstrate the ability to copy tag values between files.</p>
  2009. <dl>
  2010. <dt><strong><a name="exiftool_tagsfromfile_src_cr2_dst_jpg" class="item">exiftool -tagsFromFile src.cr2 dst.jpg</a></strong></dt>
  2011. <dd>
  2012. <p>Copy the values of all writable tags from <code>src.cr2</code> to <code>dst.jpg</code>, writing
  2013. the information to same-named tags in the preferred groups.</p>
  2014. </dd>
  2015. <dt><strong><a name="exiftool_tagsfromfile_src_jpg_all_all_dst_jpg" class="item">exiftool -TagsFromFile src.jpg -all:all dst.jpg</a></strong></dt>
  2016. <dd>
  2017. <p>Copy the values of all writable tags from <code>src.jpg</code> to <code>dst.jpg</code>,
  2018. preserving the original tag groups.</p>
  2019. </dd>
  2020. <dt><strong><a name="exiftool_all_tagsfromfile_src_jpg_exif_all_dst_jpg" class="item">exiftool -all= -tagsfromfile src.jpg -exif:all dst.jpg</a></strong></dt>
  2021. <dd>
  2022. <p>Erase all meta information from <code>dst.jpg</code> image, then copy EXIF tags from
  2023. <code>src.jpg</code>.</p>
  2024. </dd>
  2025. <dt><strong><a name="exiftool_exif_all_tagsfromfile_all_all_unsafe_bad_jpg" class="item">exiftool -exif:all= -tagsfromfile @ -all:all -unsafe bad.jpg</a></strong></dt>
  2026. <dd>
  2027. <p>Rebuild all EXIF meta information from scratch in an image. This technique
  2028. can be used in JPEG images to repair corrupted EXIF information which
  2029. otherwise could not be written due to errors. The <code>Unsafe</code> tag is a
  2030. shortcut for unsafe EXIF tags in JPEG images which are not normally copied.
  2031. See the <a href="TagNames/index.html">tag name documentation</a> for more details
  2032. about unsafe tags.</p>
  2033. </dd>
  2034. <dt><strong><a name="exiftool_tagsfromfile_a_jpg_out_xmp" class="item">exiftool -Tagsfromfile a.jpg out.xmp</a></strong></dt>
  2035. <dd>
  2036. <p>Copy meta information from <code>a.jpg</code> to an XMP data file. If the XMP data
  2037. file <code>out.xmp</code> already exists, it will be updated with the new information.
  2038. Otherwise the XMP data file will be created. Only XMP, ICC and MIE files
  2039. may be created like this (other file types may be edited but not created).
  2040. See <a href="#writing_examples">WRITING EXAMPLES</a> above for another technique to generate XMP files.</p>
  2041. </dd>
  2042. <dt><strong><a name="exiftool_tagsfromfile_a_jpg_xmp_all_thumbnailimage_m_b_jpg" class="item">exiftool -tagsFromFile a.jpg -XMP:All= -ThumbnailImage= -m b.jpg</a></strong></dt>
  2043. <dd>
  2044. <p>Copy all meta information from <code>a.jpg</code> to <code>b.jpg</code>, deleting all XMP
  2045. information and the thumbnail image from the destination.</p>
  2046. </dd>
  2047. <dt><strong><a name="exiftool_tagsfromfile_src_jpg_title_author_phil_dst_jpg" class="item">exiftool -TagsFromFile src.jpg -title -author=Phil dst.jpg</a></strong></dt>
  2048. <dd>
  2049. <p>Copy title from one image to another and set a new author name.</p>
  2050. </dd>
  2051. <dt><strong><a name="exiftool_tagsfromfile_a_jpg_iso_tagsfromfile_b_jpg_comment_dst_jpg" class="item">exiftool -TagsFromFile a.jpg -ISO -TagsFromFile b.jpg -comment
  2052. dst.jpg</a></strong></dt>
  2053. <dd>
  2054. <p>Copy ISO from one image and Comment from another image to a destination
  2055. image.</p>
  2056. </dd>
  2057. <dt><strong><a name="exiftool_tagsfromfile_src_jpg_exif_all_subifd_all_dst_jpg" class="item">exiftool -tagsfromfile src.jpg -exif:all --subifd:all dst.jpg</a></strong></dt>
  2058. <dd>
  2059. <p>Copy only the EXIF information from one image to another, excluding SubIFD
  2060. tags.</p>
  2061. </dd>
  2062. <dt><strong><a name="exiftool_filemodifydate_datetimeoriginal_dir" class="item">exiftool '-FileModifyDate&lt;DateTimeOriginal' dir</a></strong></dt>
  2063. <dd>
  2064. <p>Use the original date from the meta information to set the same file's
  2065. filesystem modification date for all images in a directory. (Note that
  2066. <code>-TagsFromFile @</code> is assumed if no other <strong>-TagsFromFile</strong> is specified when
  2067. redirecting information as in this example.)</p>
  2068. </dd>
  2069. <dt><strong><a name="exiftool_tagsfromfile_src_jpg_xmp_all_all_dst_jpg" class="item">exiftool -TagsFromFile src.jpg '-xmp:all&lt;all' dst.jpg</a></strong></dt>
  2070. <dd>
  2071. <p>Copy all possible information from <code>src.jpg</code> and write in XMP format to
  2072. <code>dst.jpg</code>.</p>
  2073. </dd>
  2074. <dt><strong><a name="exiftool_iptc2xmp_args_iptc_all_a_jpg" class="item">exiftool -@ iptc2xmp.args -iptc:all= a.jpg</a></strong></dt>
  2075. <dd>
  2076. <p>Translate IPTC information to XMP with appropriate tag name conversions, and
  2077. delete the original IPTC information from an image. This example uses
  2078. iptc2xmp.args, which is a file included with the ExifTool distribution that
  2079. contains the required arguments to convert IPTC information to XMP format.
  2080. Also included with the distribution are xmp2iptc.args (which performs the
  2081. inverse conversion) and a few more .args files for other conversions between
  2082. EXIF, IPTC and XMP.</p>
  2083. </dd>
  2084. <dt><strong><a name="exiftool_tagsfromfile_d_f_cr2_r_ext_jpg_dir" class="item">exiftool -tagsfromfile %d%f.CR2 -r -ext JPG dir</a></strong></dt>
  2085. <dd>
  2086. <p>Recursively rewrite all <code>JPG</code> images in <code>dir</code> with information copied from
  2087. the corresponding <code>CR2</code> images in the same directories.</p>
  2088. </dd>
  2089. <dt><strong><a name="exiftool_keywords_make_image_jpg" class="item">exiftool '-keywords+&lt;make' image.jpg</a></strong></dt>
  2090. <dd>
  2091. <p>Add camera make to list of keywords.</p>
  2092. </dd>
  2093. <dt><strong><a name="exiftool_comment_iso_exif_iso_exposure_shutterspeed_dir" class="item">exiftool '-comment&lt;ISO=$exif:iso Exposure=${shutterspeed}' dir</a></strong></dt>
  2094. <dd>
  2095. <p>Set the Comment tag of all images in <code>dir</code> from the values of the EXIF:ISO
  2096. and ShutterSpeed tags. The resulting comment will be in the form &quot;ISO=100
  2097. Exposure=1/60&quot;.</p>
  2098. </dd>
  2099. <dt><strong><a name="exiftool_tagsfromfile_src_jpg_icc_profile_dst_jpg" class="item">exiftool -TagsFromFile src.jpg -icc_profile dst.jpg</a></strong></dt>
  2100. <dd>
  2101. <p>Copy ICC_Profile from one image to another.</p>
  2102. </dd>
  2103. <dt><strong><a name="exiftool_tagsfromfile_src_jpg_all_all_dst_mie" class="item">exiftool -TagsFromFile src.jpg -all:all dst.mie</a></strong></dt>
  2104. <dd>
  2105. <p>Copy all meta information in its original form from a JPEG image to a MIE
  2106. file. The MIE file will be created if it doesn't exist. This technique can
  2107. be used to store the metadata of an image so it can be inserted back into
  2108. the image (with the inverse command) later in a workflow.</p>
  2109. </dd>
  2110. <dt><strong><a name="exiftool_o_dst_mie_all_all_src_jpg" class="item">exiftool -o dst.mie -all:all src.jpg</a></strong></dt>
  2111. <dd>
  2112. <p>This command performs exactly the same task as the command above, except
  2113. that the <strong>-o</strong> option will not write to an output file that already exists.</p>
  2114. </dd>
  2115. <dt><strong><a name="exiftool_if_jpgfromraw_b_jpgfromraw_w_d_f_ue_jpg_execute_if_previewimage_b_previewimage_w_d_f_ue_jpg_execute_tagsfromfile_srcfile_d_f_ue_jpg_overwrite_original_common_args_ext_jpg_dir" class="item">exiftool -if '$jpgfromraw' -b -jpgfromraw -w %d%f_%ue.jpg -execute
  2116. -if '$previewimage' -b -previewimage -w %d%f_%ue.jpg -execute
  2117. -tagsfromfile @ -srcfile %d%f_%ue.jpg -overwrite_original
  2118. -common_args --ext jpg DIR</a></strong></dt>
  2119. <dd>
  2120. <p>[Advanced] Extract JpgFromRaw or PreviewImage from all but JPG files in DIR,
  2121. saving them with file names like <code>image_EXT.jpg</code>, then add all meta
  2122. information from the original files to the extracted images. Here, the
  2123. command line is broken into three sections (separated by <strong>-execute</strong>
  2124. options), and each is executed as if it were a separate command. The
  2125. <strong>-common_args</strong> option causes the <code>--ext jpg DIR</code> arguments to be applied
  2126. to all three commands, and the <strong>-srcfile</strong> option allows the extracted JPG
  2127. image to be the source file for the third command (whereas the RAW files are
  2128. the source files for the other two commands).</p>
  2129. </dd>
  2130. </dl>
  2131. <p>
  2132. </p>
  2133. <hr />
  2134. <h1><a name="renaming_examples">RENAMING EXAMPLES</a></h1>
  2135. <p>By writing the <code>FileName</code> and <code>Directory</code> tags, files are renamed and/or
  2136. moved to new directories. This can be particularly useful and powerful for
  2137. organizing files by date when combined with the <strong>-d</strong> option. New
  2138. directories are created as necessary, but existing files will not be
  2139. overwritten. The format codes %d, %f and %e may be used in the new file
  2140. name to represent the directory, name and extension of the original file,
  2141. and %c may be used to add a copy number if the file already exists (see the
  2142. <strong>-w</strong> option for details). Note that if used within a date format string,
  2143. an extra '%' must be added to pass these codes through the date/time parser.
  2144. (And further note that in a Windows batch file, all '%' characters must also
  2145. be escaped, so in this extreme case '%%%%f' is necessary to pass a simple
  2146. '%f' through the two levels of parsing.) See
  2147. <a href="http://owl.phy.queensu.ca/~phil/exiftool/filename.html">http://owl.phy.queensu.ca/~phil/exiftool/filename.html</a> for additional
  2148. documentation and examples.</p>
  2149. <dl>
  2150. <dt><strong><a name="exiftool_filename_new_jpg_dir_old_jpg" class="item">exiftool -filename=new.jpg dir/old.jpg</a></strong></dt>
  2151. <dd>
  2152. <p>Rename <code>old.jpg</code> to <code>new.jpg</code> in directory <code>dir</code>.</p>
  2153. </dd>
  2154. <dt><strong><a name="exiftool_directory_e_dir" class="item">exiftool -directory=%e dir</a></strong></dt>
  2155. <dd>
  2156. <p>Move all files from directory <code>dir</code> into directories named by the original
  2157. file extensions.</p>
  2158. </dd>
  2159. <dt><strong><a name="exiftool_directory_datetimeoriginal_d_y_m_d_dir" class="item">exiftool '-Directory&lt;DateTimeOriginal' -d %Y/%m/%d dir</a></strong></dt>
  2160. <dd>
  2161. <p>Move all files in <code>dir</code> into a directory hierarchy based on year, month and
  2162. day of <code>DateTimeOriginal</code>. eg) This command would move the file
  2163. <code>dir/image.jpg</code> with a <code>DateTimeOriginal</code> of <code>2005:10:12 16:05:56</code> to
  2164. <code>2005/10/12/image.jpg</code>.</p>
  2165. </dd>
  2166. <dt><strong><a name="exiftool_o_directory_datetimeoriginal_d_y_m_d_dir" class="item">exiftool -o . '-Directory&lt;DateTimeOriginal' -d %Y/%m/%d dir</a></strong></dt>
  2167. <dd>
  2168. <p>Same effect as above except files are copied instead of moved.</p>
  2169. </dd>
  2170. <dt><strong><a name="exiftool_filename_f_model_e_dir" class="item">exiftool '-filename&lt;%f_${model;}.%e' dir</a></strong></dt>
  2171. <dd>
  2172. <p>Rename all files in <code>dir</code> by adding the camera model name to the file name.
  2173. The semicolon after the tag name inside the braces causes characters which
  2174. are invalid in Windows file names to be deleted from the tag value (see the
  2175. <strong>-p</strong> option documentation for an explanation).</p>
  2176. </dd>
  2177. <dt><strong><a name="exiftool_filename_createdate_d_y_m_d_h_m_s_c_e_dir" class="item">exiftool '-FileName&lt;CreateDate' -d %Y%m%d_%H%M%S%%-c.%%e dir</a></strong></dt>
  2178. <dd>
  2179. <p>Rename all images in <code>dir</code> according to the <code>CreateDate</code> date and time,
  2180. adding a copy number with leading '-' if the file already exists (<code>%-c</code>),
  2181. and preserving the original file extension (<code>%e</code>). Note the extra '%'
  2182. necessary to escape the filename codes (<code>%c</code> and <code>%e</code>) in the date format
  2183. string.</p>
  2184. </dd>
  2185. <dt><strong><a name="exiftool_r_filename_createdate_d_y_m_d_h_m_f_e_dir" class="item">exiftool -r '-FileName&lt;CreateDate' -d %Y-%m-%d/%H%M_%%f.%%e dir</a></strong></dt>
  2186. <dd>
  2187. <p>Both the directory and the filename may be changed together via the
  2188. <code>FileName</code> tag if the new <code>FileName</code> contains a '/'. The example above
  2189. recursively renames all images in a directory by adding a <code>CreateDate</code>
  2190. timestamp to the start of the filename, then moves them into new directories
  2191. named by date.</p>
  2192. </dd>
  2193. <dt><strong><a name="exiftool_filename_createdate_filenumber_jpg_d_y_m_d_ext_jpg" class="item">exiftool '-FileName&lt;${CreateDate}_$filenumber.jpg' -d %Y%m%d -ext jpg .</a></strong></dt>
  2194. <dd>
  2195. <p>Set the filename of all JPG images in the current directory from the
  2196. CreateDate and FileNumber tags, in the form &quot;20060507_118-1861.jpg&quot;.</p>
  2197. </dd>
  2198. </dl>
  2199. <p>
  2200. </p>
  2201. <hr />
  2202. <h1><a name="geotagging_examples">GEOTAGGING EXAMPLES</a></h1>
  2203. <p>ExifTool implements geotagging via 3 special tags: Geotag (which for
  2204. convenience is also implemented as an exiftool option), Geosync and Geotime.
  2205. The examples below highlight some geotagging features. See
  2206. <a href="http://owl.phy.queensu.ca/~phil/exiftool/geotag.html">http://owl.phy.queensu.ca/~phil/exiftool/geotag.html</a> for additional
  2207. documentation.</p>
  2208. <dl>
  2209. <dt><strong><a name="exiftool_geotag_track_log_a_jpg" class="item">exiftool -geotag track.log a.jpg</a></strong></dt>
  2210. <dd>
  2211. <p>Geotag an image (<code>a.jpg</code>) from position information in a GPS track log
  2212. (<code>track.log</code>). Since the <code>Geotime</code> tag is not specified, the value of
  2213. DateTimeOriginal is used for geotagging. Local system time is assumed
  2214. unless DateTimeOriginal contains a timezone.</p>
  2215. </dd>
  2216. <dt><strong><a name="exiftool_geotag_t_log_geotime_2009_04_02_13_41_12_05_00_a_jpg" class="item">exiftool -geotag t.log -geotime='2009:04:02 13:41:12-05:00' a.jpg</a></strong></dt>
  2217. <dd>
  2218. <p>Geotag an image with the GPS position for a specific time. (Note that the
  2219. <code>Geotag</code> tag must be assigned before <code>Geotime</code> for the GPS data to be
  2220. available when <code>Geotime</code> is set.)</p>
  2221. </dd>
  2222. <dt><strong><a name="exiftool_geotag_log_gpx_xmp_geotime_createdate_dir" class="item">exiftool -geotag log.gpx '-xmp:geotime&lt;createdate' dir</a></strong></dt>
  2223. <dd>
  2224. <p>Geotag all images in directory <code>dir</code> with XMP tags instead of EXIF tags,
  2225. based on the image CreateDate. (In this case, the order of the arguments
  2226. doesn't matter because tags with values copied from other tags are always
  2227. set after constant values.)</p>
  2228. </dd>
  2229. <dt><strong><a name="exiftool_geotag_a_log_geosync_20_dir" class="item">exiftool -geotag a.log -geosync=-20 dir</a></strong></dt>
  2230. <dd>
  2231. <p>Geotag images in directory <code>dir</code>, accounting for image timestamps which
  2232. were 20 seconds ahead of GPS.</p>
  2233. </dd>
  2234. <dt><strong><a name="exiftool_geotag_a_log_geosync_1_jpg_geosync_2_jpg_dir" class="item">exiftool -geotag a.log -geosync=1.jpg -geosync=2.jpg dir</a></strong></dt>
  2235. <dd>
  2236. <p>Geotag images using time synchronization from two previously geotagged images
  2237. (1.jpg and 2.jpg), synchronizing the image and GPS times using a linear time
  2238. drift correction.</p>
  2239. </dd>
  2240. <dt><strong><a name="exiftool_geotag_a_log_geotime_createdate_01_00_dir" class="item">exiftool -geotag a.log '-geotime&lt;${createdate}+01:00' dir</a></strong></dt>
  2241. <dd>
  2242. <p>Geotag images in <code>dir</code> using CreateDate with the specified timezone. If
  2243. CreateDate already contained a timezone, then the timezone specified on the
  2244. command line is ignored.</p>
  2245. </dd>
  2246. <dt><strong><a name="exiftool_geotag_a_jpg" class="item">exiftool -geotag= a.jpg</a></strong></dt>
  2247. <dd>
  2248. <p>Delete GPS tags which may have been added by the geotag feature. Note that
  2249. this does not remove all GPS tags -- to do this instead use <code>-gps:all=</code>.</p>
  2250. </dd>
  2251. <dt><strong><a name="exiftool_xmp_geotag_a_jpg" class="item">exiftool -xmp:geotag= a.jpg</a></strong></dt>
  2252. <dd>
  2253. <p>Delete XMP GPS tags which were added by the geotag feature.</p>
  2254. </dd>
  2255. <dt><strong><a name="exiftool_xmp_geotag_track_log_a_jpg" class="item">exiftool -xmp:geotag=track.log a.jpg</a></strong></dt>
  2256. <dd>
  2257. <p>Geotag an image with XMP tags, using the time from DateTimeOriginal.</p>
  2258. </dd>
  2259. <dt><strong><a name="exiftool_geotag_a_log_geotag_b_log_r_dir" class="item">exiftool -geotag a.log -geotag b.log -r dir</a></strong></dt>
  2260. <dd>
  2261. <p>Combine multiple track logs and geotag an entire directory tree of images.</p>
  2262. </dd>
  2263. <dt><strong><a name="exiftool_geotag_tracks_log_r_dir" class="item">exiftool -geotag 'tracks/*.log' -r dir</a></strong></dt>
  2264. <dd>
  2265. <p>Read all track logs from the <code>tracks</code> directory.</p>
  2266. </dd>
  2267. <dt><strong><a name="exiftool_p_gpx_fmt_d_y_m_dt_h_m_sz_dir_out_gpx" class="item">exiftool -p gpx.fmt -d %Y-%m-%dT%H:%M:%SZ dir &gt; out.gpx</a></strong></dt>
  2268. <dd>
  2269. <p>Generate a GPX track log from all images in directory <code>dir</code>. This example
  2270. uses the <code>gpx.fmt</code> file included in the full ExifTool distribution package
  2271. and assumes that the images in <code>dir</code> have all been previously geotagged.</p>
  2272. </dd>
  2273. </dl>
  2274. <p>
  2275. </p>
  2276. <hr />
  2277. <h1><a name="piping_examples">PIPING EXAMPLES</a></h1>
  2278. <dl>
  2279. <dt><strong><a name="cat_a_jpg_exiftool" class="item">cat a.jpg | exiftool -</a></strong></dt>
  2280. <dd>
  2281. <p>Extract information from stdin.</p>
  2282. </dd>
  2283. <dt><strong><a name="exiftool_image_jpg_thumbnailimage_b_exiftool" class="item">exiftool image.jpg -thumbnailimage -b | exiftool -</a></strong></dt>
  2284. <dd>
  2285. <p>Extract information from an embedded thumbnail image.</p>
  2286. </dd>
  2287. <dt><strong><a name="cat_a_jpg_exiftool_iptc_keywords_fantastic_b_jpg" class="item">cat a.jpg | exiftool -iptc:keywords+=fantastic - &gt; b.jpg</a></strong></dt>
  2288. <dd>
  2289. <p>Add an IPTC keyword in a pipeline, saving output to a new file.</p>
  2290. </dd>
  2291. <dt><strong><a name="curl_s_http_a_domain_com_bigfile_jpg_exiftool_fast" class="item">curl -s <a href="http://a.domain.com/bigfile.jpg">http://a.domain.com/bigfile.jpg</a> | exiftool -fast -</a></strong></dt>
  2292. <dd>
  2293. <p>Extract information from an image over the internet using the cURL utility.
  2294. The <strong>-fast</strong> option prevents exiftool from scanning for trailer information,
  2295. so only the meta information header is transferred.</p>
  2296. </dd>
  2297. <dt><strong><a name="exiftool_a_jpg_thumbnailimage_b_exiftool_comment_wow_exiftool_a_jpg_thumbnailimage" class="item">exiftool a.jpg -thumbnailimage -b | exiftool -comment=wow - |
  2298. exiftool a.jpg -thumbnailimage'&lt;=-'</a></strong></dt>
  2299. <dd>
  2300. <p>Add a comment to an embedded thumbnail image. (Why anyone would want to do
  2301. this I don't know, but I've included this as an example to illustrate the
  2302. flexibility of ExifTool.)</p>
  2303. </dd>
  2304. </dl>
  2305. <p>
  2306. </p>
  2307. <hr />
  2308. <h1><a name="diagnostics">DIAGNOSTICS</a></h1>
  2309. <p>The exiftool application exits with a status of 0 on success, or 1 if an
  2310. error occurred or if all files failed the <strong>-if</strong> condition (for any of the
  2311. commands if <strong>-execute</strong> was used).</p>
  2312. <p>
  2313. </p>
  2314. <hr />
  2315. <h1><a name="author">AUTHOR</a></h1>
  2316. <p>Copyright 2003-2016, Phil Harvey</p>
  2317. <p>This is free software; you can redistribute it and/or modify it under the
  2318. same terms as Perl itself.</p>
  2319. <p>
  2320. </p>
  2321. <hr />
  2322. <h1><a name="see_also">SEE ALSO</a></h1>
  2323. <p><a href="ExifTool.html">Image::ExifTool(3pm)</a>,
  2324. <a href="TagNames/index.html">Image::ExifTool::TagNames(3pm)</a>,
  2325. <a href="http://search.cpan.org/dist/Image-ExifTool/lib/Image/ExifTool/Shortcuts.pm">Image::ExifTool::Shortcuts(3pm)</a>,
  2326. <a href="Shift.html">Image::ExifTool::Shift.pl</a></p>
  2327. <table border="0" width="100%" cellspacing="0" cellpadding="3">
  2328. <tr><td class="block" style="background-color: #cccccc" valign="middle">
  2329. <big><strong><span class="block">&nbsp;exiftool Application Documentation</span></strong></big>
  2330. </td></tr>
  2331. </table>
  2332. </body>
  2333. </html>