forked from exiftool/exiftool
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindows_exiftool.txt
More file actions
executable file
·2936 lines (2455 loc) · 154 KB
/
windows_exiftool.txt
File metadata and controls
executable file
·2936 lines (2455 loc) · 154 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
NAME
exiftool - Read and write meta information in files
RUNNING IN WINDOWS
Drag and drop files or folders onto the exiftool executable to display
meta information, or rename to "exiftool.exe" and run from the command
line to access all exiftool features.
This stand-alone Windows version allows simple command-line options to
be added to the name of the executable (in brackets and separated by
spaces at the end of the name), providing a mechanism to use options
when launched via the mouse. For example, changing the executable name
to "exiftool(-a -u -g1 -w txt).exe" gives a drag-and-drop utility which
generates sidecar ".txt" files with detailed meta information. As
shipped, the -k option is added to cause exiftool to pause before
terminating (keeping the command window open). Options may also be added
to the "Target" property of a Windows shortcut to the executable.
SYNOPSIS
Reading
exiftool [*OPTIONS*] [-*TAG*...] [--*TAG*...] *FILE*...
Writing
exiftool [*OPTIONS*] -*TAG*[+-^<]=[*VALUE*]... *FILE*...
Copying
exiftool [*OPTIONS*] -tagsFromFile *SRCFILE* [-[*DSTTAG*<]*SRCTAG*...]
*FILE*...
Other
exiftool [ -ver | -list[w|f|r|wf|g[*NUM*]|d|x|geo] ]
For specific examples, see the EXAMPLES sections below.
This documentation is displayed if exiftool is run without an input
*FILE* when one is expected.
DESCRIPTION
A command-line interface to Image::ExifTool, used for reading and
writing meta information in a variety of file types. *FILE* is one or
more source file names, directory names, or "-" for the standard input.
Metadata is read from source files and printed in readable form to the
console (or written to output text files with -w).
To write or delete metadata, tag values are assigned using
-*TAG*=[*VALUE*], and/or the -geotag, -csv= or -json= options. To copy
or move metadata, the -tagsFromFile feature is used. By default the
original files are preserved with "_original" appended to their names --
be sure to verify that the new files are OK before erasing the
originals. Once in write mode, exiftool will ignore any read-specific
options.
Note: If *FILE* is a directory name then only supported file types in
the directory are processed (in write mode only writable types are
processed). However, files may be specified by name, or the -ext option
may be used to force processing of files with any extension. Hidden
files in the directory are also processed. Adding the -r option causes
subdirectories to be processed recursively, but subdirectories with
names beginning with "." are skipped unless -r. is used.
Below is a list of file types and meta information formats currently
supported by ExifTool (r = read, w = write, c = create):
File Types
------------+-------------+-------------+-------------+------------
360 r/w | DOCX r | ITC r | NUMBERS r | RAM r
3FR r | DPX r | J2C r | NXD r | RAR r
3G2 r/w | DR4 r/w/c | JNG r/w | O r | RAW r/w
3GP r/w | DSS r | JP2 r/w | ODP r | RIFF r
7Z r | DV r | JPEG r/w | ODS r | RSRC r
A r | DVB r/w | JSON r | ODT r | RTF r
AA r | DVR-MS r | JXL r/w | OFR r | RW2 r/w
AAC r | DYLIB r | K25 r | OGG r | RWL r/w
AAE r | EIP r | KDC r | OGV r | RWZ r
AAX r/w | EPS r/w | KEY r | ONP r | RM r
ACR r | EPUB r | LA r | OPUS r | SEQ r
AFM r | ERF r/w | LFP r | ORF r/w | SKETCH r
AI r/w | EXE r | LIF r | ORI r/w | SO r
AIFF r | EXIF r/w/c | LNK r | OTF r | SR2 r/w
APE r | EXR r | LRV r/w | PAC r | SRF r
ARQ r/w | EXV r/w/c | M2TS r | PAGES r | SRW r/w
ARW r/w | F4A/V r/w | M4A/V r/w | PBM r/w | SVG r
ASF r | FFF r/w | MACOS r | PCAP r | SWF r
AVI r | FITS r | MAX r | PCAPNG r | THM r/w
AVIF r/w | FLA r | MEF r/w | PCD r | TIFF r/w
AZW r | FLAC r | MIE r/w/c | PCX r | TORRENT r
BMP r | FLIF r/w | MIFF r | PDB r | TTC r
BPG r | FLV r | MKA r | PDF r/w | TTF r
BTF r | FPF r | MKS r | PEF r/w | TXT r
C2PA r | FPX r | MKV r | PFA r | VCF r
CHM r | GIF r/w | MNG r/w | PFB r | VNT r
COS r | GLV r/w | MOBI r | PFM r | VRD r/w/c
CR2 r/w | GPR r/w | MODD r | PGF r | VSD r
CR3 r/w | GZ r | MOI r | PGM r/w | WAV r
CRM r/w | HDP r/w | MOS r/w | PLIST r | WDP r/w
CRW r/w | HDR r | MOV r/w | PICT r | WEBP r/w
CS1 r/w | HEIC r/w | MP3 r | PMP r | WEBM r
CSV r | HEIF r/w | MP4 r/w | PNG r/w | WMA r
CUR r | HTML r | MPC r | PPM r/w | WMV r
CZI r | ICC r/w/c | MPG r | PPT r | WPG r
DCM r | ICO r | MPO r/w | PPTX r | WTV r
DCP r/w | ICS r | MQV r/w | PS r/w | WV r
DCR r | IDML r | MRC r | PSB r/w | X3F r/w
DFONT r | IIQ r/w | MRW r/w | PSD r/w | XCF r
DIVX r | IND r/w | MXF r | PSP r | XISF r
DJVU r | INSP r/w | NEF r/w | QTIF r/w | XLS r
DLL r | INSV r | NKA r | R3D r | XLSX r
DNG r/w | INX r | NKSC r/w | RA r | XMP r/w/c
DOC r | ISO r | NRW r/w | RAF r/w | ZIP r
Meta Information
----------------------+----------------------+---------------------
EXIF r/w/c | CIFF r/w | Ricoh RMETA r
GPS r/w/c | AFCP r/w | Picture Info r
IPTC r/w/c | Kodak Meta r/w | Adobe APP14 r
XMP r/w/c | FotoStation r/w | MPF r
MakerNotes r/w/c | PhotoMechanic r/w | Stim r
Photoshop IRB r/w/c | JPEG 2000 r | DPX r
ICC Profile r/w/c | DICOM r | APE r
MIE r/w/c | Flash r | Vorbis r
JFIF r/w/c | FlashPix r | SPIFF r
Ducky APP12 r/w/c | QuickTime r | DjVu r
PDF r/w/c | Matroska r | M2TS r
PNG r/w/c | MXF r | PE/COFF r
Canon VRD r/w/c | PrintIM r | AVCHD r
Nikon Capture r/w/c | FLAC r | ZIP r
GeoTIFF r/w/c | ID3 r | (and more)
OPTIONS
Case is not significant for any command-line option (including tag and
group names), except for single-character options when the corresponding
upper-case option exists. Many single-character options have equivalent
long-name versions (shown in brackets), and some options have inverses
which are invoked with a leading double-dash. Unrecognized options are
interpreted as tag names (for this reason, multiple single-character
options may NOT be combined into one argument). Contrary to standard
practice, options may appear after source file names on the exiftool
command line.
Option Overview
Tag operations
-TAG or --TAG Extract or exclude specified tag
-TAG[+-^]=[VALUE] Write new value for tag
-TAG[+-]<=DATFILE Write tag value from contents of file
-[+]TAG[+-]<SRCTAG Copy tag value (see -tagsFromFile)
-tagsFromFile SRCFILE Copy tag values from file
-x TAG (-exclude) Exclude specified tag
Input-output text formatting
-args (-argFormat) Format metadata as exiftool arguments
-b (-binary) Output metadata in binary format
-c FMT (-coordFormat) Set format for GPS coordinates
-charset [[TYPE=]CHARSET] Specify encoding for special characters
-csv[[+]=CSVFILE] Export/import tags in CSV format
-csvDelim STR Set delimiter for CSV file
-d FMT (-dateFormat) Set format for date/time values
-D (-decimal) Show tag ID numbers in decimal
-E,-ex,-ec (-escape(HTML|XML|C))Escape tag values for HTML, XML or C
-f (-forcePrint) Force printing of all specified tags
-g[NUM...] (-groupHeadings) Organize output by tag group
-G[NUM...] (-groupNames) Print group name for each tag
-h (-htmlFormat) Use HTML formatting for output
-H (-hex) Show tag ID numbers in hexadecimal
-htmlDump[OFFSET] Generate HTML-format binary dump
-j[[+]=JSONFILE] (-json) Export/import tags in JSON format
-l (-long) Use long 2-line output format
-L (-latin) Use Windows Latin1 encoding
-lang [LANG] Set current language
-listItem INDEX Extract specific item from a list
-n (--printConv) No print conversion
-p[-] STR (-printFormat) Print output in specified format
-php Export tags as a PHP Array
-plot Output tags as SVG plot file
-s[NUM] (-short) Short output format (-s for tag names)
-S (-veryShort) Very short output format
-sep STR (-separator) Set separator string for list items
-sort Sort output alphabetically
-struct Enable output of structured information
-t (-tab) Output in tab-delimited list format
-T (-table) Output in tabular format
-v[NUM] (-verbose) Print verbose messages
-w[+|!] EXT (-textOut) Write (or overwrite!) output text files
-W[+|!] FMT (-tagOut) Write output text file for each tag
-Wext EXT (-tagOutExt) Write only specified file types with -W
-X (-xmlFormat) Use RDF/XML output format
Processing control
-a (-duplicates) Allow duplicate tags to be extracted
-e (--composite) Do not generate composite tags
-ee[NUM] (-extractEmbedded) Extract information from embedded files
-ext[+] EXT (-extension) Process files with specified extension
-F[OFFSET] (-fixBase) Fix the base for maker notes offsets
-fast[NUM] Increase speed when extracting metadata
-fileOrder[NUM] [-]TAG Set file processing order
-i DIR (-ignore) Ignore specified directory name
-if[NUM] EXPR Conditionally process files
-m (-ignoreMinorErrors) Ignore minor errors and warnings
-o OUTFILE (-out) Set output file or directory name
-overwrite_original Overwrite original by renaming tmp file
-overwrite_original_in_place Overwrite original by copying tmp file
-P (-preserve) Preserve file modification date/time
-password PASSWD Password for processing protected files
-progress[NUM][:[TITLE]] Show file progress count
-q (-quiet) Quiet processing
-r[.] (-recurse) Recursively process subdirectories
-scanForXMP Brute force XMP scan
-u (-unknown) Extract unknown tags
-U (-unknown2) Extract unknown binary tags too
-wm MODE (-writeMode) Set mode for writing/creating tags
-z (-zip) Read/write compressed information
Other options
-@ ARGFILE Read command-line arguments from file
-k (-pause) Pause before terminating
-list[w|f|wf|g[NUM]|d|x] List various exiftool capabilities
-ver Print exiftool version number
-- End of options
Special features
-diff FILE2 Compare metadata with another file
-geotag TRKFILE Geotag images from specified GPS log
-globalTimeShift SHIFT Shift all formatted date/time values
-use MODULE Add features from plug-in module
Utilities
-delete_original[!] Delete "_original" backups
-restore_original Restore from "_original" backups
Advanced options
-api OPT[[^]=[VAL]] Set ExifTool API option
-common_args Define common arguments
-config CFGFILE Specify configuration file name
-echo[NUM] TEXT Echo text to stdout or stderr
-efile[NUM][!] TXTFILE Save names of files with errors
-execute[NUM] Execute multiple commands on one line
-fileNUM ALTFILE Load tags from alternate file
-list_dir List directories, not their contents
-srcfile FMT Process a different source file
-stay_open FLAG Keep reading -@ argfile even after EOF
-userParam PARAM[[^]=[VAL]] Set user parameter (API UserParam opt)
Option Details
Tag operations
-*TAG*
Extract information for the specified tag (eg. "-CreateDate").
Multiple tags may be specified in a single command. A tag name is
the handle by which a piece of information is referenced. See
Image::ExifTool::TagNames for documentation on available tag names.
A tag name may include leading group names separated by colons (eg.
"-EXIF:CreateDate", or "-Doc1:XMP:Creator"), and each group name
may be prefixed by a digit to specify family number (eg.
"-1IPTC:City"). (Note that the API SavePath and SaveFormat options
must be used for the family 5 and 6 groups respectively to be
available.) Use the -listg option to list available group names by
family.
A special tag name of "All" may be used to indicate all meta
information (ie. -All). This is particularly useful when a group
name is specified to extract all information in a group (but beware
that unless the -a option is also used, some tags in the group may
be suppressed by same-named tags in other groups). The wildcard
characters "?" and "*" may be used in a tag name to match any
single character and zero or more characters respectively. These
may not be used in a group name, with the exception that a group
name of "*" (or "All") may be used to extract all instances of a
tag (as if -a was used). Note that arguments containing wildcards
must be quoted on the command line of most systems to prevent shell
globbing.
A "#" may be appended to the tag name to disable the print
conversion on a per-tag basis (see the -n option). This may also be
used when writing or copying tags.
If no tags are specified, all available information is extracted
(as if "-All" had been specified).
Note: Descriptions, not tag names, are shown by default when
extracting information. Use the -s option to see the tag names
instead.
--*TAG*
Exclude specified tag from extracted information. Same as the -x
option. Group names and wildcards are permitted as described above
for -TAG. Once excluded from the output, a tag may not be
re-included by a subsequent option. May also be used following a
-tagsFromFile option to exclude tags from being copied (when
redirecting to another tag, it is the source tag that should be
excluded), or to exclude groups from being deleted when deleting
all information (eg. "-all= --exif:all" deletes all but EXIF
information). But note that this will not exclude individual tags
from a group delete (unless a family 2 group is specified, see note
4 below). Instead, individual tags may be recovered using the
-tagsFromFile option (eg. "-all= -tagsfromfile @ -artist").
To speed processing when reading XMP, exclusions in XMP groups also
bypass processing of the corresponding XMP property and any
contained properties. For example, "--xmp-crs:all" may speed
processing significantly in cases where a large number of XMP-crs
tags exist. To use this feature to bypass processing of a specific
XMP property, the property name must be used instead of the
ExifTool tag name (eg. "--xmp-crs:dabs"). Also, "XMP-all" may be
used to to indicate any XMP namespace (eg. "--xmp-all:dabs").
-*TAG*[+-^]=[*VALUE*]
Write a new value for the specified tag (eg. "-comment=wow"), or
delete the tag if no *VALUE* is given (eg. "-comment="). "+=" and
"-=" are used to add or remove existing entries from a list, or to
shift date/time values (see Image::ExifTool::Shift.pl and notes 6
and 7 below for more details). "+=" may also be used to increment
numerical values (or decrement if *VALUE* is negative), and "-="
may be used to conditionally delete or replace a tag (see "WRITING
EXAMPLES" for examples). "^=" is used to write an empty string
instead of deleting the tag when no *VALUE* is given, but otherwise
it is equivalent to "=". (Note that the caret must be quoted on the
Windows command line.)
*TAG* may contain one or more leading family 0, 1, 2 or 7 group
names, prefixed by optional family numbers, and separated colons.
If no group name is specified, the tag is created in the preferred
group, and updated in any other location where a same-named tag
already exists. The preferred group in JPEG and TIFF-format images
is the first group in the following list where *TAG* is valid: 1)
EXIF, 2) IPTC, 3) XMP.
The wildcards "*" and "?" may be used in tag names to assign the
same value to multiple tags. When specified with wildcards,
"Unsafe" tags are not written. A tag name of "All" is equivalent to
"*" (except that it doesn't require quoting, while arguments with
wildcards do on systems with shell globbing), and is often used
when deleting all metadata (ie. "-All=") or an entire group (eg.
"-XMP-dc:All=", see note 4 below). Note that not all groups are
deletable, and that the JPEG APP14 "Adobe" group is not removed by
default with "-All=" because it may affect the appearance of the
image. However, color space information is removed, so the colors
may be affected (but this may be avoided by copying back the tags
defined by the ColorSpaceTags shortcut). Use the -listd option for
a complete list of deletable groups, and see note 5 below regarding
the "APP" groups. Also, within an image some groups may be
contained within others, and these groups are removed if the
containing group is deleted:
JPEG Image:
- Deleting EXIF or IFD0 also deletes ExifIFD, GlobParamIFD,
GPS, IFD1, InteropIFD, MakerNotes, PrintIM and SubIFD.
- Deleting ExifIFD also deletes InteropIFD and MakerNotes.
- Deleting Photoshop also deletes IPTC.
TIFF Image:
- Deleting EXIF only removes ExifIFD which also deletes
InteropIFD and MakerNotes.
MOV/MP4 Video:
- Deleting ItemList also deletes Keys tags.
Notes:
1) Many tag values may be assigned in a single command. If two
assignments affect the same tag, the latter takes precedence
(except for list-type tags, for which both values are written).
2) In general, MakerNotes tags are considered "Permanent", and may
be edited but not created or deleted individually. This avoids many
potential problems, including the inevitable compatibility problems
with OEM software which may be very inflexible about the
information it expects to find in the maker notes.
3) Changes to PDF files by ExifTool are reversible (by deleting the
update with "-PDF-update:all=") because the original information is
never actually deleted from the file. So ExifTool alone may not be
used to securely edit metadata in PDF files.
4) Specifying "-GROUP:all=" deletes the entire group as a block
only if a single family 0 or 1 group is specified. Otherwise all
deletable tags in the specified group(s) are removed individually,
and in this case is it possible to exclude individual tags from a
mass delete. For example, "-time:all --Exif:Time:All" removes all
deletable Time tags except those in the EXIF. This difference also
applies if family 2 is specified when deleting all groups. For
example, "-2all:all=" deletes tags individually, while "-all:all="
deletes entire blocks.
5) The "APP" group names ("APP0" through "APP15") are used to
delete JPEG application segments which are not associated with
another deletable group. For example, specifying "-APP14:All=" will
NOT delete the APP14 "Adobe" segment because this is accomplished
with "-Adobe:All". But note that these unnamed APP segments may not
be excluded with "--APPxx:all" when deleting all information.
6) When shifting a value, the shift is applied to the original
value of the tag, overriding any other values previously assigned
to the tag on the same command line. To shift a date/time value and
copy it to another tag in the same operation, use the
-globalTimeShift option.
7) The "+=" operator may not be used to shift a List-type date/time
tag (eg. XMP-dc:Date) because "+=" is used to add elements to the
list. Instead, the -globalTimeShift option should be used.
Special feature: Integer values may be specified in hexadecimal
with a leading "0x", and simple rational values may be specified as
fractions.
-*TAG*<=*DATFILE* or -*TAG*<=*FMT*
Set the value of a tag from the contents of file *DATFILE*. The
file name may also be given by a *FMT* string where %d, %f and %e
represent the directory, file name and extension of the original
*FILE* (see the -w option for more details). Note that quotes are
required around this argument to prevent shell redirection since it
contains a "<" symbol. If *DATFILE*/*FMT* is not provided, the
effect is the same as "-TAG=", and the tag is simply deleted. "+<="
or "-<=" may also be used to add or delete specific list entries,
or to shift date/time values.
-tagsFromFile *SRCFILE* or *FMT*
Copy tag values from *SRCFILE* to *FILE*. Tag names on the command
line after this option specify the tags to be copied, or excluded
from the copy. Wildcards are permitted in these tag names. If no
tags are specified, then all possible tags (see note 1 below) from
the source file are copied to same-named tags in the preferred
location of the output file (the same as specifying "-all"). More
than one -tagsFromFile option may be used to copy tags from
multiple files.
By default, this option will update any existing and writable
same-named tags in the output *FILE*, but will create new tags only
in their preferred groups. This allows some information to be
automatically transferred to the appropriate group when copying
between images of different formats. However, if a group name is
specified for a tag then the information is written only to this
group (unless redirected to another group, see below). If "All" is
used as a group name, then the specified tag(s) are written to the
same family 1 group they had in the source file (ie. the same
specific location, like ExifIFD or XMP-dc). For example, the common
operation of copying all writable tags to the same specific
locations in the output *FILE* is achieved by adding "-all:all". A
different family may be specified by adding a leading family number
to the group name (eg. "-0all:all" preserves the same general
location, like EXIF or XMP).
*SRCFILE* may be the same as *FILE* to move information around
within a single file. In this case, "@" may be used to represent
the source file (ie. "-tagsFromFile @"), permitting this feature to
be used for batch processing multiple files. Specified tags are
then copied from each file in turn as it is rewritten. For advanced
batch use, the source file name may also be specified using a *FMT*
string in which %d, %f and %e represent the directory, file name
and extension of *FILE*. (eg. the current *FILE* would be
represented by "%d%f.%e", with the same effect as "@"). See the -w
option for *FMT* string examples.
A powerful redirection feature allows a destination tag to be
specified for each copied tag. With this feature, information may
be written to a tag with a different name or group. This is done
using "-*DSTTAG*<*SRCTAG*" or "-*SRCTAG*>*DSTTAG*" on the command
line after -tagsFromFile, and causes the value of *SRCTAG* to be
copied from *SRCFILE* and written to *DSTTAG* in *FILE*. Has no
effect unless *SRCTAG* exists in *SRCFILE*. Note that this argument
must be quoted to prevent shell redirection, and there is no "="
sign as when assigning new values. Source and/or destination tags
may be prefixed by a group name and/or suffixed by "#". Wildcards
are allowed in both the source and destination tag names. A
destination group and/or tag name of "All" or "*" writes to the
same family 1 group and/or tag name as the source (but the family
may be specified by adding a leading number to the group name, eg.
"0All" writes to the same family 0 group as the source). If no
destination group is specified, the information is written to the
preferred group. Whitespace around the ">" or "<" is ignored. As a
convenience, "-tagsFromFile @" is assumed for any redirected tags
which are specified without a prior -tagsFromFile option. Copied
tags may also be added or deleted from a list with arguments of the
form "-*SRCTAG*+<*DSTTAG*" or "-*SRCTAG*-<*DSTTAG*" (but see Note 5
below).
An extension of the redirection feature allows strings involving
tag names to be used on the right hand side of the "<" symbol with
the syntax "-*DSTTAG*<*STR*", where tag names in *STR* are prefixed
with a "$" symbol. See the -p option and the "Advanced formatting
feature" section for more details about this syntax. Strings
starting with a "=" sign must insert a single space after the "<"
to avoid confusion with the "<=" operator which sets the tag value
from the contents of a file. A single space at the start of the
string is removed if it exists, but all other whitespace in the
string is preserved. See note 8 below about using the redirection
feature with list-type stags, shortcuts or when using wildcards in
tag names.
See "COPYING EXAMPLES" for examples using -tagsFromFile.
Notes:
1) Some tags (generally tags which may affect the appearance of the
image) are considered "Unsafe" to write, and are only copied if
specified explicitly (ie. no wildcards). See the tag name
documentation for more details about "Unsafe" tags.
2) Be aware of the difference between excluding a tag from being
copied (--*TAG*), and deleting a tag (-*TAG*=). Excluding a tag
prevents it from being copied to the destination image, but
deleting will remove a pre-existing tag from the image.
3) The maker note information is copied as a block, so it isn't
affected like other information by subsequent tag assignments on
the command line, and individual makernote tags may not be excluded
from a block copy. Also, since the PreviewImage referenced from the
maker notes may be rather large, it is not copied, and must be
transferred separately if desired.
4) The order of operations is to copy all specified tags at the
point of the -tagsFromFile option in the command line. Any tag
assignment to the right of the -tagsFromFile option is made after
all tags are copied. For example, new tag values are set in the
order One, Two, Three then Four with this command:
exiftool -One=1 -tagsFromFile s.jpg -Two -Four=4 -Three d.jpg
This is significant in the case where an overlap exists between the
copied and assigned tags because later operations may override
earlier ones.
5) The normal behaviour of copied tags differs from that of
assigned tags for list-type tags and conditional replacements
because each copy operation on a tag overrides any previous
operations. While this avoids duplicate list items when copying
groups of tags from a file containing redundant information, it
also prevents values of different tags from being copied into the
same list when this is the intent. To accumulate values from
different operations into the same list, add a "+" after the
initial "-" of the argument. For example:
exiftool -tagsfromfile @ '-subject<make' '-+subject<model' ...
Similarly, "-+DSTTAG" must be used when conditionally replacing a
tag to prevent overriding earlier conditions.
6) The -a option (allow duplicate tags) is always in effect when
copying tags from *SRCFILE*, but the highest priority tag is always
copied last so it takes precedence.
7) Structured tags are copied by default when copying tags. See the
-struct option for details.
8) With the redirection feature, copying a tag directly (ie.
"'-*DSTTAG*<*SRCTAG*'") is not the same as interpolating its value
inside a string (ie. "'-*DSTTAG*<$*SRCTAG*'") for source tags which
are list-type tags, shortcut tags, or tag names containing
wildcards. When copying directly, the values of each matching
source tag are copied individually to the destination tag (as if
they were separate assignments). However, when interpolated inside
a string, list items and the values of shortcut tags are
concatenated (with a separator set by the -sep option), and
wildcards are not allowed.Another difference is that a minor
warning is generated if a tag doesn't exist when interpolating its
value in a string (with "$"), but isn't when copying the tag
directly.
Finally, the behaviour is different when a destination tag or group
of "All" is used. When copying directly, a destination group and/or
tag name of "All" writes to the same family 1 group and/or tag name
as the source. But when interpolated in a string, the identity of
the source tags are lost and the value is written to all possible
groups/tags. For example, the string form must be used in the
following command since the intent is to set the value of all
existing date/time tags from "CreateDate":
exiftool "-time:all<$createdate" -wm w FILE
-x *TAG* (-exclude)
Exclude the specified tag. There may be multiple -x options. This
has the same effect as --*TAG* on the command line. See the --*TAG*
documentation above for a complete description.
Input-output text formatting
Note that trailing spaces are removed from extracted values for most
output text formats. The exceptions are -b, -csv, -j and -X.
-args (-argFormat)
Output information in the form of exiftool arguments, suitable for
use with the -@ option when writing. May be combined with the -G
option to include group names. This feature may be used to
effectively copy tags between images, but allows the metadata to be
altered by editing the intermediate file ("out.args" in this
example):
exiftool -args -G1 --filename --directory src.jpg > out.args
exiftool -@ out.args -sep ", " dst.jpg
Note: Be careful when copying information with this technique since
it is easy to write tags which are normally considered "Unsafe".
For instance, the FileName and Directory tags are excluded in the
example above to avoid renaming and moving the destination file.
Also note that the second command above will produce warning
messages for any tags which are not writable.
As well, the -sep option should be used as in the second command
above to maintain separate list items when writing metadata back to
image files, and the -struct option may be used when extracting to
preserve structured XMP information.
-b, --b (-binary, --binary)
Output requested metadata in binary format without tag names or
descriptions (-b or -binary). This option is mainly used for
extracting embedded images or other binary data, but it may also be
useful for some text strings since control characters (such as
newlines) are not replaced by '.' as they are in the default
output. By default, list items are separated by a newline when
extracted with the -b option and no terminator is added after each
tag value, but the list separator may be changed with a -sep option
and a terminator may be set by adding a second -sep option (see the
-sep option for details). May be combined with -j, -php or -X to
extract binary data in JSON, PHP or XML format, but note that
"Unsafe" tags are not extracted as binary unless they are specified
explicitly or the API RequestAll option is set to 3 or higher.
With a leading double dash (--b or --binary), tags which contain
binary data are suppressed in the output when reading.
-c *FMT* (-coordFormat)
Set the print format for GPS coordinates. *FMT* uses the same
syntax as a "printf" format string. The specifiers correspond to
degrees, minutes and seconds in that order, but minutes and seconds
are optional. For example, the following table gives the output for
the same coordinate using various formats:
FMT Output
------------------- ------------------
"%d deg %d' %.2f"\" 54 deg 59' 22.80" (default for reading)
"%d %d %.8f" 54 59 22.80000000 (default for copying)
"%d deg %.4f min" 54 deg 59.3800 min
"%.6f degrees" 54.989667 degrees
Notes:
1) To avoid loss of precision, the default coordinate format is
different when copying tags using the -tagsFromFile option.
2) If the hemisphere is known, a reference direction (N, S, E or W)
is appended to each printed coordinate, but adding a "+" or "-" to
the format specifier (eg. "%+.6f" or "%-.6f") prints a signed
coordinate instead. ("+" adds a leading "+" for positive
coordinates, but "-" does not.)
3) This print formatting may be disabled with the -n option to
extract coordinates as signed decimal degrees.
-charset [[*TYPE*=]*CHARSET*]
If *TYPE* is "ExifTool" or not specified, this option sets the
ExifTool character encoding for output tag values when reading and
input values when writing, with a default of "UTF8". If no
*CHARSET* is given, a list of available character sets is returned.
Valid *CHARSET* values are:
CHARSET Alias(es) Description
---------- --------------- ----------------------------------
UTF8 cp65001, UTF-8 UTF-8 characters (default)
Latin cp1252, Latin1 Windows Latin1 (West European)
Latin2 cp1250 Windows Latin2 (Central European)
Cyrillic cp1251, Russian Windows Cyrillic
Greek cp1253 Windows Greek
Turkish cp1254 Windows Turkish
Hebrew cp1255 Windows Hebrew
Arabic cp1256 Windows Arabic
Baltic cp1257 Windows Baltic
Vietnam cp1258 Windows Vietnamese
Thai cp874 Windows Thai
DOSLatinUS cp437 DOS Latin US
DOSLatin1 cp850 DOS Latin1
DOSCyrillic cp866 DOS Cyrillic
MacRoman cp10000, Roman Macintosh Roman
MacLatin2 cp10029 Macintosh Latin2 (Central Europe)
MacCyrillic cp10007 Macintosh Cyrillic
MacGreek cp10006 Macintosh Greek
MacTurkish cp10081 Macintosh Turkish
MacRomanian cp10010 Macintosh Romanian
MacIceland cp10079 Macintosh Icelandic
MacCroatian cp10082 Macintosh Croatian
*TYPE* may be "FileName" to specify the encoding of file names on
the command line (ie. *FILE* arguments). In Windows, this triggers
use of wide-character i/o routines, thus providing support for
Unicode file names. See the "WINDOWS UNICODE FILE NAMES" section
below for details.
Other values of *TYPE* listed below are used to specify the
internal encoding of various meta information formats.
TYPE Description Default
--------- ------------------------------------------- -------
EXIF Internal encoding of EXIF "ASCII" strings (none)
ID3 Internal encoding of ID3v1 information Latin
IPTC Internal IPTC encoding to assume when Latin
IPTC:CodedCharacterSet is not defined
Photoshop Internal encoding of Photoshop IRB strings Latin
QuickTime Internal encoding of QuickTime strings MacRoman
RIFF Internal encoding of RIFF strings 0
See <https://exiftool.org/faq.html#Q10> for more information about
coded character sets, and the Image::ExifTool Options for more
details about the -charset settings.
-csv[[+]=*CSVFILE*]
Export information in CSV format, or import information if
*CSVFILE* is specified. When importing, the CSV file must be in
exactly the same format as the exported file. The first row of the
*CSVFILE* must be the ExifTool tag names (with optional group
names) for each column of the file, and values must be separated by
commas. A special "SourceFile" column specifies the files
associated with each row of information (and a SourceFile of "*"
may be used to define default tags to be imported for all files
which are combined with any tags specified for the specific
SourceFile processed). The -csvDelim option may be used to change
the input/output field delimiter if something other than a comma is
required.
The following examples demonstrate basic use of the -csv option:
# generate CSV file with common tags from all images in a directory
exiftool -common -csv dir > out.csv
# update metadata for all images in a directory from CSV file
exiftool -csv=a.csv dir
When importing, empty values are ignored unless the -f option is
used and the API MissingTagValue is set to an empty string (in
which case the tag is deleted). Also, FileName and Directory
columns are ignored if they exist (ie. ExifTool will not attempt to
write these tags with a CSV import), but all other columns are
imported. To force a tag to be deleted, use the -f option and set
the value to "-" in the CSV file (or to the MissingTagValue if this
API option was used). Multiple databases may be imported in a
single command.
Specific tags may be imported from the CSV database by adding
-*TAG* options to the command, or excluded with --*TAG*, with
exclusions taking priority. Group names and wildcards are allowed.
If no tags are specified, then all except FileName and Directory
are used. Tags are imported in the same order as the database
entries.
When exporting a CSV file, the -g or -G option adds group names to
the tag headings. If the -a option is used to allow duplicate tag
names, the duplicate tags are only included in the CSV output if
the column headings are unique. Adding the -G4 option ensures a
unique column heading for each tag. The -b option may be added to
output binary data, encoded in base64 if necessary (indicated by
ASCII "base64:" as the first 7 bytes of the value). Values may also
be encoded in base64 if the -charset option is used and the value
contains invalid characters.
When exporting specific tags, the CSV columns are arranged in the
same order as the specified tags provided the column headings
exactly match the specified tag names, otherwise the columns are
sorted in alphabetical order.
When importing from a CSV file, only files specified on the command
line are processed. Any extra entries in the CSV file are ignored.
List-type tags are stored as simple strings in a CSV file, but the
-sep option may be used to split them back into separate items when
importing.
Special feature: -csv+=*CSVFILE* may be used to add items to
existing lists. This affects only list-type tags. Also applies to
the -j option.
Note that this and the -plot options are fundamentally different
than all other output format options because they require
information from all input files to be buffered in memory before
the output is written. This may result in excessive memory usage
when processing a very large number of files with a single command.
Also, when used with -csv, the -w option changes to specify a
complete file name with no filename formatting codes or append mode
allowed, and -W may not be used. When processing a large number of
files, it is recommended to either use the JSON (-j) or XML (-X)
output format, or use -p to generate a fixed-column CSV file
instead of using the -csv option.
-csvDelim *STR*
Set the delimiter for separating CSV entries for CSV file
input/output via the -csv option. *STR* may contain "\t", "\n",
"\r" and "\\" to represent TAB, LF, CR and '\' respectively. A
double quote is not allowed in the delimiter. Default is ','.
-d *FMT* (-dateFormat)
Set the format for date/time tag values. The *FMT* string may
contain formatting codes beginning with a percent character ("%")
to represent the various components of a date/time value. ExifTool
implements 3 format codes internally (see below), but other format
codes are system dependent -- consult the "strftime" man page on
your system for details. The default format is equivalent to
"%Y:%m:%d %H:%M:%S". This option has no effect on date-only or
time-only tags. Requires POSIX::strptime or Time::Piece for the
inversion conversion when writing. Only one -d option may be used
per command.
Additional format codes implemented internally by ExifTool:
1) %z represents the time zone in "+/-HHMM" format. Adding a colon
(ie. %:z) adds a colon separator (eg. "-05:00"). If the date/time
value doesn't contain a time zone then %z gives the system time
zone for the specified date/time value.
2) %f represents fractional seconds, and supports an optional width
to specify the number of digits after the decimal point (eg. %3f
would give something like ".437"). Adding a minus sign drops the
decimal point (eg. "%-3f" would give "437").
3) %s represents the number of seconds since 00:00 UTC Jan 1, 1970,
taking into account the specified time zone (or system time zone if
not specified).
-D (-decimal)
Show tag ID number in decimal when extracting information.
-E, -ex, -ec (-escapeHTML, -escapeXML, -escapeC)
Escape characters in output tag values for HTML (-E), XML (-ex) or
C (-ec). For HTML, all characters with Unicode code points above
U+007F are escaped as well as the following 5 characters: & (&)
' (') " (") > (>) and < (<). For XML, only these 5
characters are escaped. The -E option is implied with -h, and -ex
is implied with -X. For C, all control characters and the backslash
are escaped. The inverse conversion is applied when writing tags.
-f (-forcePrint)
Force printing of tags even if they don't exist. This option
applies to tags specified on the command line, or with the -p, -if
or -tagsFromFile options. When -f is used, the value of any missing
tag is set to a dash ("-") by default, but this may be configured
via the API MissingTagValue option. -f is also used to add a
'flags' attribute to the -listx output, or to allow tags to be
deleted when writing with the -csv=*CSVFILE* feature.
-g[*NUM*][:*NUM*...] (-groupHeadings)
Organize output by tag group. *NUM* specifies a group family
number, and may be 0 (general location), 1 (specific location), 2
(category), 3 (document number), 4 (instance number), 5 (metadata
path), 6 (EXIF/TIFF format), 7 (tag ID) or 8 (file number). -g0 is
assumed if a family number is not specified. May be combined with
other options to add group names to the output. Multiple families
may be specified by separating them with colons. By default the
resulting group name is simplified by removing any leading "Main:"
and collapsing adjacent identical group names, but this can be
avoided by placing a colon before the first family number (eg.
-g:3:1). Use the -listg option to list group names for a specified
family. The API SavePath and SaveFormat options are automatically
enabled if the respective family 5 or 6 group names are requested.
See the API GetGroup documentation for more information.
-G[*NUM*][:*NUM*...] (-groupNames)
Same as -g but print group name for each tag. -G0 is assumed if
*NUM* is not specified. May be combined with a number of other
options to add group names to the output. Note that *NUM* may be
added wherever -G is mentioned in the documentation. See the -g
option above for details.
-h (-htmlFormat)
Use HTML table formatting for output. Implies the -E option. The
formatting options -D, -H, -g, -G, -l and -s may be used in
combination with -h to influence the HTML format.
-H (-hex)
Show tag ID number in hexadecimal when extracting information.
-htmlDump[*OFFSET*]
Generate a dynamic web page containing a hex dump of the EXIF
information. This can be a very powerful tool for low-level
analysis of EXIF information. The -htmlDump option is also invoked
if the -v and -h options are used together. The verbose level
controls the maximum length of the blocks dumped. An *OFFSET* may
be given to specify the base for displayed offsets. If not
provided, the EXIF/TIFF base offset is used. Use -htmlDump0 for
absolute offsets. Currently only EXIF/TIFF and JPEG information is
dumped, but the -u option can be used to give a raw hex dump of
other file formats.
-j[[+]=*JSONFILE*] (-json)
Use JSON (JavaScript Object Notation) formatting for console
output, or import JSON file if *JSONFILE* is specified. This option
may be combined with -g to organize the output into objects by
group, or -G to add group names to each tag. List-type tags with
multiple items are output as JSON arrays unless -sep is used. By
default XMP structures are flattened into individual tags in the
JSON output, but the original structure may be preserved with the
-struct option (this also causes all list-type XMP tags to be
output as JSON arrays, otherwise single-item lists would be output
as simple strings). The -a option is implied when -json is used,
but entries with identical JSON names are suppressed in the output.
(-G4 may be used to ensure that all tags have unique JSON names.)
Adding the -D or -H option changes tag values to JSON objects with
"val" and "id" fields. Adding -l adds a "desc" field, and a "num"
field if the numerical value is different from the converted "val",
and "fmt" and "hex" fields for EXIF metadata if the API SaveFormat
and SaveBin options are set respectively, and the length of the
"hex" output is limited by the API LimitLongValues setting. The -b
option may be added to output binary data, encoded in base64 if
necessary (indicated by ASCII "base64:" as the first 7 bytes of the
value), and -t may be added to include tag table information (see
-t for details). The JSON output is UTF-8 regardless of any -L or
-charset option setting, but the UTF-8 validation is disabled if a
character set other than UTF-8 is specified.
Note that ExifTool quotes JSON values only if they don't look like
numbers (regardless of the original storage format or the relevant
metadata specification). This may be a problem when reading the
JSON via a strongly typed language. However, the API StructFormat
option may be set to "JSONQ" to force quoting of numbers. As well,
the -sep option may be used to convert arrays into strings. For
example:
exiftool -j -api structformat=jsonq -sep ", " ...
If *JSONFILE* is specified, the file is imported and the tag
definitions from the file are used to set tag values on a per-file
basis. The special "SourceFile" entry in each JSON object
associates the information with a specific target file. An object
with a missing SourceFile or a SourceFile of "*" defines default
tags for all target files which are combined with any tags
specified for the specific SourceFile processed. The imported JSON
file must have the same format as the exported JSON files with the
exception that options exporting JSON objects instead of simple
values are not compatible with the import file format (ie. export
with -D, -H, -l, or -T is not compatible, and use -G instead of
-g). Additionally, tag names in the input JSON file may be suffixed
with a "#" to disable print conversion.
Specific tags may be imported from the JSON database by adding
-*TAG* options to the command, or excluded with --*TAG*, with
exclusions taking priority. Group names and wildcards are allowed.
If no tags are specified, then all except FileName and Directory
are used. Tags are imported in the same order as the database
entries.
Unlike CSV import, empty values are not ignored, and will cause an
empty value to be written if supported by the specific metadata
type. Tags are deleted by using the -f option and setting the tag
value to "-" (or to the MissingTagValue setting if this API option
was used). Importing with -j+=*JSONFILE* causes new values to be
added to existing lists.
-l (-long)
Use long 2-line Canon-style output format. Adds a description and
unconverted value (if it is different from the converted value) to
the XML, JSON or PHP output when -X, -j or -php is used. May also
be combined with -listf, -listr or -listwf to add descriptions of
the file types.
-L (-latin)
Use Windows Latin1 encoding (cp1252) for output tag values instead
of the default UTF-8. When writing, -L specifies that input text
values are Latin1 instead of UTF-8. Equivalent to "-charset latin".
-lang [*LANG*]
Set current language for tag descriptions and converted values.
*LANG* is "de", "fr", "ja", etc. Use -lang with no other arguments
to get a list of available languages. The default language is "en"
if -lang is not specified. Note that tag/group names are always
English, independent of the -lang setting, and translation of
warning/error messages has not yet been implemented. May also be
combined with -listx to output descriptions in one language only.
By default, ExifTool uses UTF-8 encoding for special characters,
but the -L or -charset option may be used to invoke other
encodings. Note that ExifTool uses Unicode::LineBreak if available
to help preserve the column alignment of the plain text output for
languages with a variable-width character set.
Currently, the language support is not complete, but users are
welcome to help improve this by submitting their own translations.
To submit a translation, follow these steps (you must have Perl
installed for this):
1. Download and unpack the latest Image-ExifTool full distribution.
2. "cd" into the Image-ExifTool directory.
3. Run this command to make an XML file of the desired tags (eg.
EXIF):
./exiftool -listx -exif:all > out.xml
4. Copy this text into a file called "import.pl" in the exiftool
directory:
push @INC, 'lib';
require Image::ExifTool::TagInfoXML;
my $file = shift or die "Expected XML file name\n";
$Image::ExifTool::TagInfoXML::makeMissing = shift;
Image::ExifTool::TagInfoXML::BuildLangModules($file,8);
5. Run the "import.pl" script to Import the XML file, generating
the "MISSING" entries for your language (eg. Russian):