exiftool-vendored.exe 12.91.0 → 12.96.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env perl -w
1
+ #!/usr/bin/env perl
2
2
  #------------------------------------------------------------------------------
3
3
  # File: windows_exiftool
4
4
  #
@@ -11,7 +11,7 @@ use strict;
11
11
  use warnings;
12
12
  require 5.004;
13
13
 
14
- my $version = '12.91';
14
+ my $version = '12.96';
15
15
 
16
16
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
17
17
  my $exePath;
@@ -224,10 +224,6 @@ my $stayOpen = 0;
224
224
  my $rtnValApp = 0; # app return value (0=success)
225
225
  my $curTitle = ''; # current window title
226
226
 
227
- # lookup for O/S names which may use a backslash as a directory separator
228
- # (ref File::Spec of PathTools-3.2701)
229
- my %hasBackslash = ( MSWin32 => 1, os2 => 1, dos => 1, NetWare => 1, symbian => 1, cygwin => 1 );
230
-
231
227
  # lookup for O/S names which use CR/LF newlines
232
228
  my $isCRLF = { MSWin32 => 1, os2 => 1, dos => 1 }->{$^O};
233
229
 
@@ -1612,7 +1608,7 @@ if ($argFormat) {
1612
1608
  }
1613
1609
 
1614
1610
  # change to forward slashes if necessary in all filenames (like CleanFilename)
1615
- if ($hasBackslash{$^O}) {
1611
+ if (Image::ExifTool::IsPC()) {
1616
1612
  tr/\\/\// foreach @files;
1617
1613
  }
1618
1614
 
@@ -3771,7 +3767,7 @@ sub DoSetFromFile($$$)
3771
3767
  # Returns: nothing, but changes filename if necessary
3772
3768
  sub CleanFilename($)
3773
3769
  {
3774
- $_[0] =~ tr/\\/\// if $hasBackslash{$^O};
3770
+ $_[0] =~ tr/\\/\// if Image::ExifTool::IsPC();
3775
3771
  }
3776
3772
 
3777
3773
  #------------------------------------------------------------------------------
@@ -4094,7 +4090,7 @@ sub AbsPath($)
4094
4090
  $path = eval { Cwd::abs_path($file) };
4095
4091
  # make the delimiters and case consistent
4096
4092
  # (abs_path is very inconsistent about what it returns in Windows)
4097
- if (defined $path and $hasBackslash{$^O}) {
4093
+ if (defined $path and Image::ExifTool::IsPC()) {
4098
4094
  $path =~ tr/\\/\//;
4099
4095
  $path = lc $path;
4100
4096
  }
@@ -4350,46 +4346,21 @@ sub NextUnusedFilename($;$)
4350
4346
  # Create directory for specified file
4351
4347
  # Inputs: 0) complete file name including path
4352
4348
  # Returns: true if a directory was created
4353
- my $k32CreateDir;
4354
4349
  sub CreateDirectory($)
4355
4350
  {
4356
4351
  my $file = shift;
4357
- my ($dir, $created);
4358
- ($dir = $file) =~ s/[^\/]*$//; # remove filename from path specification
4359
- if ($dir and not $mt->IsDirectory($dir)) {
4360
- my @parts = split /\//, $dir;
4361
- $dir = '';
4362
- foreach (@parts) {
4363
- $dir .= $_;
4364
- if (length $dir and not $mt->IsDirectory($dir) and
4365
- # don't try to create a network drive root directory
4366
- not ($hasBackslash{$^O} and $dir =~ m{^//[^/]*$}))
4367
- {
4368
- my $success;
4369
- # create directory since it doesn't exist
4370
- my $d2 = $dir; # (must make a copy in case EncodeFileName recodes it)
4371
- if ($mt->EncodeFileName($d2)) {
4372
- # handle Windows Unicode directory names
4373
- unless (eval { require Win32::API }) {
4374
- Error('Install Win32::API to create directories with Unicode names');
4375
- return 0;
4376
- }
4377
- unless ($k32CreateDir) {
4378
- $k32CreateDir = Win32::API->new('KERNEL32', 'CreateDirectoryW', 'PP', 'I');
4379
- }
4380
- $success = $k32CreateDir->Call($d2, 0) if $k32CreateDir;
4381
- } else {
4382
- $success = mkdir($d2, 0777);
4383
- }
4384
- $success or Error("Error creating directory $dir\n"), return 0;
4385
- $verbose and print $vout "Created directory $dir\n";
4386
- $created = 1;
4387
- }
4388
- $dir .= '/';
4352
+ my $err = $mt->CreateDirectory($file);
4353
+ if (defined $err) {
4354
+ $err and Error("$err\n"), return 0;
4355
+ if ($verbose) {
4356
+ my $dir;
4357
+ ($dir = $file) =~ s(/[^/]*$)();
4358
+ print $vout "Created directory $dir\n";
4389
4359
  }
4390
- ++$countNewDir if $created;
4360
+ ++$countNewDir;
4361
+ return 1;
4391
4362
  }
4392
- return $created;
4363
+ return 0;
4393
4364
  }
4394
4365
 
4395
4366
  #------------------------------------------------------------------------------
@@ -4669,2860 +4640,9 @@ sub PrintErrors($$$)
4669
4640
  # Print help documentation
4670
4641
  sub Help()
4671
4642
  {
4672
- my $help = <<'__HELP__';
4673
- NAME
4674
- exiftool - Read and write meta information in files
4675
-
4676
- RUNNING IN WINDOWS
4677
- Drag and drop files or folders onto the exiftool executable to display
4678
- meta information, or rename to "exiftool.exe" and run from the command
4679
- line to access all exiftool features.
4680
-
4681
- This stand-alone Windows version allows simple command-line options to
4682
- be added to the name of the executable (in brackets and separated by
4683
- spaces at the end of the name), providing a mechanism to use options
4684
- when launched via the mouse. For example, changing the executable name
4685
- to "exiftool(-a -u -g1 -w txt).exe" gives a drag-and-drop utility which
4686
- generates sidecar ".txt" files with detailed meta information. As
4687
- shipped, the -k option is added to cause exiftool to pause before
4688
- terminating (keeping the command window open). Options may also be added
4689
- to the "Target" property of a Windows shortcut to the executable.
4690
-
4691
- SYNOPSIS
4692
- Reading
4693
- exiftool [*OPTIONS*] [-*TAG*...] [--*TAG*...] *FILE*...
4694
-
4695
- Writing
4696
- exiftool [*OPTIONS*] -*TAG*[+-<]=[*VALUE*]... *FILE*...
4697
-
4698
- Copying
4699
- exiftool [*OPTIONS*] -tagsFromFile *SRCFILE* [-[*DSTTAG*<]*SRCTAG*...]
4700
- *FILE*...
4701
-
4702
- Other
4703
- exiftool [ -ver | -list[w|f|r|wf|g[*NUM*]|d|x|geo] ]
4704
-
4705
- For specific examples, see the EXAMPLES sections below.
4706
-
4707
- This documentation is displayed if exiftool is run without an input
4708
- *FILE* when one is expected.
4709
-
4710
- DESCRIPTION
4711
- A command-line interface to Image::ExifTool, used for reading and
4712
- writing meta information in a variety of file types. *FILE* is one or
4713
- more source file names, directory names, or "-" for the standard input.
4714
- Metadata is read from source files and printed in readable form to the
4715
- console (or written to output text files with -w).
4716
-
4717
- To write or delete metadata, tag values are assigned using
4718
- -*TAG*=[*VALUE*], and/or the -geotag, -csv= or -json= options. To copy
4719
- or move metadata, the -tagsFromFile feature is used. By default the
4720
- original files are preserved with "_original" appended to their names --
4721
- be sure to verify that the new files are OK before erasing the
4722
- originals. Once in write mode, exiftool will ignore any read-specific
4723
- options.
4724
-
4725
- Note: If *FILE* is a directory name then only supported file types in
4726
- the directory are processed (in write mode only writable types are
4727
- processed). However, files may be specified by name, or the -ext option
4728
- may be used to force processing of files with any extension. Hidden
4729
- files in the directory are also processed. Adding the -r option causes
4730
- subdirectories to be processed recursively, but subdirectories with
4731
- names beginning with "." are skipped unless -r. is used.
4732
-
4733
- Below is a list of file types and meta information formats currently
4734
- supported by ExifTool (r = read, w = write, c = create):
4735
-
4736
- File Types
4737
- ------------+-------------+-------------+-------------+------------
4738
- 360 r/w | DOCX r | ITC r | NUMBERS r | RAW r/w
4739
- 3FR r | DPX r | J2C r | NXD r | RIFF r
4740
- 3G2 r/w | DR4 r/w/c | JNG r/w | O r | RSRC r
4741
- 3GP r/w | DSS r | JP2 r/w | ODP r | RTF r
4742
- 7Z r | DV r | JPEG r/w | ODS r | RW2 r/w
4743
- A r | DVB r/w | JSON r | ODT r | RWL r/w
4744
- AA r | DVR-MS r | JXL r/w | OFR r | RWZ r
4745
- AAC r | DYLIB r | K25 r | OGG r | RM r
4746
- AAE r | EIP r | KDC r | OGV r | SEQ r
4747
- AAX r/w | EPS r/w | KEY r | ONP r | SKETCH r
4748
- ACR r | EPUB r | LA r | OPUS r | SO r
4749
- AFM r | ERF r/w | LFP r | ORF r/w | SR2 r/w
4750
- AI r/w | EXE r | LIF r | ORI r/w | SRF r
4751
- AIFF r | EXIF r/w/c | LNK r | OTF r | SRW r/w
4752
- APE r | EXR r | LRV r/w | PAC r | SVG r
4753
- ARQ r/w | EXV r/w/c | M2TS r | PAGES r | SWF r
4754
- ARW r/w | F4A/V r/w | M4A/V r/w | PBM r/w | THM r/w
4755
- ASF r | FFF r/w | MACOS r | PCD r | TIFF r/w
4756
- AVI r | FITS r | MAX r | PCX r | TORRENT r
4757
- AVIF r/w | FLA r | MEF r/w | PDB r | TTC r
4758
- AZW r | FLAC r | MIE r/w/c | PDF r/w | TTF r
4759
- BMP r | FLIF r/w | MIFF r | PEF r/w | TXT r
4760
- BPG r | FLV r | MKA r | PFA r | VCF r
4761
- BTF r | FPF r | MKS r | PFB r | VNT r
4762
- C2PA r | FPX r | MKV r | PFM r | VRD r/w/c
4763
- CHM r | GIF r/w | MNG r/w | PGF r | VSD r
4764
- COS r | GLV r/w | MOBI r | PGM r/w | WAV r
4765
- CR2 r/w | GPR r/w | MODD r | PLIST r | WDP r/w
4766
- CR3 r/w | GZ r | MOI r | PICT r | WEBP r/w
4767
- CRM r/w | HDP r/w | MOS r/w | PMP r | WEBM r
4768
- CRW r/w | HDR r | MOV r/w | PNG r/w | WMA r
4769
- CS1 r/w | HEIC r/w | MP3 r | PPM r/w | WMV r
4770
- CSV r | HEIF r/w | MP4 r/w | PPT r | WPG r
4771
- CUR r | HTML r | MPC r | PPTX r | WTV r
4772
- CZI r | ICC r/w/c | MPG r | PS r/w | WV r
4773
- DCM r | ICO r | MPO r/w | PSB r/w | X3F r/w
4774
- DCP r/w | ICS r | MQV r/w | PSD r/w | XCF r
4775
- DCR r | IDML r | MRC r | PSP r | XISF r
4776
- DFONT r | IIQ r/w | MRW r/w | QTIF r/w | XLS r
4777
- DIVX r | IND r/w | MXF r | R3D r | XLSX r
4778
- DJVU r | INSP r/w | NEF r/w | RA r | XMP r/w/c
4779
- DLL r | INSV r | NKA r | RAF r/w | ZIP r
4780
- DNG r/w | INX r | NKSC r/w | RAM r |
4781
- DOC r | ISO r | NRW r/w | RAR r |
4782
-
4783
- Meta Information
4784
- ----------------------+----------------------+---------------------
4785
- EXIF r/w/c | CIFF r/w | Ricoh RMETA r
4786
- GPS r/w/c | AFCP r/w | Picture Info r
4787
- IPTC r/w/c | Kodak Meta r/w | Adobe APP14 r
4788
- XMP r/w/c | FotoStation r/w | MPF r
4789
- MakerNotes r/w/c | PhotoMechanic r/w | Stim r
4790
- Photoshop IRB r/w/c | JPEG 2000 r | DPX r
4791
- ICC Profile r/w/c | DICOM r | APE r
4792
- MIE r/w/c | Flash r | Vorbis r
4793
- JFIF r/w/c | FlashPix r | SPIFF r
4794
- Ducky APP12 r/w/c | QuickTime r | DjVu r
4795
- PDF r/w/c | Matroska r | M2TS r
4796
- PNG r/w/c | MXF r | PE/COFF r
4797
- Canon VRD r/w/c | PrintIM r | AVCHD r
4798
- Nikon Capture r/w/c | FLAC r | ZIP r
4799
- GeoTIFF r/w/c | ID3 r | (and more)
4800
-
4801
- OPTIONS
4802
- Case is not significant for any command-line option (including tag and
4803
- group names), except for single-character options when the corresponding
4804
- upper-case option exists. Many single-character options have equivalent
4805
- long-name versions (shown in brackets), and some options have inverses
4806
- which are invoked with a leading double-dash. Unrecognized options are
4807
- interpreted as tag names (for this reason, multiple single-character
4808
- options may NOT be combined into one argument). Contrary to standard
4809
- practice, options may appear after source file names on the exiftool
4810
- command line.
4811
-
4812
- Option Overview
4813
- Tag operations
4814
-
4815
- -TAG or --TAG Extract or exclude specified tag
4816
- -TAG[+-^]=[VALUE] Write new value for tag
4817
- -TAG[+-]<=DATFILE Write tag value from contents of file
4818
- -[+]TAG[+-]<SRCTAG Copy tag value (see -tagsFromFile)
4819
-
4820
- -tagsFromFile SRCFILE Copy tag values from file
4821
- -x TAG (-exclude) Exclude specified tag
4822
-
4823
- Input-output text formatting
4824
-
4825
- -args (-argFormat) Format metadata as exiftool arguments
4826
- -b (-binary) Output metadata in binary format
4827
- -c FMT (-coordFormat) Set format for GPS coordinates
4828
- -charset [[TYPE=]CHARSET] Specify encoding for special characters
4829
- -csv[[+]=CSVFILE] Export/import tags in CSV format
4830
- -csvDelim STR Set delimiter for CSV file
4831
- -d FMT (-dateFormat) Set format for date/time values
4832
- -D (-decimal) Show tag ID numbers in decimal
4833
- -E,-ex,-ec (-escape(HTML|XML|C))Escape tag values for HTML, XML or C
4834
- -f (-forcePrint) Force printing of all specified tags
4835
- -g[NUM...] (-groupHeadings) Organize output by tag group
4836
- -G[NUM...] (-groupNames) Print group name for each tag
4837
- -h (-htmlFormat) Use HTML formatting for output
4838
- -H (-hex) Show tag ID numbers in hexadecimal
4839
- -htmlDump[OFFSET] Generate HTML-format binary dump
4840
- -j[[+]=JSONFILE] (-json) Export/import tags in JSON format
4841
- -l (-long) Use long 2-line output format
4842
- -L (-latin) Use Windows Latin1 encoding
4843
- -lang [LANG] Set current language
4844
- -listItem INDEX Extract specific item from a list
4845
- -n (--printConv) No print conversion
4846
- -p[-] STR (-printFormat) Print output in specified format
4847
- -php Export tags as a PHP Array
4848
- -s[NUM] (-short) Short output format (-s for tag names)
4849
- -S (-veryShort) Very short output format
4850
- -sep STR (-separator) Set separator string for list items
4851
- -sort Sort output alphabetically
4852
- -struct Enable output of structured information
4853
- -t (-tab) Output in tab-delimited list format
4854
- -T (-table) Output in tabular format
4855
- -v[NUM] (-verbose) Print verbose messages
4856
- -w[+|!] EXT (-textOut) Write (or overwrite!) output text files
4857
- -W[+|!] FMT (-tagOut) Write output text file for each tag
4858
- -Wext EXT (-tagOutExt) Write only specified file types with -W
4859
- -X (-xmlFormat) Use RDF/XML output format
4860
-
4861
- Processing control
4862
-
4863
- -a (-duplicates) Allow duplicate tags to be extracted
4864
- -e (--composite) Do not generate composite tags
4865
- -ee[NUM] (-extractEmbedded) Extract information from embedded files
4866
- -ext[+] EXT (-extension) Process files with specified extension
4867
- -F[OFFSET] (-fixBase) Fix the base for maker notes offsets
4868
- -fast[NUM] Increase speed when extracting metadata
4869
- -fileOrder[NUM] [-]TAG Set file processing order
4870
- -i DIR (-ignore) Ignore specified directory name
4871
- -if[NUM] EXPR Conditionally process files
4872
- -m (-ignoreMinorErrors) Ignore minor errors and warnings
4873
- -o OUTFILE (-out) Set output file or directory name
4874
- -overwrite_original Overwrite original by renaming tmp file
4875
- -overwrite_original_in_place Overwrite original by copying tmp file
4876
- -P (-preserve) Preserve file modification date/time
4877
- -password PASSWD Password for processing protected files
4878
- -progress[NUM][:[TITLE]] Show file progress count
4879
- -q (-quiet) Quiet processing
4880
- -r[.] (-recurse) Recursively process subdirectories
4881
- -scanForXMP Brute force XMP scan
4882
- -u (-unknown) Extract unknown tags
4883
- -U (-unknown2) Extract unknown binary tags too
4884
- -wm MODE (-writeMode) Set mode for writing/creating tags
4885
- -z (-zip) Read/write compressed information
4886
-
4887
- Other options
4888
-
4889
- -@ ARGFILE Read command-line arguments from file
4890
- -k (-pause) Pause before terminating
4891
- -list[w|f|wf|g[NUM]|d|x] List various exiftool capabilities
4892
- -ver Print exiftool version number
4893
- -- End of options
4894
-
4895
- Special features
4896
-
4897
- -geotag TRKFILE Geotag images from specified GPS log
4898
- -globalTimeShift SHIFT Shift all formatted date/time values
4899
- -use MODULE Add features from plug-in module
4900
-
4901
- Utilities
4902
-
4903
- -delete_original[!] Delete "_original" backups
4904
- -restore_original Restore from "_original" backups
4905
-
4906
- Advanced options
4907
-
4908
- -api OPT[[^]=[VAL]] Set ExifTool API option
4909
- -common_args Define common arguments
4910
- -config CFGFILE Specify configuration file name
4911
- -echo[NUM] TEXT Echo text to stdout or stderr
4912
- -efile[NUM][!] TXTFILE Save names of files with errors
4913
- -execute[NUM] Execute multiple commands on one line
4914
- -fileNUM ALTFILE Load tags from alternate file
4915
- -list_dir List directories, not their contents
4916
- -srcfile FMT Process a different source file
4917
- -stay_open FLAG Keep reading -@ argfile even after EOF
4918
- -userParam PARAM[[^]=[VAL]] Set user parameter (API UserParam opt)
4919
-
4920
- Option Details
4921
- Tag operations
4922
- -*TAG*
4923
- Extract information for the specified tag (eg. "-CreateDate").
4924
- Multiple tags may be specified in a single command. A tag name is
4925
- the handle by which a piece of information is referenced. See
4926
- Image::ExifTool::TagNames for documentation on available tag names.
4927
- A tag name may include leading group names separated by colons (eg.
4928
- "-EXIF:CreateDate", or "-Doc1:XMP:Creator"), and each group name
4929
- may be prefixed by a digit to specify family number (eg.
4930
- "-1IPTC:City"). (Note that the API SavePath and SaveFormat options
4931
- must be used for the family 5 and 6 groups respectively to be
4932
- available.) Use the -listg option to list available group names by
4933
- family.
4934
-
4935
- A special tag name of "All" may be used to indicate all meta
4936
- information (ie. -All). This is particularly useful when a group
4937
- name is specified to extract all information in a group (but beware
4938
- that unless the -a option is also used, some tags in the group may
4939
- be suppressed by same-named tags in other groups). The wildcard
4940
- characters "?" and "*" may be used in a tag name to match any
4941
- single character and zero or more characters respectively. These
4942
- may not be used in a group name, with the exception that a group
4943
- name of "*" (or "All") may be used to extract all instances of a
4944
- tag (as if -a was used). Note that arguments containing wildcards
4945
- must be quoted on the command line of most systems to prevent shell
4946
- globbing.
4947
-
4948
- A "#" may be appended to the tag name to disable the print
4949
- conversion on a per-tag basis (see the -n option). This may also be
4950
- used when writing or copying tags.
4951
-
4952
- If no tags are specified, all available information is extracted
4953
- (as if "-All" had been specified).
4954
-
4955
- Note: Descriptions, not tag names, are shown by default when
4956
- extracting information. Use the -s option to see the tag names
4957
- instead.
4958
-
4959
- --*TAG*
4960
- Exclude specified tag from extracted information. Same as the -x
4961
- option. Group names and wildcards are permitted as described above
4962
- for -TAG. Once excluded from the output, a tag may not be
4963
- re-included by a subsequent option. May also be used following a
4964
- -tagsFromFile option to exclude tags from being copied (when
4965
- redirecting to another tag, it is the source tag that should be
4966
- excluded), or to exclude groups from being deleted when deleting
4967
- all information (eg. "-all= --exif:all" deletes all but EXIF
4968
- information). But note that this will not exclude individual tags
4969
- from a group delete (unless a family 2 group is specified, see note
4970
- 4 below). Instead, individual tags may be recovered using the
4971
- -tagsFromFile option (eg. "-all= -tagsfromfile @ -artist").
4972
-
4973
- To speed processing when reading XMP, exclusions in XMP groups also
4974
- bypass processing of the corresponding XMP property and any
4975
- contained properties. For example, "--xmp-crs:all" may speed
4976
- processing significantly in cases where a large number of XMP-crs
4977
- tags exist. To use this feature to bypass processing of a specific
4978
- XMP property, the property name must be used instead of the
4979
- ExifTool tag name (eg. "--xmp-crs:dabs"). Also, "XMP-all" may be
4980
- used to to indicate any XMP namespace (eg. "--xmp-all:dabs").
4981
-
4982
- -*TAG*[+-^]=[*VALUE*]
4983
- Write a new value for the specified tag (eg. "-comment=wow"), or
4984
- delete the tag if no *VALUE* is given (eg. "-comment="). "+=" and
4985
- "-=" are used to add or remove existing entries from a list, or to
4986
- shift date/time values (see Image::ExifTool::Shift.pl and note 6
4987
- below for more details). "+=" may also be used to increment
4988
- numerical values (or decrement if *VALUE* is negative), and "-="
4989
- may be used to conditionally delete or replace a tag (see "WRITING
4990
- EXAMPLES" for examples). "^=" is used to write an empty string
4991
- instead of deleting the tag when no *VALUE* is given, but otherwise
4992
- it is equivalent to "=". (Note that the caret must be quoted on the
4993
- Windows command line.)
4994
-
4995
- *TAG* may contain one or more leading family 0, 1, 2 or 7 group
4996
- names, prefixed by optional family numbers, and separated colons.
4997
- If no group name is specified, the tag is created in the preferred
4998
- group, and updated in any other location where a same-named tag
4999
- already exists. The preferred group in JPEG and TIFF-format images
5000
- is the first group in the following list where *TAG* is valid: 1)
5001
- EXIF, 2) IPTC, 3) XMP.
5002
-
5003
- The wildcards "*" and "?" may be used in tag names to assign the
5004
- same value to multiple tags. When specified with wildcards,
5005
- "Unsafe" tags are not written. A tag name of "All" is equivalent to
5006
- "*" (except that it doesn't require quoting, while arguments with
5007
- wildcards do on systems with shell globbing), and is often used
5008
- when deleting all metadata (ie. "-All=") or an entire group (eg.
5009
- "-XMP-dc:All=", see note 4 below). Note that not all groups are
5010
- deletable, and that the JPEG APP14 "Adobe" group is not removed by
5011
- default with "-All=" because it may affect the appearance of the
5012
- image. However, color space information is removed, so the colors
5013
- may be affected (but this may be avoided by copying back the tags
5014
- defined by the ColorSpaceTags shortcut). Use the -listd option for
5015
- a complete list of deletable groups, and see note 5 below regarding
5016
- the "APP" groups. Also, within an image some groups may be
5017
- contained within others, and these groups are removed if the
5018
- containing group is deleted:
5019
-
5020
- JPEG Image:
5021
- - Deleting EXIF or IFD0 also deletes ExifIFD, GlobParamIFD,
5022
- GPS, IFD1, InteropIFD, MakerNotes, PrintIM and SubIFD.
5023
- - Deleting ExifIFD also deletes InteropIFD and MakerNotes.
5024
- - Deleting Photoshop also deletes IPTC.
5025
-
5026
- TIFF Image:
5027
- - Deleting EXIF only removes ExifIFD which also deletes
5028
- InteropIFD and MakerNotes.
5029
-
5030
- MOV/MP4 Video:
5031
- - Deleting ItemList also deletes Keys tags.
5032
-
5033
- Notes:
5034
-
5035
- 1) Many tag values may be assigned in a single command. If two
5036
- assignments affect the same tag, the latter takes precedence
5037
- (except for list-type tags, for which both values are written).
5038
-
5039
- 2) In general, MakerNotes tags are considered "Permanent", and may
5040
- be edited but not created or deleted individually. This avoids many
5041
- potential problems, including the inevitable compatibility problems
5042
- with OEM software which may be very inflexible about the
5043
- information it expects to find in the maker notes.
5044
-
5045
- 3) Changes to PDF files by ExifTool are reversible (by deleting the
5046
- update with "-PDF-update:all=") because the original information is
5047
- never actually deleted from the file. So ExifTool alone may not be
5048
- used to securely edit metadata in PDF files.
5049
-
5050
- 4) Specifying "-GROUP:all=" deletes the entire group as a block
5051
- only if a single family 0 or 1 group is specified. Otherwise all
5052
- deletable tags in the specified group(s) are removed individually,
5053
- and in this case is it possible to exclude individual tags from a
5054
- mass delete. For example, "-time:all --Exif:Time:All" removes all
5055
- deletable Time tags except those in the EXIF. This difference also
5056
- applies if family 2 is specified when deleting all groups. For
5057
- example, "-2all:all=" deletes tags individually, while "-all:all="
5058
- deletes entire blocks.
5059
-
5060
- 5) The "APP" group names ("APP0" through "APP15") are used to
5061
- delete JPEG application segments which are not associated with
5062
- another deletable group. For example, specifying "-APP14:All=" will
5063
- NOT delete the APP14 "Adobe" segment because this is accomplished
5064
- with "-Adobe:All". But note that these unnamed APP segments may not
5065
- be excluded with "--APPxx:all" when deleting all information.
5066
-
5067
- 6) When shifting a value, the shift is applied to the original
5068
- value of the tag, overriding any other values previously assigned
5069
- to the tag on the same command line. To shift a date/time value and
5070
- copy it to another tag in the same operation, use the
5071
- -globalTimeShift option.
5072
-
5073
- Special feature: Integer values may be specified in hexadecimal
5074
- with a leading "0x", and simple rational values may be specified as
5075
- fractions.
5076
-
5077
- -*TAG*<=*DATFILE* or -*TAG*<=*FMT*
5078
- Set the value of a tag from the contents of file *DATFILE*. The
5079
- file name may also be given by a *FMT* string where %d, %f and %e
5080
- represent the directory, file name and extension of the original
5081
- *FILE* (see the -w option for more details). Note that quotes are
5082
- required around this argument to prevent shell redirection since it
5083
- contains a "<" symbol. If *DATFILE*/*FMT* is not provided, the
5084
- effect is the same as "-TAG=", and the tag is simply deleted. "+<="
5085
- or "-<=" may also be used to add or delete specific list entries,
5086
- or to shift date/time values.
5087
-
5088
- -tagsFromFile *SRCFILE* or *FMT*
5089
- Copy tag values from *SRCFILE* to *FILE*. Tag names on the command
5090
- line after this option specify the tags to be copied, or excluded
5091
- from the copy. Wildcards are permitted in these tag names. If no
5092
- tags are specified, then all possible tags (see note 1 below) from
5093
- the source file are copied to same-named tags in the preferred
5094
- location of the output file (the same as specifying "-all"). More
5095
- than one -tagsFromFile option may be used to copy tags from
5096
- multiple files.
5097
-
5098
- By default, this option will update any existing and writable
5099
- same-named tags in the output *FILE*, but will create new tags only
5100
- in their preferred groups. This allows some information to be
5101
- automatically transferred to the appropriate group when copying
5102
- between images of different formats. However, if a group name is
5103
- specified for a tag then the information is written only to this
5104
- group (unless redirected to another group, see below). If "All" is
5105
- used as a group name, then the specified tag(s) are written to the
5106
- same family 1 group they had in the source file (ie. the same
5107
- specific location, like ExifIFD or XMP-dc). For example, the common
5108
- operation of copying all writable tags to the same specific
5109
- locations in the output *FILE* is achieved by adding "-all:all". A
5110
- different family may be specified by adding a leading family number
5111
- to the group name (eg. "-0all:all" preserves the same general
5112
- location, like EXIF or XMP).
5113
-
5114
- *SRCFILE* may be the same as *FILE* to move information around
5115
- within a single file. In this case, "@" may be used to represent
5116
- the source file (ie. "-tagsFromFile @"), permitting this feature to
5117
- be used for batch processing multiple files. Specified tags are
5118
- then copied from each file in turn as it is rewritten. For advanced
5119
- batch use, the source file name may also be specified using a *FMT*
5120
- string in which %d, %f and %e represent the directory, file name
5121
- and extension of *FILE*. (eg. the current *FILE* would be
5122
- represented by "%d%f.%e", with the same effect as "@"). See the -w
5123
- option for *FMT* string examples.
5124
-
5125
- A powerful redirection feature allows a destination tag to be
5126
- specified for each copied tag. With this feature, information may
5127
- be written to a tag with a different name or group. This is done
5128
- using "-*DSTTAG*<*SRCTAG*" or "-*SRCTAG*>*DSTTAG*" on the command
5129
- line after -tagsFromFile, and causes the value of *SRCTAG* to be
5130
- copied from *SRCFILE* and written to *DSTTAG* in *FILE*. Has no
5131
- effect unless *SRCTAG* exists in *SRCFILE*. Note that this argument
5132
- must be quoted to prevent shell redirection, and there is no "="
5133
- sign as when assigning new values. Source and/or destination tags
5134
- may be prefixed by a group name and/or suffixed by "#". Wildcards
5135
- are allowed in both the source and destination tag names. A
5136
- destination group and/or tag name of "All" or "*" writes to the
5137
- same family 1 group and/or tag name as the source (but the family
5138
- may be specified by adding a leading number to the group name, eg.
5139
- "0All" writes to the same family 0 group as the source). If no
5140
- destination group is specified, the information is written to the
5141
- preferred group. Whitespace around the ">" or "<" is ignored. As a
5142
- convenience, "-tagsFromFile @" is assumed for any redirected tags
5143
- which are specified without a prior -tagsFromFile option. Copied
5144
- tags may also be added or deleted from a list with arguments of the
5145
- form "-*SRCTAG*+<*DSTTAG*" or "-*SRCTAG*-<*DSTTAG*" (but see Note 5
5146
- below).
5147
-
5148
- An extension of the redirection feature allows strings involving
5149
- tag names to be used on the right hand side of the "<" symbol with
5150
- the syntax "-*DSTTAG*<*STR*", where tag names in *STR* are prefixed
5151
- with a "$" symbol. See the -p option and the "Advanced formatting
5152
- feature" section for more details about this syntax. Strings
5153
- starting with a "=" sign must insert a single space after the "<"
5154
- to avoid confusion with the "<=" operator which sets the tag value
5155
- from the contents of a file. A single space at the start of the
5156
- string is removed if it exists, but all other whitespace in the
5157
- string is preserved. See note 8 below about using the redirection
5158
- feature with list-type stags, shortcuts or when using wildcards in
5159
- tag names.
5160
-
5161
- See "COPYING EXAMPLES" for examples using -tagsFromFile.
5162
-
5163
- Notes:
5164
-
5165
- 1) Some tags (generally tags which may affect the appearance of the
5166
- image) are considered "Unsafe" to write, and are only copied if
5167
- specified explicitly (ie. no wildcards). See the tag name
5168
- documentation for more details about "Unsafe" tags.
5169
-
5170
- 2) Be aware of the difference between excluding a tag from being
5171
- copied (--*TAG*), and deleting a tag (-*TAG*=). Excluding a tag
5172
- prevents it from being copied to the destination image, but
5173
- deleting will remove a pre-existing tag from the image.
5174
-
5175
- 3) The maker note information is copied as a block, so it isn't
5176
- affected like other information by subsequent tag assignments on
5177
- the command line, and individual makernote tags may not be excluded
5178
- from a block copy. Also, since the PreviewImage referenced from the
5179
- maker notes may be rather large, it is not copied, and must be
5180
- transferred separately if desired.
5181
-
5182
- 4) The order of operations is to copy all specified tags at the
5183
- point of the -tagsFromFile option in the command line. Any tag
5184
- assignment to the right of the -tagsFromFile option is made after
5185
- all tags are copied. For example, new tag values are set in the
5186
- order One, Two, Three then Four with this command:
5187
-
5188
- exiftool -One=1 -tagsFromFile s.jpg -Two -Four=4 -Three d.jpg
5189
-
5190
- This is significant in the case where an overlap exists between the
5191
- copied and assigned tags because later operations may override
5192
- earlier ones.
5193
-
5194
- 5) The normal behaviour of copied tags differs from that of
5195
- assigned tags for list-type tags and conditional replacements
5196
- because each copy operation on a tag overrides any previous
5197
- operations. While this avoids duplicate list items when copying
5198
- groups of tags from a file containing redundant information, it
5199
- also prevents values of different tags from being copied into the
5200
- same list when this is the intent. To accumulate values from
5201
- different operations into the same list, add a "+" after the
5202
- initial "-" of the argument. For example:
5203
-
5204
- exiftool -tagsfromfile @ '-subject<make' '-+subject<model' ...
5205
-
5206
- Similarly, "-+DSTTAG" must be used when conditionally replacing a
5207
- tag to prevent overriding earlier conditions.
5208
-
5209
- 6) The -a option (allow duplicate tags) is always in effect when
5210
- copying tags from *SRCFILE*, but the highest priority tag is always
5211
- copied last so it takes precedence.
5212
-
5213
- 7) Structured tags are copied by default when copying tags. See the
5214
- -struct option for details.
5215
-
5216
- 8) With the redirection feature, copying a tag directly (ie.
5217
- "'-*DSTTAG*<*SRCTAG*'") is not the same as interpolating its value
5218
- inside a string (ie. "'-*DSTTAG*<$*SRCTAG*'") for source tags which
5219
- are list-type tags, shortcut tags, tag names containing wildcards,
5220
- or UserParam variables. When copying directly, the values of each
5221
- matching source tag are copied individually to the destination tag
5222
- (as if they were separate assignments). However, when interpolated
5223
- inside a string, list items and the values of shortcut tags are
5224
- concatenated (with a separator set by the -sep option), and
5225
- wildcards are not allowed. Also, UserParam variables are available
5226
- only when interpolated in a string. Another difference is that a
5227
- minor warning is generated if a tag doesn't exist when
5228
- interpolating its value in a string (with "$"), but isn't when
5229
- copying the tag directly.
5230
-
5231
- Finally, the behaviour is different when a destination tag or group
5232
- of "All" is used. When copying directly, a destination group and/or
5233
- tag name of "All" writes to the same family 1 group and/or tag name
5234
- as the source. But when interpolated in a string, the identity of
5235
- the source tags are lost and the value is written to all possible
5236
- groups/tags. For example, the string form must be used in the
5237
- following command since the intent is to set the value of all
5238
- existing date/time tags from "CreateDate":
5239
-
5240
- exiftool "-time:all<$createdate" -wm w FILE
5241
-
5242
- -x *TAG* (-exclude)
5243
- Exclude the specified tag. There may be multiple -x options. This
5244
- has the same effect as --*TAG* on the command line. See the --*TAG*
5245
- documentation above for a complete description.
5246
-
5247
- Input-output text formatting
5248
- Note that trailing spaces are removed from extracted values for most
5249
- output text formats. The exceptions are -b, -csv, -j and -X.
5250
-
5251
- -args (-argFormat)
5252
- Output information in the form of exiftool arguments, suitable for
5253
- use with the -@ option when writing. May be combined with the -G
5254
- option to include group names. This feature may be used to
5255
- effectively copy tags between images, but allows the metadata to be
5256
- altered by editing the intermediate file ("out.args" in this
5257
- example):
5258
-
5259
- exiftool -args -G1 --filename --directory src.jpg > out.args
5260
- exiftool -@ out.args -sep ", " dst.jpg
5261
-
5262
- Note: Be careful when copying information with this technique since
5263
- it is easy to write tags which are normally considered "Unsafe".
5264
- For instance, the FileName and Directory tags are excluded in the
5265
- example above to avoid renaming and moving the destination file.
5266
- Also note that the second command above will produce warning
5267
- messages for any tags which are not writable.
5268
-
5269
- As well, the -sep option should be used as in the second command
5270
- above to maintain separate list items when writing metadata back to
5271
- image files, and the -struct option may be used when extracting to
5272
- preserve structured XMP information.
5273
-
5274
- -b, --b (-binary, --binary)
5275
- Output requested metadata in binary format without tag names or
5276
- descriptions (-b or -binary). This option is mainly used for
5277
- extracting embedded images or other binary data, but it may also be
5278
- useful for some text strings since control characters (such as
5279
- newlines) are not replaced by '.' as they are in the default
5280
- output. By default, list items are separated by a newline when
5281
- extracted with the -b option, but this may be changed (see the -sep
5282
- option for details). May be combined with -j, -php or -X to extract
5283
- binary data in JSON, PHP or XML format, but note that "Unsafe" tags
5284
- are not extracted as binary unless they are specified explicitly or
5285
- the API RequestAll option is set to 3 or higher.
5286
-
5287
- With a leading double dash (--b or --binary), tags which contain
5288
- binary data are suppressed in the output when reading.
5289
-
5290
- -c *FMT* (-coordFormat)
5291
- Set the print format for GPS coordinates. *FMT* uses the same
5292
- syntax as a "printf" format string. The specifiers correspond to
5293
- degrees, minutes and seconds in that order, but minutes and seconds
5294
- are optional. For example, the following table gives the output for
5295
- the same coordinate using various formats:
5296
-
5297
- FMT Output
5298
- ------------------- ------------------
5299
- "%d deg %d' %.2f"\" 54 deg 59' 22.80" (default for reading)
5300
- "%d %d %.8f" 54 59 22.80000000 (default for copying)
5301
- "%d deg %.4f min" 54 deg 59.3800 min
5302
- "%.6f degrees" 54.989667 degrees
5303
-
5304
- Notes:
5305
-
5306
- 1) To avoid loss of precision, the default coordinate format is
5307
- different when copying tags using the -tagsFromFile option.
5308
-
5309
- 2) If the hemisphere is known, a reference direction (N, S, E or W)
5310
- is appended to each printed coordinate, but adding a "+" or "-" to
5311
- the format specifier (eg. "%+.6f" or "%-.6f") prints a signed
5312
- coordinate instead. ("+" adds a leading "+" for positive
5313
- coordinates, but "-" does not.)
5314
-
5315
- 3) This print formatting may be disabled with the -n option to
5316
- extract coordinates as signed decimal degrees.
5317
-
5318
- -charset [[*TYPE*=]*CHARSET*]
5319
- If *TYPE* is "ExifTool" or not specified, this option sets the
5320
- ExifTool character encoding for output tag values when reading and
5321
- input values when writing, with a default of "UTF8". If no
5322
- *CHARSET* is given, a list of available character sets is returned.
5323
- Valid *CHARSET* values are:
5324
-
5325
- CHARSET Alias(es) Description
5326
- ---------- --------------- ----------------------------------
5327
- UTF8 cp65001, UTF-8 UTF-8 characters (default)
5328
- Latin cp1252, Latin1 Windows Latin1 (West European)
5329
- Latin2 cp1250 Windows Latin2 (Central European)
5330
- Cyrillic cp1251, Russian Windows Cyrillic
5331
- Greek cp1253 Windows Greek
5332
- Turkish cp1254 Windows Turkish
5333
- Hebrew cp1255 Windows Hebrew
5334
- Arabic cp1256 Windows Arabic
5335
- Baltic cp1257 Windows Baltic
5336
- Vietnam cp1258 Windows Vietnamese
5337
- Thai cp874 Windows Thai
5338
- DOSLatinUS cp437 DOS Latin US
5339
- DOSLatin1 cp850 DOS Latin1
5340
- DOSCyrillic cp866 DOS Cyrillic
5341
- MacRoman cp10000, Roman Macintosh Roman
5342
- MacLatin2 cp10029 Macintosh Latin2 (Central Europe)
5343
- MacCyrillic cp10007 Macintosh Cyrillic
5344
- MacGreek cp10006 Macintosh Greek
5345
- MacTurkish cp10081 Macintosh Turkish
5346
- MacRomanian cp10010 Macintosh Romanian
5347
- MacIceland cp10079 Macintosh Icelandic
5348
- MacCroatian cp10082 Macintosh Croatian
5349
-
5350
- *TYPE* may be "FileName" to specify the encoding of file names on
5351
- the command line (ie. *FILE* arguments). In Windows, this triggers
5352
- use of wide-character i/o routines, thus providing support for
5353
- Unicode file names. See the "WINDOWS UNICODE FILE NAMES" section
5354
- below for details.
5355
-
5356
- Other values of *TYPE* listed below are used to specify the
5357
- internal encoding of various meta information formats.
5358
-
5359
- TYPE Description Default
5360
- --------- ------------------------------------------- -------
5361
- EXIF Internal encoding of EXIF "ASCII" strings (none)
5362
- ID3 Internal encoding of ID3v1 information Latin
5363
- IPTC Internal IPTC encoding to assume when Latin
5364
- IPTC:CodedCharacterSet is not defined
5365
- Photoshop Internal encoding of Photoshop IRB strings Latin
5366
- QuickTime Internal encoding of QuickTime strings MacRoman
5367
- RIFF Internal encoding of RIFF strings 0
5368
-
5369
- See <https://exiftool.org/faq.html#Q10> for more information about
5370
- coded character sets, and the Image::ExifTool Options for more
5371
- details about the -charset settings.
5372
-
5373
- -csv[[+]=*CSVFILE*]
5374
- Export information in CSV format, or import information if
5375
- *CSVFILE* is specified. When importing, the CSV file must be in
5376
- exactly the same format as the exported file. The first row of the
5377
- *CSVFILE* must be the ExifTool tag names (with optional group
5378
- names) for each column of the file, and values must be separated by
5379
- commas. A special "SourceFile" column specifies the files
5380
- associated with each row of information (and a SourceFile of "*"
5381
- may be used to define default tags to be imported for all files
5382
- which are combined with any tags specified for the specific
5383
- SourceFile processed). The -csvDelim option may be used to change
5384
- the input/output field delimiter if something other than a comma is
5385
- required.
5386
-
5387
- The following examples demonstrate basic use of the -csv option:
5388
-
5389
- # generate CSV file with common tags from all images in a directory
5390
- exiftool -common -csv dir > out.csv
5391
-
5392
- # update metadata for all images in a directory from CSV file
5393
- exiftool -csv=a.csv dir
5394
-
5395
- When importing, empty values are ignored unless the -f option is
5396
- used and the API MissingTagValue is set to an empty string (in
5397
- which case the tag is deleted). Also, FileName and Directory
5398
- columns are ignored if they exist (ie. ExifTool will not attempt to
5399
- write these tags with a CSV import), but all other columns are
5400
- imported. To force a tag to be deleted, use the -f option and set
5401
- the value to "-" in the CSV file (or to the MissingTagValue if this
5402
- API option was used). Multiple databases may be imported in a
5403
- single command.
5404
-
5405
- When exporting a CSV file, the -g or -G option adds group names to
5406
- the tag headings. If the -a option is used to allow duplicate tag
5407
- names, the duplicate tags are only included in the CSV output if
5408
- the column headings are unique. Adding the -G4 option ensures a
5409
- unique column heading for each tag. The -b option may be added to
5410
- output binary data, encoded in base64 if necessary (indicated by
5411
- ASCII "base64:" as the first 7 bytes of the value). Values may also
5412
- be encoded in base64 if the -charset option is used and the value
5413
- contains invalid characters.
5414
-
5415
- When exporting specific tags, the CSV columns are arranged in the
5416
- same order as the specified tags provided the column headings
5417
- exactly match the specified tag names, otherwise the columns are
5418
- sorted in alphabetical order.
5419
-
5420
- When importing from a CSV file, only files specified on the command
5421
- line are processed. Any extra entries in the CSV file are ignored.
5422
-
5423
- List-type tags are stored as simple strings in a CSV file, but the
5424
- -sep option may be used to split them back into separate items when
5425
- importing.
5426
-
5427
- Special feature: -csv+=*CSVFILE* may be used to add items to
5428
- existing lists. This affects only list-type tags. Also applies to
5429
- the -j option.
5430
-
5431
- Note that this option is fundamentally different than all other
5432
- output format options because it requires information from all
5433
- input files to be buffered in memory before the output is written.
5434
- This may result in excessive memory usage when processing a very
5435
- large number of files with a single command. Also, it makes this
5436
- option incompatible with the -w and -W options. When processing a
5437
- large number of files, it is recommended to either use the JSON
5438
- (-j) or XML (-X) output format, or use -p to generate a
5439
- fixed-column CSV file instead of using the -csv option.
5440
-
5441
- -csvDelim *STR*
5442
- Set the delimiter for separating CSV entries for CSV file
5443
- input/output via the -csv option. *STR* may contain "\t", "\n",
5444
- "\r" and "\\" to represent TAB, LF, CR and '\' respectively. A
5445
- double quote is not allowed in the delimiter. Default is ','.
5446
-
5447
- -d *FMT* (-dateFormat)
5448
- Set the format for date/time tag values. The *FMT* string may
5449
- contain formatting codes beginning with a percent character ("%")
5450
- to represent the various components of a date/time value. The
5451
- specifics of the *FMT* syntax are system dependent -- consult the
5452
- "strftime" man page on your system for details. The default format
5453
- is equivalent to "%Y:%m:%d %H:%M:%S". This option has no effect on
5454
- date-only or time-only tags and ignores timezone information if
5455
- present. ExifTool adds a %f format code to represent fractional
5456
- seconds, and supports an optional width to specify the number of
5457
- digits after the decimal point (eg. %3f would give something like
5458
- .437), and a minus sign to drop the decimal point (eg. "%-3f" would
5459
- give 437). Only one -d option may be used per command. Requires
5460
- POSIX::strptime or Time::Piece for the inversion conversion when
5461
- writing.
5462
-
5463
- -D (-decimal)
5464
- Show tag ID number in decimal when extracting information.
5465
-
5466
- -E, -ex, -ec (-escapeHTML, -escapeXML, -escapeC)
5467
- Escape characters in output tag values for HTML (-E), XML (-ex) or
5468
- C (-ec). For HTML, all characters with Unicode code points above
5469
- U+007F are escaped as well as the following 5 characters: & (&amp;)
5470
- ' (&#39;) " (&quot;) > (&gt;) and < (&lt;). For XML, only these 5
5471
- characters are escaped. The -E option is implied with -h, and -ex
5472
- is implied with -X. For C, all control characters and the backslash
5473
- are escaped. The inverse conversion is applied when writing tags.
5474
-
5475
- -f (-forcePrint)
5476
- Force printing of tags even if they don't exist. This option
5477
- applies to tags specified on the command line, or with the -p, -if
5478
- or -tagsFromFile options. When -f is used, the value of any missing
5479
- tag is set to a dash ("-") by default, but this may be configured
5480
- via the API MissingTagValue option. -f is also used to add a
5481
- 'flags' attribute to the -listx output, or to allow tags to be
5482
- deleted when writing with the -csv=*CSVFILE* feature.
5483
-
5484
- -g[*NUM*][:*NUM*...] (-groupHeadings)
5485
- Organize output by tag group. *NUM* specifies a group family
5486
- number, and may be 0 (general location), 1 (specific location), 2
5487
- (category), 3 (document number), 4 (instance number), 5 (metadata
5488
- path), 6 (EXIF/TIFF format), 7 (tag ID) or 8 (file number). -g0 is
5489
- assumed if a family number is not specified. May be combined with
5490
- other options to add group names to the output. Multiple families
5491
- may be specified by separating them with colons. By default the
5492
- resulting group name is simplified by removing any leading "Main:"
5493
- and collapsing adjacent identical group names, but this can be
5494
- avoided by placing a colon before the first family number (eg.
5495
- -g:3:1). Use the -listg option to list group names for a specified
5496
- family. The API SavePath and SaveFormat options are automatically
5497
- enabled if the respective family 5 or 6 group names are requested.
5498
- See the API GetGroup documentation for more information.
5499
-
5500
- -G[*NUM*][:*NUM*...] (-groupNames)
5501
- Same as -g but print group name for each tag. -G0 is assumed if
5502
- *NUM* is not specified. May be combined with a number of other
5503
- options to add group names to the output. Note that *NUM* may be
5504
- added wherever -G is mentioned in the documentation. See the -g
5505
- option above for details.
5506
-
5507
- -h (-htmlFormat)
5508
- Use HTML table formatting for output. Implies the -E option. The
5509
- formatting options -D, -H, -g, -G, -l and -s may be used in
5510
- combination with -h to influence the HTML format.
5511
-
5512
- -H (-hex)
5513
- Show tag ID number in hexadecimal when extracting information.
5514
-
5515
- -htmlDump[*OFFSET*]
5516
- Generate a dynamic web page containing a hex dump of the EXIF
5517
- information. This can be a very powerful tool for low-level
5518
- analysis of EXIF information. The -htmlDump option is also invoked
5519
- if the -v and -h options are used together. The verbose level
5520
- controls the maximum length of the blocks dumped. An *OFFSET* may
5521
- be given to specify the base for displayed offsets. If not
5522
- provided, the EXIF/TIFF base offset is used. Use -htmlDump0 for
5523
- absolute offsets. Currently only EXIF/TIFF and JPEG information is
5524
- dumped, but the -u option can be used to give a raw hex dump of
5525
- other file formats.
5526
-
5527
- -j[[+]=*JSONFILE*] (-json)
5528
- Use JSON (JavaScript Object Notation) formatting for console
5529
- output, or import JSON file if *JSONFILE* is specified. This option
5530
- may be combined with -g to organize the output into objects by
5531
- group, or -G to add group names to each tag. List-type tags with
5532
- multiple items are output as JSON arrays unless -sep is used. By
5533
- default XMP structures are flattened into individual tags in the
5534
- JSON output, but the original structure may be preserved with the
5535
- -struct option (this also causes all list-type XMP tags to be
5536
- output as JSON arrays, otherwise single-item lists would be output
5537
- as simple strings). The -a option is implied when -json is used,
5538
- but entries with identical JSON names are suppressed in the output.
5539
- (-G4 may be used to ensure that all tags have unique JSON names.)
5540
- Adding the -D or -H option changes tag values to JSON objects with
5541
- "val" and "id" fields, and adding -l adds a "desc" field, and a
5542
- "num" field if the numerical value is different from the converted
5543
- "val". The -b option may be added to output binary data, encoded in
5544
- base64 if necessary (indicated by ASCII "base64:" as the first 7
5545
- bytes of the value), and -t may be added to include tag table
5546
- information (see -t for details). The JSON output is UTF-8
5547
- regardless of any -L or -charset option setting, but the UTF-8
5548
- validation is disabled if a character set other than UTF-8 is
5549
- specified. Note that ExifTool quotes JSON values only if they don't
5550
- look like numbers (regardless of the original storage format or the
5551
- relevant metadata specification).
5552
-
5553
- If *JSONFILE* is specified, the file is imported and the tag
5554
- definitions from the file are used to set tag values on a per-file
5555
- basis. The special "SourceFile" entry in each JSON object
5556
- associates the information with a specific target file. An object
5557
- with a missing SourceFile or a SourceFile of "*" defines default
5558
- tags for all target files which are combined with any tags
5559
- specified for the specific SourceFile processed. The imported JSON
5560
- file must have the same format as the exported JSON files with the
5561
- exception that options exporting JSON objects instead of simple
5562
- values are not compatible with the import file format (ie. export
5563
- with -D, -H, -l, or -T is not compatible, and use -G instead of
5564
- -g). Additionally, tag names in the input JSON file may be suffixed
5565
- with a "#" to disable print conversion.
5566
-
5567
- Unlike CSV import, empty values are not ignored, and will cause an
5568
- empty value to be written if supported by the specific metadata
5569
- type. Tags are deleted by using the -f option and setting the tag
5570
- value to "-" (or to the MissingTagValue setting if this API option
5571
- was used). Importing with -j+=*JSONFILE* causes new values to be
5572
- added to existing lists.
5573
-
5574
- -l (-long)
5575
- Use long 2-line Canon-style output format. Adds a description and
5576
- unconverted value (if it is different from the converted value) to
5577
- the XML, JSON or PHP output when -X, -j or -php is used. May also
5578
- be combined with -listf, -listr or -listwf to add descriptions of
5579
- the file types.
5580
-
5581
- -L (-latin)
5582
- Use Windows Latin1 encoding (cp1252) for output tag values instead
5583
- of the default UTF-8. When writing, -L specifies that input text
5584
- values are Latin1 instead of UTF-8. Equivalent to "-charset latin".
5585
-
5586
- -lang [*LANG*]
5587
- Set current language for tag descriptions and converted values.
5588
- *LANG* is "de", "fr", "ja", etc. Use -lang with no other arguments
5589
- to get a list of available languages. The default language is "en"
5590
- if -lang is not specified. Note that tag/group names are always
5591
- English, independent of the -lang setting, and translation of
5592
- warning/error messages has not yet been implemented. May also be
5593
- combined with -listx to output descriptions in one language only.
5594
-
5595
- By default, ExifTool uses UTF-8 encoding for special characters,
5596
- but the -L or -charset option may be used to invoke other
5597
- encodings. Note that ExifTool uses Unicode::LineBreak if available
5598
- to help preserve the column alignment of the plain text output for
5599
- languages with a variable-width character set.
5600
-
5601
- Currently, the language support is not complete, but users are
5602
- welcome to help improve this by submitting their own translations.
5603
- To submit a translation, follow these steps (you must have Perl
5604
- installed for this):
5605
-
5606
- 1. Download and unpack the latest Image-ExifTool full distribution.
5607
-
5608
- 2. "cd" into the Image-ExifTool directory.
5609
-
5610
- 3. Run this command to make an XML file of the desired tags (eg.
5611
- EXIF):
5612
-
5613
- ./exiftool -listx -exif:all > out.xml
5614
-
5615
- 4. Copy this text into a file called "import.pl" in the exiftool
5616
- directory:
5617
-
5618
- push @INC, 'lib';
5619
- require Image::ExifTool::TagInfoXML;
5620
- my $file = shift or die "Expected XML file name\n";
5621
- $Image::ExifTool::TagInfoXML::makeMissing = shift;
5622
- Image::ExifTool::TagInfoXML::BuildLangModules($file,8);
5623
-
5624
- 5. Run the "import.pl" script to Import the XML file, generating
5625
- the "MISSING" entries for your language (eg. Russian):
5626
-
5627
- perl import.pl out.xml ru
5628
-
5629
- 6. Edit the generated language module
5630
- lib/Image/ExifTool/Lang/ru.pm, and search and replace all "MISSING"
5631
- strings in the file with your translations.
5632
-
5633
- 7. Email the module ('ru.pm' in this example) to philharvey66 at
5634
- gmail.com
5635
-
5636
- 8. Thank you!!
5637
-
5638
- -listItem *INDEX*
5639
- For list-type tags, this causes only the item with the specified
5640
- index to be extracted. *INDEX* is 0 for the first item in the list.
5641
- Negative indices may also be used to reference items from the end
5642
- of the list. Has no effect on single-valued tags. Also applies to
5643
- tag values when copying from a tag, and in -if conditions.
5644
-
5645
- -n (--printConv)
5646
- Disable print conversion for all tags. By default, extracted values
5647
- are converted to a more human-readable format, but the -n option
5648
- disables this conversion, revealing the machine-readable values.
5649
- For example:
5650
-
5651
- > exiftool -Orientation -S a.jpg
5652
- Orientation: Rotate 90 CW
5653
- > exiftool -Orientation -S -n a.jpg
5654
- Orientation: 6
5655
-
5656
- The print conversion may also be disabled on a per-tag basis by
5657
- suffixing the tag name with a "#" character:
5658
-
5659
- > exiftool -Orientation# -Orientation -S a.jpg
5660
- Orientation: 6
5661
- Orientation: Rotate 90 CW
5662
-
5663
- These techniques may also be used to disable the inverse print
5664
- conversion when writing. For example, the following commands all
5665
- have the same effect:
5666
-
5667
- > exiftool -Orientation="Rotate 90 CW" a.jpg
5668
- > exiftool -Orientation=6 -n a.jpg
5669
- > exiftool -Orientation#=6 a.jpg
5670
-
5671
- -p[-] *STR* or *FMTFILE* (-printFormat)
5672
- Print output in the format specified by the given string or file.
5673
- The argument is interpreted as a string unless a file of that name
5674
- exists, in which case the string is loaded from the contents of the
5675
- file. Tag names in the format string or file begin with a "$"
5676
- symbol and may contain leading group names and/or a trailing "#"
5677
- (to disable print conversion). Case is not significant. Braces "{}"
5678
- may be used around the tag name to separate it from subsequent text
5679
- (and must be used if subsequent text begins with an alphanumeric
5680
- character, hyphen, underline, colon or number sign). Use $$ to
5681
- represent a "$" symbol, and $/ for a newline. When the string
5682
- argument is used (ie. *STR*), a newline is added to the end of the
5683
- string unless -p- is specified or the -b option is used.
5684
-
5685
- Multiple -p options may be used. Lines beginning with "#[HEAD]" and
5686
- "#[TAIL]" are output before the first processed file and after the
5687
- last processed file respectively. Lines beginning with "#[SECT]"
5688
- and "#[ENDS]" are output before and after each section of files. A
5689
- section is defined as a group of consecutive files with the same
5690
- section header (eg. files are grouped by directory if "#[SECT]"
5691
- contains $directory). Lines beginning with "#[BODY]" and lines not
5692
- beginning with "#" are output for each processed file. Lines
5693
- beginning with "#[IF]" are not output, but all BODY lines are
5694
- skipped if any tag on an IF line doesn't exist. Other lines
5695
- beginning with "#" are ignored. (To output a line beginning with
5696
- "#", use "#[BODY]#".) For example, this format file:
5697
-
5698
- # this is a comment line
5699
- #[HEAD]-- Generated by ExifTool $exifToolVersion --
5700
- File: $FileName - $DateTimeOriginal
5701
- (f/$Aperture, ${ShutterSpeed}s, ISO $EXIF:ISO)
5702
- #[TAIL]-- end --
5703
-
5704
- with this command:
5705
-
5706
- exiftool -p test.fmt a.jpg b.jpg
5707
-
5708
- produces output like this:
5709
-
5710
- -- Generated by ExifTool 12.91 --
5711
- File: a.jpg - 2003:10:31 15:44:19
5712
- (f/5.6, 1/60s, ISO 100)
5713
- File: b.jpg - 2006:05:23 11:57:38
5714
- (f/8.0, 1/13s, ISO 100)
5715
- -- end --
5716
-
5717
- The values of List-type tags with multiple items, Shortcut tags
5718
- representing multiple tags, and matching tags when the "All" group
5719
- is specified are joined according the -sep option setting when
5720
- interpolated in the string. (Note that when "All" is used as a
5721
- group name, dupicate tags are included regardless of the Duplicates
5722
- option setting.) When "All" is used as a tag name, a value of 1 is
5723
- returned if any tag exists in the specified group, or 0 otherwise
5724
- (unless the "All" group is also specified, in which case the values
5725
- of all matching tags are joined).
5726
-
5727
- When -ee (-extractEmbedded) is combined with -p, embedded documents
5728
- are effectively processed as separate input files.
5729
-
5730
- If a specified tag does not exist, a minor warning is issued and
5731
- the line with the missing tag is not printed. However, the -f
5732
- option may be used to set the value of missing tags to '-' (but
5733
- this may be configured via the API MissingTagValue option), or the
5734
- -m option may be used to ignore minor warnings and leave the
5735
- missing values empty. Alternatively, -q -q may be used to simply
5736
- suppress the warning messages.
5737
-
5738
- The "Advanced formatting feature" may be used to modify the values
5739
- of individual tags within the -p option string.
5740
-
5741
- Note that the API RequestTags option is automatically set for all
5742
- tags used in the *FMTFILE* or *STR*. This allows all other tags to
5743
- be ignored using -API IgnoreTags=all, resulting in reduced memory
5744
- usage and increased speed.
5745
-
5746
- -php Format output as a PHP Array. The -g, -G, -D, -H, -l, -sep and
5747
- -struct options combine with -php, and duplicate tags are handled
5748
- in the same way as with the -json option. As well, the -b option
5749
- may be added to output binary data, and -t may be added to include
5750
- tag table information (see -t for details). Here is a simple
5751
- example showing how this could be used in a PHP script:
5752
-
5753
- <?php
5754
- eval('$array=' . `exiftool -php -q image.jpg`);
5755
- print_r($array);
5756
- ?>
5757
-
5758
- -s[*NUM*] (-short)
5759
- Short output format. Prints tag names instead of descriptions. Add
5760
- *NUM* or up to 3 -s options for even shorter formats:
5761
-
5762
- -s1 or -s - print tag names instead of descriptions
5763
- -s2 or -s -s - no extra spaces to column-align values
5764
- -s3 or -s -s -s - print values only (no tag names)
5765
-
5766
- Also effective when combined with -t, -h, -X or -listx options.
5767
-
5768
- -S (-veryShort)
5769
- Very short format. The same as -s2 or two -s options. Tag names are
5770
- printed instead of descriptions, and no extra spaces are added to
5771
- column-align values.
5772
-
5773
- -sep *STR* (-separator)
5774
- Specify separator string for items in list-type tags. When reading,
5775
- the default is to join list items with ", ". When writing, this
5776
- option causes values assigned to list-type tags to be split into
5777
- individual items at each substring matching *STR* (otherwise they
5778
- are not split by default). Space characters in *STR* match zero or
5779
- more whitespace characters in the value.
5780
-
5781
- Note that an empty separator ("") is allowed, and will join items
5782
- with no separator when reading, or split the value into individual
5783
- characters when writing.
5784
-
5785
- For pure binary output (-b used without -j, -php or -X), the first
5786
- -sep option specifies a list-item separator, and a second -sep
5787
- option specifies a terminator for the end of the list (or after
5788
- each value if not a list). In these strings, "\n", "\r" and "\t"
5789
- may be used to represent a newline, carriage return and tab
5790
- respectively. By default, binary list items are separated by a
5791
- newline, and no terminator is added.
5792
-
5793
- -sort, --sort
5794
- Sort output by tag description, or by tag name if the -s option is
5795
- used. When sorting by description, the sort order will depend on
5796
- the -lang option setting. Without the -sort option, tags appear in
5797
- the order they were specified on the command line, or if not
5798
- specified, the order they were extracted from the file. By default,
5799
- tags are organized by groups when combined with the -g or -G
5800
- option, but this grouping may be disabled with --sort.
5801
-
5802
- -struct, --struct
5803
- Output structured XMP information instead of flattening to
5804
- individual tags. This option works well when combined with the XML
5805
- (-X) and JSON (-j) output formats. For other output formats, XMP
5806
- structures and lists are serialized into the same format as when
5807
- writing structured information (see
5808
- <https://exiftool.org/struct.html> for details). When copying,
5809
- structured tags are copied by default unless --struct is used to
5810
- disable this feature (although flattened tags may still be copied
5811
- by specifying them individually unless -struct is used). These
5812
- options have no effect when assigning new values since both
5813
- flattened and structured tags may always be used when writing.
5814
-
5815
- -t (-tab)
5816
- Output a tab-delimited list of description/values (useful for
5817
- database import). May be combined with -s to print tag names
5818
- instead of descriptions, or -S to print tag values only,
5819
- tab-delimited on a single line. The -t option may be combined with
5820
- -j, -php or -X to add tag table information ("table", tag "id", and
5821
- "index" for cases where multiple conditional tags exist with the
5822
- same ID).
5823
-
5824
- -T (-table)
5825
- Output tag values in table form. Equivalent to -t -S -q -f.
5826
-
5827
- -v[*NUM*] (-verbose)
5828
- Print verbose messages. *NUM* specifies the level of verbosity in
5829
- the range 0-5, with higher numbers being more verbose. If *NUM* is
5830
- not given, then each -v option increases the level of verbosity by
5831
- 1. With any level greater than 0, most other options are ignored
5832
- and normal console output is suppressed unless specific tags are
5833
- extracted. Using -v0 causes the console output buffer to be flushed
5834
- after each line (which may be useful to avoid delays when piping
5835
- exiftool output), and prints the name of each processed file when
5836
- writing and the new file name when renaming, moving or copying.
5837
- Verbose levels above -v0 do not flush after each line. Also see the
5838
- -progress option.
5839
-
5840
- -w[+|!] *EXT* or *FMT* (-textOut)
5841
- Write console output to files with names ending in *EXT*, one for
5842
- each source file. The output file name is obtained by replacing the
5843
- source file extension (including the '.') with the specified
5844
- extension (and a '.' is added to the start of *EXT* if it doesn't
5845
- already contain one). Alternatively, a *FMT* string may be used to
5846
- give more control over the output file name and directory. In the
5847
- format string, %d, %f and %e represent the directory, filename and
5848
- extension of the source file, and %c represents a copy number which
5849
- is automatically incremented if the file already exists. %d
5850
- includes the trailing '/' if necessary, but %e does not include the
5851
- leading '.'. For example:
5852
-
5853
- -w %d%f.txt # same effect as "-w txt"
5854
- -w dir/%f_%e.out # write files to "dir" as "FILE_EXT.out"
5855
- -w dir2/%d%f.txt # write to "dir2", keeping dir structure
5856
- -w a%c.txt # write to "a.txt" or "a1.txt" or "a2.txt"...
5857
-
5858
- Existing files will not be changed unless an exclamation point is
5859
- added to the option name (ie. -w! or -textOut!) to overwrite the
5860
- file, or a plus sign (ie. -w+ or -textOut+) to append to the
5861
- existing file. Both may be used (ie. -w+! or -textOut+!) to
5862
- overwrite output files that didn't exist before the command was
5863
- run, and append the output from multiple source files. For example,
5864
- to write one output file for all source files in each directory:
5865
-
5866
- exiftool -filename -createdate -T -w+! %d/out.txt -r DIR
5867
-
5868
- Capitalized format codes %D, %F, %E and %C provide slightly
5869
- different alternatives to the lower case versions. %D does not
5870
- include the trailing '/', %F is the full filename including
5871
- extension, %E includes the leading '.', and %C increments the count
5872
- for each processed file (see below).
5873
-
5874
- Notes:
5875
-
5876
- 1) In a Windows BAT file the "%" character is represented by "%%",
5877
- so an argument like "%d%f.txt" is written as "%%d%%f.txt".
5878
-
5879
- 2) If the argument for -w does not contain a valid format code (eg.
5880
- %f), then it is interpreted as a file extension, but there are
5881
- three different ways to create a single output file from multiple
5882
- source files:
5883
-
5884
- # 1. Shell redirection
5885
- exiftool FILE1 FILE2 ... > out.txt
5886
-
5887
- # 2. With the -w option and a zero-width format code
5888
- exiftool -w+! %0fout.txt FILE1 FILE2 ...
5889
-
5890
- # 3. With the -W option (see the -W option below)
5891
- exiftool -W+! out.txt FILE1 FILE2 ...
5892
-
5893
- Advanced features:
5894
-
5895
- A substring of the original file name, directory or extension may
5896
- be taken by specifying a field width immediately following the '%'
5897
- character. If the width is negative, the substring is taken from
5898
- the end. The substring position (characters to ignore at the start
5899
- or end of the string) may be given by a second optional value after
5900
- a decimal point. For example:
5901
-
5902
- Input File Name Format Specifier Output File Name
5903
- ---------------- ---------------- ----------------
5904
- Picture-123.jpg %7f.txt Picture.txt
5905
- Picture-123.jpg %-.4f.out Picture.out
5906
- Picture-123.jpg %7f.%-3f Picture.123
5907
- Picture-123a.jpg Meta%-3.1f.txt Meta123.txt
5908
-
5909
- (Note that special characters may have a width of greater than
5910
- one.)
5911
-
5912
- For %d and %D, the field width/position specifiers may be applied
5913
- to the directory levels instead of substring position by using a
5914
- colon instead of a decimal point in the format specifier. For
5915
- example:
5916
-
5917
- Source Dir Format Result Notes
5918
- ------------ ------ ---------- ------------------
5919
- pics/2012/02 %2:d pics/2012/ take top 2 levels
5920
- pics/2012/02 %-:1d pics/2012/ up one directory level
5921
- pics/2012/02 %:1d 2012/02/ ignore top level
5922
- pics/2012/02 %1:1d 2012/ take 1 level after top
5923
- pics/2012/02 %-1:D 02 bottom level folder name
5924
- /Users/phil %:2d phil/ ignore top 2 levels
5925
-
5926
- (Note that the root directory counts as one level when an absolute
5927
- path is used as in the last example above.)
5928
-
5929
- For %c, these modifiers have a different effects. If a field width
5930
- is given, the copy number is padded with zeros to the specified
5931
- width. A leading '-' adds a dash before the copy number, and a '+'
5932
- adds an underline. By default, the copy number is omitted from the
5933
- first file of a given name, but this can be changed by adding a
5934
- decimal point to the modifier. For example:
5935
-
5936
- -w A%-cZ.txt # AZ.txt, A-1Z.txt, A-2Z.txt ...
5937
- -w B%5c.txt # B.txt, B00001.txt, B00002.txt ...
5938
- -w C%.c.txt # C0.txt, C1.txt, C2.txt ...
5939
- -w D%-.c.txt # D-0.txt, D-1.txt, D-2.txt ...
5940
- -w E%-.4c.txt # E-0000.txt, E-0001.txt, E-0002.txt ...
5941
- -w F%-.4nc.txt # F-0001.txt, F-0002.txt, F-0003.txt ...
5942
- -w G%+c.txt # G.txt, G_1.txt G_2.txt ...
5943
- -w H%-lc.txt # H.txt, H-b.txt, H-c.txt ...
5944
- -w I.%.3uc.txt # I.AAA.txt, I.AAB.txt, I.AAC.txt ...
5945
-
5946
- A special feature allows the copy number to be incremented for each
5947
- processed file by using %C (upper case) instead of %c. This allows
5948
- a sequential number to be added to output file names, even if the
5949
- names are different. For %C, a copy number of zero is not omitted
5950
- as it is with %c. A leading '-' causes the number to be reset at
5951
- the start of each new directory (in the original directory
5952
- structure if the files are being moved), and '+' has no effect. The
5953
- number before the decimal place gives the starting index, the
5954
- number after the decimal place gives the field width. The following
5955
- examples show the output filenames when used with the command
5956
- "exiftool rose.jpg star.jpg jet.jpg ...":
5957
-
5958
- -w %C%f.txt # 0rose.txt, 1star.txt, 2jet.txt
5959
- -w %f-%10C.txt # rose-10.txt, star-11.txt, jet-12.txt
5960
- -w %.3C-%f.txt # 000-rose.txt, 001-star.txt, 002-jet.txt
5961
- -w %57.4C%f.txt # 0057rose.txt, 0058star.txt, 0059jet.txt
5962
-
5963
- All format codes may be modified by 'l' or 'u' to specify lower or
5964
- upper case respectively (ie. %le for a lower case file extension).
5965
- When used to modify %c or %C, the numbers are changed to an
5966
- alphabetical base (see example H above). Also, %c and %C may be
5967
- modified by 'n' to count using natural numbers starting from 1,
5968
- instead of 0 (see example F above).
5969
-
5970
- This same *FMT* syntax is used with the -o and -tagsFromFile
5971
- options, although %c and %C are only valid for output file names.
5972
-
5973
- -W[+|!] *FMT* (-tagOut)
5974
- This enhanced version of the -w option allows a separate output
5975
- file to be created for each extracted tag. See the -w option
5976
- documentation above for details of the basic functionality. Listed
5977
- here are the differences between -W and -w:
5978
-
5979
- 1) With -W, a new output file is created for each extracted tag.
5980
-
5981
- 2) -W supports four additional format codes: %t, %g and %s
5982
- represent the tag name, group name, and suggested extension for the
5983
- output file (based on the format of the data), and %o represents
5984
- the value of the OriginalRawFileName or OriginalFileName tag from
5985
- the input file (including extension). The %g code may be followed
5986
- by a single digit to specify the group family number (eg. %g1),
5987
- otherwise family 0 is assumed. The substring width/position/case
5988
- specifiers may be used with these format codes in exactly the same
5989
- way as with %f and %e.
5990
-
5991
- 3) The argument for -W is interpreted as a file name if it contains
5992
- no format codes. (For -w, this would be a file extension.) This
5993
- change allows a simple file name to be specified, which, when
5994
- combined with the append feature, provides a method to write
5995
- metadata from multiple source files to a single output file without
5996
- the need for shell redirection. For example, the following pairs of
5997
- commands give the same result:
5998
-
5999
- # overwriting existing text file
6000
- exiftool test.jpg > out.txt # shell redirection
6001
- exiftool test.jpg -W+! out.txt # equivalent -W option
6002
-
6003
- # append to existing text file
6004
- exiftool test.jpg >> out.txt # shell redirection
6005
- exiftool test.jpg -W+ out.txt # equivalent -W option
6006
-
6007
- 4) Adding the -v option to -W sends a list of the tags and output
6008
- file names to the console instead of giving a verbose dump of the
6009
- entire file. (Unless appending all output to one file for each
6010
- source file by using -W+ with an output file *FMT* that does not
6011
- contain %t, %g, %s or %o.)
6012
-
6013
- 5) Individual list items are stored in separate files when -W is
6014
- combined with -b, but note that for separate files to be created %c
6015
- or %C must be used in *FMT* to give the files unique names.
6016
-
6017
- -Wext *EXT*, --Wext *EXT* (-tagOutExt)
6018
- This option is used to specify the type of output file(s) written
6019
- by the -W option. An output file is written only if the suggested
6020
- extension matches *EXT*. Multiple -Wext options may be used to
6021
- write more than one type of file. Use --Wext to write all but the
6022
- specified type(s).
6023
-
6024
- -X (-xmlFormat)
6025
- Use ExifTool-specific RDF/XML formatting for console output.
6026
- Implies the -a option, so duplicate tags are extracted. The
6027
- formatting options -b, -D, -H, -l, -s, -sep, -struct and -t may be
6028
- used in combination with -X to affect the output, but note that the
6029
- tag ID (-D, -H and -t), binary data (-b) and structured output
6030
- (-struct) options are not effective for the short output (-s).
6031
- Another restriction of -s is that only one tag with a given group
6032
- and name may appear in the output. Note that the tag ID options
6033
- (-D, -H and -t) will produce non-standard RDF/XML unless the -l
6034
- option is also used.
6035
-
6036
- By default, -X outputs flattened tags, so -struct should be added
6037
- if required to preserve XMP structures. List-type tags with
6038
- multiple values are formatted as an RDF Bag, but they are combined
6039
- into a single string when -s or -sep is used. Using -L changes the
6040
- XML encoding from "UTF-8" to "windows-1252". Other -charset
6041
- settings change the encoding only if there is a corresponding
6042
- standard XML character set. The -b option causes binary data values
6043
- to be written, encoded in base64 if necessary. The -t option adds
6044
- tag table information to the output (see -t for details).
6045
-
6046
- Note: This output is NOT the same as XMP because it uses
6047
- dynamically-generated property names corresponding to the ExifTool
6048
- tag names with ExifTool family 1 group names as namespaces, and not
6049
- the standard XMP properties and namespaces. To write XMP instead,
6050
- use the -o option with an XMP extension for the output file.
6051
-
6052
- Processing control
6053
- -a, --a (-duplicates, --duplicates)
6054
- Allow (-a) or suppress (--a) duplicate tag names to be extracted.
6055
- By default, duplicate tags are suppressed when reading unless the
6056
- -ee or -X options are used or the Duplicates option is enabled in
6057
- the configuration file. When writing, this option allows multiple
6058
- Warning messages to be shown. Duplicate tags are always extracted
6059
- when copying.
6060
-
6061
- -e (--composite)
6062
- Extract existing tags only -- don't generate composite tags.
6063
-
6064
- -ee[*NUM*] (-extractEmbedded)
6065
- Extract information from embedded documents in EPS files, embedded
6066
- EPS information and JPEG and Jpeg2000 images in PDF files, embedded
6067
- MPF images in JPEG and MPO files, streaming metadata in AVCHD
6068
- videos, and the resource fork of Mac OS files. Implies the -a
6069
- option. Use -g3 or -G3 to identify the originating document for
6070
- extracted information. Embedded documents containing sub-documents
6071
- are indicated with dashes in the family 3 group name. (eg. "Doc2-3"
6072
- is the 3rd sub-document of the 2nd embedded document.) Note that
6073
- this option may increase processing time substantially, especially
6074
- for PDF files with many embedded images or videos with streaming
6075
- metadata.
6076
-
6077
- When used with -ee, the -p option is evaluated for each embedded
6078
- document as if it were a separate input file. This allows, for
6079
- example, generation of GPS track logs from timed metadata in
6080
- videos. See <https://exiftool.org/geotag.html#Inverse> for
6081
- examples.
6082
-
6083
- Setting *NUM* to 2 causes the H264 video stream in MP4 videos to be
6084
- parsed until the first Supplemental Enhancement Information (SEI)
6085
- message is decoded, or 3 to parse the entire H624 stream and decode
6086
- all SEI information. For M2TS videos, a setting of 3 causes the
6087
- entire file to be parsed in search of unlisted programs which may
6088
- contain timed GPS.
6089
-
6090
- -ext[+] *EXT*, --ext *EXT* (-extension)
6091
- Process only files with (-ext) or without (--ext) a specified
6092
- extension. There may be multiple -ext and --ext options. A plus
6093
- sign may be added (ie. -ext+) to add the specified extension to the
6094
- normally processed files. EXT may begin with a leading ".", which
6095
- is ignored. Case is not significant. "*" may be used to process
6096
- files with any extension (or none at all), as in the last three
6097
- examples:
6098
-
6099
- exiftool -ext JPG DIR # process only JPG files
6100
- exiftool --ext cr2 --ext dng DIR # supported files but CR2/DNG
6101
- exiftool -ext+ txt DIR # supported files plus TXT
6102
- exiftool -ext "*" DIR # process all files
6103
- exiftool -ext "*" --ext xml DIR # process all but XML files
6104
- exiftool -ext "*" --ext . DIR # all but those with no ext
6105
-
6106
- Using this option has two main advantages over specifying "*.*EXT*"
6107
- on the command line: 1) It applies to files in subdirectories when
6108
- combined with the -r option. 2) The -ext option is
6109
- case-insensitive, which is useful when processing files on
6110
- case-sensitive filesystems.
6111
-
6112
- Note that all files specified on the command line will be processed
6113
- regardless of extension unless the -ext option is used.
6114
-
6115
- -F[*OFFSET*] (-fixBase)
6116
- Fix the base for maker notes offsets. A common problem with some
6117
- image editors is that offsets in the maker notes are not adjusted
6118
- properly when the file is modified. This may cause the wrong values
6119
- to be extracted for some maker note entries when reading the edited
6120
- file. This option allows an integer *OFFSET* to be specified for
6121
- adjusting the maker notes base offset. If no *OFFSET* is given,
6122
- ExifTool takes its best guess at the correct base. Note that
6123
- exiftool will automatically fix the offsets for images which store
6124
- original offset information (eg. newer Canon models). Offsets are
6125
- fixed permanently if -F is used when writing EXIF to an image. eg)
6126
-
6127
- exiftool -F -exif:resolutionunit=inches image.jpg
6128
-
6129
- -fast[*NUM*]
6130
- Increase speed of extracting information. With -fast (or -fast1),
6131
- ExifTool will not scan to the end of a JPEG image to check for an
6132
- AFCP or PreviewImage trailer, or past the first comment in GIF
6133
- images or the audio/video data in WAV/AVI files to search for
6134
- additional metadata. These speed benefits are small when reading
6135
- images directly from disk, but can be substantial if piping images
6136
- through a network connection. For more substantial speed benefits,
6137
- -fast2 also causes exiftool to avoid extracting any EXIF MakerNote
6138
- information, and to stop processing at the IDAT chunk of PNG images
6139
- and the mdat atom of QuickTime-format files (but note that some
6140
- files may store metadata after this). -fast3 avoids extracting
6141
- metadata from the file, and returns only pseudo System tags, but
6142
- still reads the file header to obtain an educated guess at
6143
- FileType. -fast4 doesn't even read the file header, and returns
6144
- only System tags and a FileType based on the file extension. -fast5
6145
- also disables generation of the Composite tags (like -e). Has no
6146
- effect when writing.
6147
-
6148
- Note that a separate -fast setting may be used for evaluation of a
6149
- -if condition, or when ordering files with the -fileOrder option.
6150
- See the -if and -fileOrder options for details.
6151
-
6152
- -fileOrder[*NUM*] [-]*TAG*
6153
- Set file processing order according to the sorted value of the
6154
- specified *TAG*. Without this option, files are processed in the
6155
- order returned by the system, which is commonly by file name, but
6156
- this is filesystem dependent. For example, to process files in
6157
- order of date:
6158
-
6159
- exiftool -fileOrder DateTimeOriginal DIR
6160
-
6161
- Additional -fileOrder options may be added for secondary sort keys.
6162
- Numbers are sorted numerically, and all other values are sorted
6163
- alphabetically. Files missing the specified tag are sorted last.
6164
- The sort order may be reversed by prefixing the tag name with a "-"
6165
- (eg. "-fileOrder -createdate"). Print conversion of the sorted
6166
- values is disabled with the -n option, or a "#" appended to the tag
6167
- name. Other formatting options (eg. -d) have no effect on the
6168
- sorted values. Note that the -fileOrder option can incur large
6169
- performance penalty since it involves an additional initial
6170
- processing pass of all files, but this impact may be reduced by
6171
- specifying a *NUM* to effectively set the -fast level for the
6172
- initial pass. For example, -fileOrder4 may be used if *TAG* is a
6173
- pseudo System tag. If multiple -fileOrder options are used, the
6174
- extraction is done at the lowest -fast level. Note that files are
6175
- sorted across directory boundaries if multiple input directories
6176
- are specified.
6177
-
6178
- -i *DIR* (-ignore)
6179
- Ignore specified directory name. *DIR* may be either an individual
6180
- folder name, or a full path. If a full path is specified, it must
6181
- match the Directory tag exactly to be ignored. Use multiple -i
6182
- options to ignore more than one directory name. A special *DIR*
6183
- value of "SYMLINKS" (case sensitive) may be specified to avoid
6184
- recursing into directories which are symbolic links when the -r
6185
- option is used. As well, a value of "HIDDEN" (case sensitive) may
6186
- be used to ignore files with names that start with a "." (ie.
6187
- hidden files on Unix systems) when scanning a directory.
6188
-
6189
- -if[*NUM*] *EXPR*
6190
- Specify a condition to be evaluated before processing each *FILE*.
6191
- *EXPR* is a Perl-like logic expression containing tag names
6192
- prefixed by "$" symbols. It is evaluated with the tags from each
6193
- *FILE* in turn, and the file is processed only if the expression
6194
- returns true. Unlike Perl variable names, tag names are not case
6195
- sensitive and may contain a hyphen. As well, tag names may have a
6196
- leading group names separated by colons, and/or a trailing "#"
6197
- character to disable print conversion. The expression $GROUP:all
6198
- evaluates to 1 if any tag exists in the specified "GROUP", or 0
6199
- otherwise (see note 2 below). When multiple -if options are used,
6200
- all conditions must be satisfied to process the file. Returns an
6201
- exit status of 2 if all files fail the condition. Below are a few
6202
- examples:
6203
-
6204
- # extract shutterspeed from all Canon images in a directory
6205
- exiftool -shutterspeed -if "$make eq 'Canon'" dir
6206
-
6207
- # add one hour to all images created on or after Apr. 2, 2006
6208
- exiftool -alldates+=1 -if "$CreateDate ge '2006:04:02'" dir
6209
-
6210
- # set EXIF ISO value if possible, unless it is set already
6211
- exiftool "-exif:iso<iso" -if "not $exif:iso" dir
6212
-
6213
- # find images containing a specific keyword (case insensitive)
6214
- exiftool -if "$keywords =~ /harvey/i" -filename dir
6215
-
6216
- Adding *NUM* to the -if option causes a separate processing pass to
6217
- be executed for evaluating *EXPR* at a -fast level given by *NUM*
6218
- (see the -fast option documentation for details). Without *NUM*,
6219
- only one processing pass is done at the level specified by the
6220
- -fast option. For example, using -if5 is possible if *EXPR* uses
6221
- only pseudo System tags, and may significantly speed processing if
6222
- enough files fail the condition.
6223
-
6224
- The expression has access to the current ExifTool object through
6225
- $self, and the following special functions are available to allow
6226
- short-circuiting of the file processing. Both functions have a
6227
- return value of 1. Case is significant for function names.
6228
-
6229
- End() - end processing after this file
6230
- EndDir() - end processing of files in the current directory
6231
- after this file (not compatible with -fileOrder)
6232
-
6233
- Notes:
6234
-
6235
- 1) The -n and -b options also apply to tags used in *EXPR*.
6236
-
6237
- 2) Some binary data blocks are not extracted unless specified
6238
- explicitly. These tags are not available for use in the -if
6239
- condition unless they are also specified on the command line. The
6240
- alternative is to use the $GROUP:all syntax. (eg. Use $exif:all
6241
- instead of $exif in *EXPR* to test for the existence of EXIF tags.)
6242
-
6243
- 3) Tags in the string are interpolated in a similar way to -p
6244
- before the expression is evaluated. In this interpolation, $/ is
6245
- converted to a newline and $$ represents a single "$" symbol. So
6246
- Perl variables, if used, require a double "$", and regular
6247
- expressions ending in $/ must use $$/ instead.
6248
-
6249
- 4) The condition accesses only tags from the file being processed
6250
- unless the -fileNUM option is used to read an alternate file and
6251
- the corresponding family 8 group name is specified for the tag. See
6252
- the -fileNUM option details for more information.
6253
-
6254
- 5) The -a option has no effect on the evaluation of the expression,
6255
- and the values of duplicate tags are accessible only by specifying
6256
- a group name (such as a family 4 instance number, eg. $Copy1:TAG,
6257
- $Copy2:TAG, etc).
6258
-
6259
- 6) A special "OK" UserParam is available to test the success of the
6260
- previous command when -execute was used, and may be used like any
6261
- other tag in the condition (ie. "$OK").
6262
-
6263
- 7) The API RequestTags option is automatically set for all tags
6264
- used in the -if condition.
6265
-
6266
- -m (-ignoreMinorErrors)
6267
- Ignore minor errors and warnings. This enables writing to files
6268
- with minor errors and disables some validation checks which could
6269
- result in minor warnings. Generally, minor errors/warnings indicate
6270
- a problem which usually won't result in loss of metadata if
6271
- ignored. However, there are exceptions, so ExifTool leaves it up to
6272
- you to make the final decision. Minor errors and warnings are
6273
- indicated by "[minor]" at the start of the message. Warnings which
6274
- affect processing when ignored are indicated by "[Minor]" (with a
6275
- capital "M"). Note that this causes missing values in
6276
- -tagsFromFile, -p and -if strings to be set to an empty string
6277
- rather than an undefined value.
6278
-
6279
- -o *OUTFILE* or *FMT* (-out)
6280
- Set the output file or directory name when writing information.
6281
- Without this option, when any "real" tags are written the original
6282
- file is renamed to "FILE_original" and output is written to *FILE*.
6283
- When writing only FileName and/or Directory "pseudo" tags, -o
6284
- causes the file to be copied instead of moved, but directories
6285
- specified for either of these tags take precedence over that
6286
- specified by the -o option.
6287
-
6288
- *OUTFILE* may be "-" to write to stdout. The output file name may
6289
- also be specified using a *FMT* string in which %d, %f and %e
6290
- represent the directory, file name and extension of *FILE*. Also,
6291
- %c may be used to add a copy number. See the -w option for *FMT*
6292
- string examples.
6293
-
6294
- The output file is taken to be a directory name if it already
6295
- exists as a directory or if the name ends with '/'. Output
6296
- directories are created if necessary. Existing files will not be
6297
- overwritten. Combining the -overwrite_original option with -o
6298
- causes the original source file to be erased after the output file
6299
- is successfully written.
6300
-
6301
- A special feature of this option allows the creation of certain
6302
- types of files from scratch, or with the metadata from another type
6303
- of file. The following file types may be created using this
6304
- technique:
6305
-
6306
- XMP, EXIF, EXV, MIE, ICC/ICM, VRD, DR4
6307
-
6308
- The output file type is determined by the extension of *OUTFILE*
6309
- (specified as "-.EXT" when writing to stdout). The output file is
6310
- then created from a combination of information in *FILE* (as if the
6311
- -tagsFromFile option was used), and tag values assigned on the
6312
- command line. If no *FILE* is specified, the output file may be
6313
- created from scratch using only tags assigned on the command line.
6314
-
6315
- -overwrite_original
6316
- Overwrite the original *FILE* (instead of preserving it by adding
6317
- "_original" to the file name) when writing information to an image.
6318
- Caution: This option should only be used if you already have
6319
- separate backup copies of your image files. The overwrite is
6320
- implemented by renaming a temporary file to replace the original.
6321
- This deletes the original file and replaces it with the edited
6322
- version in a single operation. When combined with -o, this option
6323
- causes the original file to be deleted if the output file was
6324
- successfully written (ie. the file is moved instead of copied).
6325
-
6326
- -overwrite_original_in_place
6327
- Similar to -overwrite_original except that an extra step is added
6328
- to allow the original file attributes to be preserved. For example,
6329
- on a Mac this causes the original file creation date, type,
6330
- creator, label color, icon, Finder tags, other extended attributes
6331
- and hard links to the file to be preserved (but note that the Mac
6332
- OS resource fork is always preserved unless specifically deleted
6333
- with "-rsrc:all="). This is implemented by opening the original
6334
- file in update mode and replacing its data with a copy of a
6335
- temporary file before deleting the temporary. The extra step
6336
- results in slower performance, so the -overwrite_original option
6337
- should be used instead unless necessary.
6338
-
6339
- Note that this option reverts to the behaviour of the
6340
- -overwrite_original option when also writing the FileName and/or
6341
- Directory tags.
6342
-
6343
- -P (-preserve)
6344
- Preserve the filesystem modification date/time ("FileModifyDate")
6345
- of the original file when writing. Note that some filesystems store
6346
- a creation date (ie. "FileCreateDate" on Windows and Mac systems)
6347
- which is not affected by this option. This creation date is
6348
- preserved on Windows systems where Win32API::File and Win32::API
6349
- are available regardless of this setting. For other systems, the
6350
- -overwrite_original_in_place option may be used if necessary to
6351
- preserve the creation date. The -P option is superseded by any
6352
- value written to the FileModifyDate tag.
6353
-
6354
- -password *PASSWD*
6355
- Specify password to allow processing of password-protected PDF
6356
- documents. If a password is required but not given, a warning is
6357
- issued and the document is not processed. This option is ignored if
6358
- a password is not required.
6359
-
6360
- -progress[NUM][:[*TITLE*]]
6361
- Show the progress when processing files. Without a colon, the
6362
- -progress option adds a progress count in brackets after the name
6363
- of each processed file, giving the current file number and the
6364
- total number of files to be processed. Implies the -v0 option,
6365
- causing the names of processed files to also be printed when
6366
- writing. When combined with the -if option, the total count
6367
- includes all files before the condition is applied, but files that
6368
- fail the condition will not have their names printed. If NUM is
6369
- specified, the progress is shown every NUM input files.
6370
-
6371
- If followed by a colon (ie. -progress:), the console window title
6372
- is set according to the specified *TITLE* string. If no *TITLE* is
6373
- given, a default *TITLE* string of "ExifTool %p%%" is assumed. In
6374
- the string, %f represents the file name, %p is the progress as a
6375
- percent, %r is the progress as a ratio, %##b is a progress bar of
6376
- width "##" (where "##" is an integer specifying the bar width in
6377
- characters, or 20 characters by default if "##" is omitted), and %%
6378
- is a % character. May be combined with the normal -progress option
6379
- to also show the progress count in console messages. (Note: For
6380
- this feature to function correctly on Mac/Linux, stderr must go to
6381
- the console.)
6382
-
6383
- -q (-quiet)
6384
- Quiet processing. One -q suppresses normal informational messages,
6385
- and a second -q suppresses warnings as well. Error messages can not
6386
- be suppressed, although minor errors may be downgraded to warnings
6387
- with the -m option, which may then be suppressed with "-q -q".
6388
-
6389
- -r[.] (-recurse)
6390
- Recursively process files in subdirectories. Only meaningful if
6391
- *FILE* is a directory name. Subdirectories with names beginning
6392
- with "." are not processed unless "." is added to the option name
6393
- (ie. -r. or -recurse.). By default, exiftool will also follow
6394
- symbolic links to directories if supported by the system, but this
6395
- may be disabled with "-i SYMLINKS" (see the -i option for details).
6396
- Combine this with -ext options to control the types of files
6397
- processed.
6398
-
6399
- -scanForXMP
6400
- Scan all files (even unsupported formats) for XMP information
6401
- unless found already. When combined with the -fast option, only
6402
- unsupported file types are scanned. Warning: It can be time
6403
- consuming to scan large files.
6404
-
6405
- -u (-unknown)
6406
- Extract values of unknown tags. Add another -u to also extract
6407
- unknown information from binary data blocks. This option applies to
6408
- tags with numerical tag ID's, and causes tag names like
6409
- "Exif_0xc5d9" to be generated for unknown information. It has no
6410
- effect on information types which have human-readable tag ID's
6411
- (such as XMP), since unknown tags are extracted automatically from
6412
- these formats.
6413
-
6414
- -U (-unknown2)
6415
- Extract values of unknown tags as well as unknown information from
6416
- some binary data blocks. This is the same as two -u options.
6417
-
6418
- -wm *MODE* (-writeMode)
6419
- Set mode for writing/creating tags. *MODE* is a string of one or
6420
- more characters from the list below. The default write mode is
6421
- "wcg".
6422
-
6423
- w - Write existing tags
6424
- c - Create new tags
6425
- g - create new Groups as necessary
6426
-
6427
- For example, use "-wm cg" to only create new tags (and avoid
6428
- editing existing ones).
6429
-
6430
- The level of the group is the SubDirectory level in the metadata
6431
- structure. For XMP or IPTC this is the full XMP/IPTC block (the
6432
- family 0 group), but for EXIF this is the individual IFD (the
6433
- family 1 group).
6434
-
6435
- -z (-zip)
6436
- When reading, causes information to be extracted from .gz and .bz2
6437
- compressed images (only one image per archive; requires gzip and
6438
- bzip2 to be available). When writing, causes compressed information
6439
- to be written if supported by the metadata format (eg. PNG supports
6440
- compressed textual metadata, JXL supports compressed EXIF and XML,
6441
- and MIE supports any compressed metadata), disables the recommended
6442
- padding in embedded XMP (saving 2424 bytes when writing XMP in a
6443
- file), and writes XMP in shorthand format -- the equivalent of
6444
- setting the API Compress=1 and Compact="NoPadding,Shorthand".
6445
-
6446
- Other options
6447
- -@ *ARGFILE*
6448
- Read command-line arguments from the specified file. The file
6449
- contains one argument per line (NOT one option per line -- some
6450
- options require additional arguments, and all arguments must be
6451
- placed on separate lines). Blank lines and lines beginning with "#"
6452
- are ignored (unless they start with "#[CSTR]", in which case the
6453
- rest of the line is treated as a C string, allowing standard C
6454
- escape sequences such as "\n" for a newline). White space at the
6455
- start of a line is removed. Normal shell processing of arguments is
6456
- not performed, which among other things means that arguments should
6457
- not be quoted and spaces are treated as any other character.
6458
- *ARGFILE* may exist relative to either the current directory or the
6459
- exiftool directory unless an absolute pathname is given.
6460
-
6461
- For example, the following *ARGFILE* will set the value of
6462
- Copyright to "Copyright YYYY, Phil Harvey", where "YYYY" is the
6463
- year of CreateDate:
6464
-
6465
- -d
6466
- %Y
6467
- -copyright<Copyright $createdate, Phil Harvey
6468
-
6469
- Arguments in *ARGFILE* behave exactly the same as if they were
6470
- entered at the location of the -@ option on the command line, with
6471
- the exception that the -config and -common_args options may not be
6472
- used in an *ARGFILE*.
6473
-
6474
- -k (-pause)
6475
- Pause with the message "-- press any key --" before terminating.
6476
- This option is used to prevent the command window from closing when
6477
- run as a Windows drag and drop application.
6478
-
6479
- -list, -listw, -listf, -listr, -listwf, -listg[*NUM*], -listd, -listx,
6480
- -listgeo
6481
- Print a list of all valid tag names (-list), all writable tag names
6482
- (-listw), all supported file extensions (-listf), all recognized
6483
- file extensions (-listr), all writable file extensions (-listwf),
6484
- all tag groups [in a specified family] (-listg[*NUM*]), all
6485
- deletable tag groups (-listd), an XML database of tag details
6486
- including language translations (-listx), or the Geolocation
6487
- database (-listgeo). The -list, -listw and -listx options may be
6488
- followed by an additional argument of the form "-GROUP:All" to list
6489
- only tags in a specific group, where "GROUP" is one or more family
6490
- 0-2 group names (excepting EXIF IFD groups) separated by colons.
6491
- With -listg, *NUM* may be given to specify the group family,
6492
- otherwise family 0 is assumed. The -l option may be combined with
6493
- -listf, -listr or -listwf to add file descriptions to the list. The
6494
- -lang option may be combined with -listx to output descriptions in
6495
- a single language, and the -sort and/or -lang options may be
6496
- combined with -listgeo. Also, the API GeolocMinPop, GeolocFeature
6497
- and GeolocAltNames options apply to the -listgeo output. Here are
6498
- some examples:
6499
-
6500
- -list # list all tag names
6501
- -list -EXIF:All # list all EXIF tags
6502
- -list -xmp:time:all # list all XMP tags relating to time
6503
- -listw -XMP-dc:All # list all writable XMP-dc tags
6504
- -listf # list all supported file extensions
6505
- -listr # list all recognized file extensions
6506
- -listwf # list all writable file extensions
6507
- -listg1 # list all groups in family 1
6508
- -listd # list all deletable groups
6509
- -listx -EXIF:All # list database of EXIF tags in XML format
6510
- -listx -XMP:All -s # list short XML database of XMP tags
6511
- -listgeo -lang de # list geolocation database in German
6512
-
6513
- When combined with -listx, the -s option shortens the output by
6514
- omitting the descriptions and values (as in the last example
6515
- above), and -f adds 'flags' and 'struct' attributes if applicable.
6516
- The flags are formatted as a comma-separated list of the following
6517
- possible values: Avoid, Binary, List, Mandatory, Permanent,
6518
- Protected, Unknown and Unsafe (see the Tag Name documentation). For
6519
- XMP List tags, the list type (Alt, Bag or Seq) is added to the
6520
- flags, and flattened structure tags are indicated by a Flattened
6521
- flag with 'struct' giving the ID of the parent structure.
6522
-
6523
- Note that none of the -list options require an input *FILE*.
6524
-
6525
- -ver Print exiftool version number. The -v option may be added to print
6526
- addition system information (see the README file of the full
6527
- distribution for more details about optional libraries), or -v2 to
6528
- also list the Perl include directories.
6529
-
6530
- -- Indicates the end of options. Any remaining arguments are treated
6531
- as file names, even if they begin with a dash ("-").
6532
-
6533
- Special features
6534
- -geotag *TRKFILE*
6535
- Geotag images from the specified GPS track log file. Using the
6536
- -geotag option is equivalent to writing a value to the "Geotag"
6537
- tag. The GPS position is interpolated from the track at a time
6538
- specified by the value written to the "Geotime" tag. If "Geotime"
6539
- is not specified, the value is copied from "DateTimeOriginal#" (the
6540
- "#" is added to copy the unformatted value, avoiding potential
6541
- conflicts with the -d option). For example, the following two
6542
- commands are equivalent:
6543
-
6544
- exiftool -geotag trk.log image.jpg
6545
- exiftool -geotag trk.log "-Geotime<DateTimeOriginal#" image.jpg
6546
-
6547
- When the "Geotime" value is converted to UTC, the local system
6548
- timezone is assumed unless the date/time value contains a timezone.
6549
- Writing "Geotime" causes the following tags to be written (provided
6550
- they can be calculated from the track log, and they are supported
6551
- by the destination metadata format): GPSLatitude, GPSLatitudeRef,
6552
- GPSLongitude, GPSLongitudeRef, GPSAltitude, GPSAltitudeRef,
6553
- GPSDateStamp, GPSTimeStamp, GPSDateTime, GPSTrack, GPSTrackRef,
6554
- GPSSpeed, GPSSpeedRef, GPSImgDirection, GPSImgDirectionRef,
6555
- GPSPitch, GPSRoll, GPSCoordinates, AmbientTemperature and
6556
- CameraElevationAngle. By default, in image files tags are created
6557
- in EXIF, and updated in XMP only if they already exist. In
6558
- QuickTime-format files GPSCoordinates is created in the preferred
6559
- location (ItemList by default) as well as in XMP. However,
6560
- "EXIF:Geotime", "XMP:Geotime" or "QuickTime:Geotime" may be
6561
- specified to write to write only to one group. Also,
6562
- "ItemList:Geotime", "Keys:Geotime" or "UserData:Geotime" may be
6563
- used to write to a specific location in QuickTime-format files.
6564
- Note that GPSPitch and GPSRoll are non-standard, and require
6565
- user-defined tags in order to be written.
6566
-
6567
- The "Geosync" tag may be used to specify a time correction which is
6568
- applied to each "Geotime" value for synchronization with GPS time.
6569
- For example, the following command compensates for image times
6570
- which are 1 minute and 20 seconds behind GPS:
6571
-
6572
- exiftool -geosync=+1:20 -geotag a.log DIR
6573
-
6574
- Advanced "Geosync" features allow a piecewise linear time drift
6575
- correction and synchronization from previously geotagged images.
6576
- See "geotag.html" in the full ExifTool distribution for more
6577
- information.
6578
-
6579
- Multiple -geotag options may be used to concatenate GPS track log
6580
- data. Also, a single -geotag option may be used to load multiple
6581
- track log files by using wildcards in the *TRKFILE* name, but note
6582
- that in this case *TRKFILE* must be quoted on most systems (with
6583
- the notable exception of Windows) to prevent filename expansion.
6584
- For example:
6585
-
6586
- exiftool -geotag "TRACKDIR/*.log" IMAGEDIR
6587
-
6588
- Currently supported track file formats are GPX, NMEA RMC/GGA/GLL,
6589
- KML, IGC, Garmin XML and TCX, Magellan PMGNTRK, Honeywell PTNTHPR,
6590
- Bramor gEO, Winplus Beacon TXT, and GPS/IMU CSV files. See
6591
- "GEOTAGGING EXAMPLES" for examples. Also see "geotag.html" in the
6592
- full ExifTool distribution and the Image::ExifTool Options for more
6593
- details and for information about geotag configuration options.
6594
-
6595
- The API Geolocation option may be set to the value "geotag" to also
6596
- write the name, province/state and country of the nearest city
6597
- while geotagging. See <https://exiftool.org/geolocation.html> for
6598
- details.
6599
-
6600
- -globalTimeShift *SHIFT*
6601
- Shift all formatted date/time values by the specified amount when
6602
- reading. Does not apply to unformatted (-n) output. *SHIFT* takes
6603
- the same form as the date/time shift when writing (see
6604
- Image::ExifTool::Shift.pl for details), with a negative shift being
6605
- indicated with a minus sign ("-") at the start of the *SHIFT*
6606
- string. For example:
6607
-
6608
- # return all date/times, shifted back by 1 hour
6609
- exiftool -globalTimeShift -1 -time:all a.jpg
6610
-
6611
- # set the file name from the shifted CreateDate (-1 day) for
6612
- # all images in a directory
6613
- exiftool "-filename<createdate" -globaltimeshift "-0:0:1 0:0:0" \
6614
- -d %Y%m%d-%H%M%S.%%e dir
6615
-
6616
- -use *MODULE*
6617
- Add features from specified plug-in *MODULE*. Currently, the MWG
6618
- module is the only plug-in module distributed with exiftool. This
6619
- module adds read/write support for tags as recommended by the
6620
- Metadata Working Group. As a convenience, "-use MWG" is assumed if
6621
- the group name prefix starts with "MWG:" exactly for any requested
6622
- tag. See the MWG Tags documentation for more details. Note that
6623
- this option is not reversible, and remains in effect until the
6624
- application terminates, even across the -execute option.
6625
-
6626
- Utilities
6627
- -restore_original
6628
- -delete_original[!]
6629
- These utility options automate the maintenance of the "_original"
6630
- files created by exiftool. They have no effect on files without an
6631
- "_original" copy. The -restore_original option restores the
6632
- specified files from their original copies by renaming the
6633
- "_original" files to replace the edited versions. For example, the
6634
- following command restores the originals of all JPG images in
6635
- directory "DIR":
6636
-
6637
- exiftool -restore_original -ext jpg DIR
6638
-
6639
- The -delete_original option deletes the "_original" copies of all
6640
- files specified on the command line. Without a trailing "!" this
6641
- option prompts for confirmation before continuing. For example, the
6642
- following command deletes "a.jpg_original" if it exists, after
6643
- asking "Are you sure?":
6644
-
6645
- exiftool -delete_original a.jpg
6646
-
6647
- These options may not be used with other options to read or write
6648
- tag values in the same command, but may be combined with options
6649
- such -ext, -if, -r, -q and -v.
6650
-
6651
- Advanced options
6652
- Among other things, the advanced options allow complex processing to be
6653
- performed from a single command without the need for additional
6654
- scripting. This may be particularly useful for implementations such as
6655
- Windows drag-and-drop applications. These options may also be used to
6656
- improve performance in multi-pass processing by reducing the overhead
6657
- required to load exiftool for each invocation.
6658
-
6659
- -api [*OPT[[^]=[VAL]]*]
6660
- Set ExifTool API option. *OPT* is an API option name. The option
6661
- value is set to 1 if *=VAL* is omitted. If *VAL* is omitted, the
6662
- option value is set to undef if "=" is used, or an empty string
6663
- with "^=". If *OPT* is not specified a list of available options is
6664
- returned. The option name is not case senstive, but the option
6665
- values are. See Image::ExifTool Options for option details. This
6666
- overrides API options set via the config file. Note that the
6667
- exiftool app sets some API options internally, and attempts to
6668
- change these via the command line will have no effect.
6669
-
6670
- -common_args
6671
- Specifies that all arguments following this option are common to
6672
- all executed commands when -execute is used. This and the -config
6673
- option are the only options that may not be used inside a -@
6674
- *ARGFILE*. Note that by definition this option and its arguments
6675
- MUST come after all other options on the command line.
6676
-
6677
- -config *CFGFILE*
6678
- Load specified configuration file instead of the default
6679
- ".ExifTool_config". If used, this option must come before all other
6680
- arguments on the command line and applies to all -execute'd
6681
- commands. This file is used to create user-defined tags as well as
6682
- set default ExifTool options. The *CFGFILE* must exist relative to
6683
- the current working directory or the exiftool application directory
6684
- unless an absolute path is specified. Loading of the default config
6685
- file may be disabled by setting *CFGFILE* to an empty string (ie.
6686
- ""). See <https://exiftool.org/config.html> and
6687
- config_files/example.config in the full ExifTool distribution for
6688
- details about the configuration file syntax.
6689
-
6690
- -echo[*NUM*] *TEXT*
6691
- Echo *TEXT* to stdout (-echo or -echo1) or stderr (-echo2). Text is
6692
- output as the command line is parsed, before the processing of any
6693
- input files. *NUM* may also be 3 or 4 to output text (to stdout or
6694
- stderr respectively) after processing is complete. For -echo3 and
6695
- -echo4, "${status}" may be used in the *TEXT* string to represent
6696
- the numerical exit status of the command (see "EXIT STATUS").
6697
-
6698
- -efile[*NUM*][!] *TXTFILE*
6699
- Save the names of files giving errors (*NUM* missing or 1), files
6700
- that were unchanged (*NUM* is 2), files that fail the -if condition
6701
- (*NUM* is 4), files that were updated (*NUM* is 8), files that were
6702
- created (*NUM* is 16), or any combination thereof by summing *NUM*
6703
- (eg. -efile3 is the same has having both -efile and -efile2 options
6704
- with the same *TXTFILE*). By default, file names are appended to
6705
- any existing *TXTFILE*, but *TXTFILE* is overwritten if an
6706
- exclamation point is added to the option (eg. -efile!). Saves the
6707
- name of the file specified by the -srcfile option if applicable.
6708
-
6709
- -execute[*NUM*]
6710
- Execute command for all arguments up to this point on the command
6711
- line (plus any arguments specified by -common_args). The result is
6712
- as if the commands were executed as separate command lines (with
6713
- the exception of the -config and -use options which remain in
6714
- effect for subsequent commands). Allows multiple commands to be
6715
- executed from a single command line. *NUM* is an optional number
6716
- that is echoed in the "{ready}" message when using the -stay_open
6717
- feature. If a *NUM* is specified, the -q option no longer
6718
- suppresses the output "{readyNUM}" message.
6719
-
6720
- -file*NUM* *ALTFILE*
6721
- Read tags from an alternate source file. Among other things, this
6722
- allows tags from different files to be compared and combined using
6723
- the -if and -p options. *NUM* is any string of digits. Tags from
6724
- alternate files are accessed via the corresponding family 8 group
6725
- name (eg. "File1:TAG" for the -file1 option, "File2:TAG" for
6726
- -file2, etc). *ALTFILE* may contain filename formatting codes like
6727
- the -w option (%d, %f, etc), and/or tag names with a leading "$"
6728
- symbol to access tags from the source file in the same way as the
6729
- -p option (so any other dollar symbol in the file name must be
6730
- doubled, eg. "money$$.jpg"). For example, assuming that the
6731
- OriginalFileName tag has been set in the edited file, a command to
6732
- copy Rights from the original file could look like this:
6733
-
6734
- exiftool -file1 '$originalfilename' '-rights<file1:rights' edited.jpg
6735
-
6736
- Subtle note: If a -tagsFromFile option is used, tags in the
6737
- *ALTFILE* argument come from the *SRCFILE* that applies to the
6738
- first argument accessing tags from the corresponding "FileNUM"
6739
- group.
6740
-
6741
- User-defined Composite tags may access tags from alternate files
6742
- using the appropriate (case-sensitive) family 8 group name.
6743
-
6744
- -list_dir
6745
- List directories themselves instead of their contents. This option
6746
- effectively causes directories to be treated as normal files when
6747
- reading and writing. For example, with this option the output of
6748
- the "ls -la" command on Mac/Linux may be approximated by this
6749
- exiftool command:
6750
-
6751
- exiftool -list_dir -T -ls-l -api systemtags -fast5 .* *
6752
-
6753
- (The -T option formats the output in tab-separated columns, -ls-l
6754
- is a shortcut tag, the API SystemTags option is required to extract
6755
- some necessary tags, and the -fast5 option is added for speed since
6756
- only system tags are being extracted.)
6757
-
6758
- -srcfile *FMT*
6759
- Specify a different source file to be processed based on the name
6760
- of the original *FILE*. This may be useful in some special
6761
- situations for processing related preview images or sidecar files.
6762
- See the -w option for a description of the *FMT* syntax. Note that
6763
- file name *FMT* strings for all options are based on the original
6764
- *FILE* specified from the command line, not the name of the source
6765
- file specified by -srcfile.
6766
-
6767
- For example, to copy metadata from NEF files to the corresponding
6768
- JPG previews in a directory where other JPG images may exist:
6769
-
6770
- exiftool -ext nef -tagsfromfile @ -srcfile %d%f.jpg dir
6771
-
6772
- If more than one -srcfile option is specified, the files are tested
6773
- in order and the first existing source file is processed. If none
6774
- of the source files already exist, then exiftool uses the first
6775
- -srcfile specified.
6776
-
6777
- A *FMT* of "@" may be used to represent the original *FILE*, which
6778
- may be useful when specifying multiple -srcfile options (eg. to
6779
- fall back to processing the original *FILE* if no sidecar exists).
6780
-
6781
- When this option is used, two special UserParam tags
6782
- (OriginalFileName and OriginalDirectory) are generated to allow
6783
- access to the original *FILE* name and directory.
6784
-
6785
- -stay_open *FLAG*
6786
- If *FLAG* is 1 or "True" (case insensitive), causes exiftool keep
6787
- reading from the -@ *ARGFILE* even after reaching the end of file.
6788
- This feature allows calling applications to pre-load exiftool, thus
6789
- avoiding the overhead of loading exiftool for each command. The
6790
- procedure is as follows:
6791
-
6792
- 1) Execute "exiftool -stay_open True -@ *ARGFILE*", where *ARGFILE*
6793
- is the name of an existing (possibly empty) argument file or "-" to
6794
- pipe arguments from the standard input.
6795
-
6796
- 2) Write exiftool command-line arguments to *ARGFILE*, one argument
6797
- per line (see the -@ option for details).
6798
-
6799
- 3) Write "-execute\n" to *ARGFILE*, where "\n" represents a newline
6800
- sequence. (Note: You may need to flush your write buffers here if
6801
- using buffered output.) ExifTool will then execute the command with
6802
- the arguments received up to this point, send a "{ready}" message
6803
- to stdout when done (unless the -q or -T option is used), and
6804
- continue trying to read arguments for the next command from
6805
- *ARGFILE*. To aid in command/response synchronization, any number
6806
- appended to the -execute option is echoed in the "{ready}" message.
6807
- For example, "-execute613" results in "{ready613}". When this
6808
- number is added, -q no longer suppresses the "{ready}" message.
6809
- (Also, see the -echo3 and -echo4 options for additional ways to
6810
- pass signals back to your application.)
6811
-
6812
- 4) Repeat steps 2 and 3 for each command.
6813
-
6814
- 5) Write "-stay_open\nFalse\n" (or "-stay_open\n0\n") to *ARGFILE*
6815
- when done. This will cause exiftool to process any remaining
6816
- command-line arguments then exit normally.
6817
-
6818
- The input *ARGFILE* may be changed at any time before step 5 above
6819
- by writing the following lines to the currently open *ARGFILE*:
6820
-
6821
- -stay_open
6822
- True
6823
- -@
6824
- NEWARGFILE
6825
-
6826
- This causes *ARGFILE* to be closed, and *NEWARGFILE* to be kept
6827
- open. (Without the -stay_open here, exiftool would have returned to
6828
- reading arguments from *ARGFILE* after reaching the end of
6829
- *NEWARGFILE*.)
6830
-
6831
- Note: When writing arguments to a disk file there is a delay of up
6832
- to 0.01 seconds after writing "-execute\n" before exiftool starts
6833
- processing the command. This delay may be avoided by sending a CONT
6834
- signal to the exiftool process immediately after writing
6835
- "-execute\n". (There is no associated delay when writing arguments
6836
- via a pipe with "-@ -", so the signal is not necessary when using
6837
- this technique.)
6838
-
6839
- -userParam *PARAM[[^]=[VAL]]*
6840
- Set user parameter. *PARAM* is an arbitrary user parameter name.
6841
- This is an interface to the API UserParam option (see the
6842
- Image::ExifTool Options documentation), and provides a method to
6843
- access user-defined parameters in arguments to the -if and -p
6844
- options as if they were any other tag. Appending a hash tag ("#")
6845
- to *PARAM* (eg. "-userParam MyTag#=yes") also causes the parameter
6846
- to be extracted as a normal tag in the UserParam group. Similar to
6847
- the -api option, the parameter value is set to 1 if *=VAL* is
6848
- omitted, undef if just *VAL* is omitted with "=", or an empty
6849
- string if *VAL* is omitted with "^=".
6850
-
6851
- exiftool -p "$test from $filename" -userparam test=Hello FILE
6852
-
6853
- Advanced formatting feature
6854
- An advanced formatting feature allows modification of the value of any
6855
- tag interpolated within a -if or -p option argument, or a -tagsFromFile
6856
- redirection string. Tag names within these strings are prefixed by a "$"
6857
- symbol, and an arbitrary Perl expression may be applied to the tag value
6858
- by placing braces around the tag name and inserting the expression after
6859
- the name, separated by a semicolon (ie. "${TAG;EXPR}"). The expression
6860
- acts on the value of the tag through the default input variable ($_),
6861
- and has access to the full ExifTool API through the current ExifTool
6862
- object ($self) and the tag key ($tag). It may contain any valid Perl
6863
- code, including translation ("tr///") and substitution ("s///")
6864
- operations, but note that braces within the expression must be balanced.
6865
- The example below prints the camera Make with spaces translated to
6866
- underlines, and multiple consecutive underlines replaced by a single
6867
- underline:
6868
-
6869
- exiftool -p "${make;tr/ /_/;s/__+/_/g}" image.jpg
6870
-
6871
- An "@" may be added after the tag name to make the expression act on
6872
- individual list items for list-type tags, simplifying list processing.
6873
- Set $_ to undef to remove an item from the list. As an example, the
6874
- following command returns all subjects not containing the string "xxx":
6875
-
6876
- exiftool -p "${subject@;$_=undef if /xxx/}" image.jpg
6877
-
6878
- A default expression of "tr(/\\?*:|"<>\0)()d" is assumed if the
6879
- expression is empty (ie. "${TAG;}"). This removes the characters / \ ? *
6880
- : | < > and null from the printed value. (These characters are illegal
6881
- in Windows file names, so this feature is useful if tag values are used
6882
- in file names.)
6883
-
6884
- Helper functions
6885
- "DateFmt"
6886
-
6887
- Simplifies reformatting of individual date/time values. This function
6888
- acts on a standard EXIF-formatted date/time value in $_ and formats it
6889
- according to the specified format string (see the -d option). To avoid
6890
- trying to reformat an already-formatted date/time value, a "#" must be
6891
- added to the tag name (as in the example below) if the -d option is also
6892
- used. For example:
6893
-
6894
- exiftool -p "${createdate#;DateFmt('%Y-%m-%d_%H%M%S')}" a.jpg
6895
-
6896
- "ShiftTime"
6897
-
6898
- Shifts EXIF-formatted date/time string by a specified amount. Start with
6899
- a leading minus sign to shift backwards in time. See
6900
- Image::ExifTool::Shift.pl for details about shift syntax. For example,
6901
- to shift a date/time value back by one year:
6902
-
6903
- exiftool -p "${createdate;ShiftTime('-1:0:0 0')}" a.jpg
6904
-
6905
- "NoDups"
6906
-
6907
- Removes duplicate items from a list with a separator specified by the
6908
- -sep option. This function is most useful when copying list-type tags.
6909
- For example, the following command may be used to remove duplicate
6910
- Keywords:
6911
-
6912
- exiftool -sep "##" "-keywords<${keywords;NoDups}" a.jpg
6913
-
6914
- The -sep option is necessary to split the string back into individual
6915
- list items when writing to a list-type tag.
6916
-
6917
- An optional flag argument may be set to 1 to cause "NoDups" to set $_ to
6918
- undef if no duplicates existed, thus preventing the file from being
6919
- rewritten unnecessarily:
6920
-
6921
- exiftool -sep "##" "-keywords<${keywords;NoDups(1)}" a.jpg
6922
-
6923
- Note that function names are case sensitive.
6924
-
6925
- ExifTool 12.64 adds an API NoDups option which makes the NoDups helper
6926
- function largely redundant, with all the functionality except the
6927
- ability to avoid rewriting the file if there are no duplicates, but with
6928
- the advantage the duplicates may be removed when accumulating list items
6929
- from multiple sources. An equivalent to the above commands using this
6930
- feature would be:
6931
-
6932
- exiftool -tagsfromfile @ -keywords -api nodups a.jpg
6933
-
6934
- "SetTags"
6935
-
6936
- Used to set tags in extracted images. With no arguments, copies all tags
6937
- from the source file to the embedded image:
6938
-
6939
- exiftool -p '${previewimage;SetTags}' -b a.arw > preview.jpg
6940
-
6941
- Arguments may be added to copy or set specific tags. Arguments take
6942
- exactly the same form as those on the command line when copying or
6943
- writing tags, but without the leading dash. For example:
6944
-
6945
- exiftool -p '${previewimage;SetTags("comment=test","title<filename")}' ...
6946
-
6947
- WINDOWS UNICODE FILE NAMES
6948
- In Windows, command-line arguments are specified using the current code
6949
- page and are recoded automatically to the system code page. This
6950
- recoding is not done for arguments in ExifTool arg files, so by default
6951
- filenames in arg files use the system code page. Unfortunately, these
6952
- code pages are not complete character sets, so not all file names may be
6953
- represented.
6954
-
6955
- ExifTool 9.79 and later allow the file name encoding to be specified
6956
- with "-charset filename=CHARSET", where "CHARSET" is the name of a valid
6957
- ExifTool character set, preferably "UTF8" (see the -charset option for a
6958
- complete list). Setting this triggers the use of Windows wide-character
6959
- i/o routines, thus providing support for most Unicode file names (see
6960
- note 4). But note that it is not trivial to pass properly encoded file
6961
- names on the Windows command line (see
6962
- <https://exiftool.org/faq.html#Q18> for details), so placing them in a
6963
- UTF-8 encoded -@ argfile and using "-charset filename=utf8" is
6964
- recommended if possible.
6965
-
6966
- A warning is issued if a specified filename contains special characters
6967
- and the filename character set was not provided. However, the warning
6968
- may be disabled by setting "-charset filename=""", and ExifTool may
6969
- still function correctly if the system code page matches the character
6970
- set used for the file names.
6971
-
6972
- When a directory name is provided, the file name encoding need not be
6973
- specified (unless the directory name contains special characters), and
6974
- ExifTool will automatically use wide-character routines to scan the
6975
- directory.
6976
-
6977
- The filename character set applies to the *FILE* arguments as well as
6978
- filename arguments of -@, -geotag, -o, -p, -srcfile, -tagsFromFile,
6979
- -csv=, -j= and -*TAG*<=. However, it does not apply to the -config
6980
- filename, which always uses the system character set. The "-charset
6981
- filename=" option must come before the -@ option to be effective, but
6982
- the order doesn't matter with respect to other options.
6983
-
6984
- Notes:
6985
-
6986
- 1) FileName and Directory tag values still use the same encoding as
6987
- other tag values, and are converted to/from the filename character set
6988
- when writing/reading if specified.
6989
-
6990
- 2) Unicode support is not yet implemented for other Windows-based
6991
- systems like Cygwin.
6992
-
6993
- 3) See "WRITING READ-ONLY FILES" below for a note about editing
6994
- read-only files with Unicode names.
6995
-
6996
- 4) Unicode file names with surrogate pairs (code points over U+FFFF)
6997
- still cause problems.
6998
-
6999
- WRITING READ-ONLY FILES
7000
- In general, ExifTool may be used to write metadata to read-only files
7001
- provided that the user has write permission in the directory. However,
7002
- there are three cases where file write permission is also required:
7003
-
7004
- 1) When using the -overwrite_original_in_place option.
7005
-
7006
- 2) When writing only pseudo System tags (eg. FileModifyDate).
7007
-
7008
- 3) On Windows if the file has Unicode characters in its name, and a) the
7009
- -overwrite_original option is used, or b) the "_original" backup already
7010
- exists.
7011
-
7012
- Hidden files in Windows behave as read-only files when attempting to
7013
- write any real tags to the file -- an error is generated when using the
7014
- -overwrite_original_in_place, otherwise writing should be successful and
7015
- the hidden attribute will be removed. But the -if option may be used to
7016
- avoid processing hidden files (provided Win32API::File is available):
7017
-
7018
- exiftool -if "$fileattributes !~ /Hidden/" ...
7019
-
7020
- READING EXAMPLES
7021
- exiftool -a -u -g1 a.jpg
7022
- Print all meta information in an image, including duplicate and
7023
- unknown tags, sorted by group (for family 1). For performance
7024
- reasons, this command may not extract all available metadata.
7025
- (Metadata in embedded documents, metadata extracted by external
7026
- utilities, and metadata requiring excessive processing time may not
7027
- be extracted). Add "-ee3" and "-api RequestAll=3" to the command to
7028
- extract absolutely everything available.
7029
-
7030
- exiftool -common dir
7031
- Print common meta information for all images in "dir". "-common" is
7032
- a shortcut tag representing common EXIF meta information.
7033
-
7034
- exiftool -T -createdate -aperture -shutterspeed -iso dir > out.txt
7035
- List specified meta information in tab-delimited column form for
7036
- all images in "dir" to an output text file named "out.txt".
7037
-
7038
- exiftool -s -ImageSize -ExposureTime b.jpg
7039
- Print ImageSize and ExposureTime tag names and values.
7040
-
7041
- exiftool -l -canon c.jpg d.jpg
7042
- Print standard Canon information from two image files.
7043
-
7044
- exiftool -r -w .txt -common pictures
7045
- Recursively extract common meta information from files in
7046
- "pictures" directory, writing text output to ".txt" files with the
7047
- same names.
7048
-
7049
- exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg
7050
- Save thumbnail image from "image.jpg" to a file called
7051
- "thumbnail.jpg".
7052
-
7053
- exiftool -b -JpgFromRaw -w _JFR.JPG -ext NEF -r .
7054
- Recursively extract JPG image from all Nikon NEF files in the
7055
- current directory, adding "_JFR.JPG" for the name of the output JPG
7056
- files.
7057
-
7058
- exiftool -a -b -W %d%f_%t%-c.%s -preview:all dir
7059
- Extract all types of preview images (ThumbnailImage, PreviewImage,
7060
- JpgFromRaw, etc.) from files in directory "dir", adding the tag
7061
- name to the output preview image file names.
7062
-
7063
- exiftool -d "%r %a, %B %e, %Y" -DateTimeOriginal -S -s -ext jpg .
7064
- Print formatted date/time for all JPG files in the current
7065
- directory.
7066
-
7067
- exiftool -IFD1:XResolution -IFD1:YResolution image.jpg
7068
- Extract image resolution from EXIF IFD1 information (thumbnail
7069
- image IFD).
7070
-
7071
- exiftool "-*resolution*" image.jpg
7072
- Extract all tags with names containing the word "Resolution" from
7073
- an image.
7074
-
7075
- exiftool -xmp:author:all -a image.jpg
7076
- Extract all author-related XMP information from an image.
7077
-
7078
- exiftool -xmp -b a.jpg > out.xmp
7079
- Extract complete XMP data record intact from "a.jpg" and write it
7080
- to "out.xmp" using the special "XMP" tag (see the Extra tags in
7081
- Image::ExifTool::TagNames).
7082
-
7083
- exiftool -p "$filename has date $dateTimeOriginal" -q -f dir
7084
- Print one line of output containing the file name and
7085
- DateTimeOriginal for each image in directory "dir".
7086
-
7087
- exiftool -ee3 -p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts
7088
- Extract all GPS positions from an AVCHD video.
7089
-
7090
- exiftool -icc_profile -b -w icc image.jpg
7091
- Save complete ICC_Profile from an image to an output file with the
7092
- same name and an extension of ".icc".
7093
-
7094
- exiftool -htmldump -w tmp/%f_%e.html t/images
7095
- Generate HTML pages from a hex dump of EXIF information in all
7096
- images from the "t/images" directory. The output HTML files are
7097
- written to the "tmp" directory (which is created if it didn't
7098
- exist), with names of the form "FILENAME_EXT.html".
7099
-
7100
- exiftool -a -b -ee -embeddedimage -W Image_%.3g3.%s file.pdf
7101
- Extract embedded JPG and JP2 images from a PDF file. The output
7102
- images will have file names like "Image_#.jpg" or "Image_#.jp2",
7103
- where "#" is the ExifTool family 3 embedded document number for the
7104
- image.
7105
-
7106
- WRITING EXAMPLES
7107
- Note that quotes are necessary around arguments which contain certain
7108
- special characters such as ">", "<" or any white space. These quoting
7109
- techniques are shell dependent, but the examples below will work in
7110
- the Windows CMD shell.
7111
-
7112
- exiftool -Comment="This is a new comment" dst.jpg
7113
- Write new comment to a JPG image (replaces any existing comment).
7114
-
7115
- exiftool -comment= -o newdir -ext jpg .
7116
- Remove comment from all JPG images in the current directory,
7117
- writing the modified images to a new directory.
7118
-
7119
- exiftool -keywords=EXIF -keywords=editor dst.jpg
7120
- Replace existing keyword list with two new keywords ("EXIF" and
7121
- "editor").
7122
-
7123
- exiftool -Keywords+=word -o newfile.jpg src.jpg
7124
- Copy a source image to a new file, and add a keyword ("word") to
7125
- the current list of keywords.
7126
-
7127
- exiftool -exposurecompensation+=-0.5 a.jpg
7128
- Decrement the value of ExposureCompensation by 0.5 EV. Note that +=
7129
- with a negative value is used for decrementing because the -=
7130
- operator is used for conditional deletion (see next example).
7131
-
7132
- exiftool -credit-=xxx dir
7133
- Delete Credit information from all files in a directory where the
7134
- Credit value was "xxx".
7135
-
7136
- exiftool -xmp:description-de="k&uuml;hl" -E dst.jpg
7137
- Write alternate language for XMP:Description, using HTML character
7138
- escaping to input special characters.
7139
-
7140
- exiftool -all= dst.jpg
7141
- Delete all meta information from an image. Note: You should NOT do
7142
- this to RAW images (except DNG) since proprietary RAW image formats
7143
- often contain information in the makernotes that is necessary for
7144
- converting the image.
7145
-
7146
- exiftool -all= -comment="lonely" dst.jpg
7147
- Delete all meta information from an image and add a comment back
7148
- in. (Note that the order is important: -comment="lonely" -all=
7149
- would also delete the new comment.)
7150
-
7151
- exiftool -all= --jfif:all dst.jpg
7152
- Delete all meta information except JFIF group from an image.
7153
-
7154
- exiftool -Photoshop:All= dst.jpg
7155
- Delete Photoshop meta information from an image (note that the
7156
- Photoshop information also includes IPTC).
7157
-
7158
- exiftool -r -XMP-crss:all= DIR
7159
- Recursively delete all XMP-crss information from images in a
7160
- directory.
7161
-
7162
- exiftool "-ThumbnailImage<=thumb.jpg" dst.jpg
7163
- Set the thumbnail image from specified file (Note: The quotes are
7164
- necessary to prevent shell redirection).
7165
-
7166
- exiftool "-JpgFromRaw<=%d%f_JFR.JPG" -ext NEF -r .
7167
- Recursively write JPEG images with filenames ending in "_JFR.JPG"
7168
- to the JpgFromRaw tag of like-named files with extension ".NEF" in
7169
- the current directory. (This is the inverse of the "-JpgFromRaw"
7170
- command of the "READING EXAMPLES" section above.)
7171
-
7172
- exiftool -DateTimeOriginal-="0:0:0 1:30:0" dir
7173
- Adjust original date/time of all images in directory "dir" by
7174
- subtracting one hour and 30 minutes. (This is equivalent to
7175
- "-DateTimeOriginal-=1.5". See Image::ExifTool::Shift.pl for
7176
- details.)
7177
-
7178
- exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg
7179
- Add 3 hours to the CreateDate and ModifyDate timestamps of two
7180
- images.
7181
-
7182
- exiftool -AllDates+=1:30 -if "$make eq 'Canon'" dir
7183
- Shift the values of DateTimeOriginal, CreateDate and ModifyDate
7184
- forward by 1 hour and 30 minutes for all Canon images in a
7185
- directory. (The AllDates tag is provided as a shortcut for these
7186
- three tags, allowing them to be accessed via a single tag.)
7187
-
7188
- exiftool -xmp:city=Kingston image1.jpg image2.nef
7189
- Write a tag to the XMP group of two images. (Without the "xmp:"
7190
- this tag would get written to the IPTC group since "City" exists in
7191
- both, and IPTC is preferred by default.)
7192
-
7193
- exiftool -LightSource-="Unknown (0)" dst.tiff
7194
- Delete "LightSource" tag only if it is unknown with a value of 0.
7195
-
7196
- exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg
7197
- Set "WhiteBalance" to "Tungsten" only if it was previously "Auto".
7198
-
7199
- exiftool -comment-= -comment="new comment" a.jpg
7200
- Write a new comment only if the image doesn't have one already.
7201
-
7202
- exiftool -o %d%f.xmp dir
7203
- Create XMP meta information data files for all images in "dir".
7204
-
7205
- exiftool -o test.xmp -owner=Phil -title="XMP File"
7206
- Create an XMP data file only from tags defined on the command line.
7207
-
7208
- exiftool "-ICC_Profile<=%d%f.icc" image.jpg
7209
- Write ICC_Profile to an image from a ".icc" file of the same name.
7210
-
7211
- exiftool -hierarchicalkeywords="{keyword=one,children={keyword=B}}"
7212
- Write structured XMP information. See
7213
- <https://exiftool.org/struct.html> for more details.
7214
-
7215
- exiftool -trailer:all= image.jpg
7216
- Delete any trailer found after the end of image (EOI) in a JPEG
7217
- file. A number of digital cameras store a large PreviewImage after
7218
- the JPEG EOI, and the file size may be reduced significantly by
7219
- deleting this trailer. See the JPEG Tags documentation for a list
7220
- of recognized JPEG trailers.
7221
-
7222
- COPYING EXAMPLES
7223
- These examples demonstrate the ability to copy tag values between files.
7224
-
7225
- exiftool -tagsFromFile src.cr2 dst.jpg
7226
- Copy the values of all writable tags from "src.cr2" to "dst.jpg",
7227
- writing the information to same-named tags in the preferred groups.
7228
-
7229
- exiftool -TagsFromFile src.jpg -all:all dst.jpg
7230
- Copy the values of all writable tags from "src.jpg" to "dst.jpg",
7231
- preserving the original tag groups.
7232
-
7233
- exiftool -all= -tagsfromfile src.jpg -exif:all dst.jpg
7234
- Erase all meta information from "dst.jpg" image, then copy EXIF
7235
- tags from "src.jpg".
7236
-
7237
- exiftool -exif:all= -tagsfromfile @ -all:all -unsafe bad.jpg
7238
- Rebuild all EXIF meta information from scratch in an image. This
7239
- technique can be used in JPEG images to repair corrupted EXIF
7240
- information which otherwise could not be written due to errors. The
7241
- "Unsafe" tag is a shortcut for unsafe EXIF tags in JPEG images
7242
- which are not normally copied. See the tag name documentation for
7243
- more details about unsafe tags.
7244
-
7245
- exiftool -Tagsfromfile a.jpg out.xmp
7246
- Copy meta information from "a.jpg" to an XMP data file. If the XMP
7247
- data file "out.xmp" already exists, it will be updated with the new
7248
- information. Otherwise the XMP data file will be created. Only
7249
- metadata-only files may be created like this (files containing
7250
- images may be edited but not created). See "WRITING EXAMPLES" above
7251
- for another technique to generate XMP files.
7252
-
7253
- exiftool -tagsFromFile a.jpg -XMP:All= -ThumbnailImage= -m b.jpg
7254
- Copy all meta information from "a.jpg" to "b.jpg", deleting all XMP
7255
- information and the thumbnail image from the destination.
7256
-
7257
- exiftool -TagsFromFile src.jpg -title -author=Phil dst.jpg
7258
- Copy title from one image to another and set a new author name.
7259
-
7260
- exiftool -TagsFromFile a.jpg -ISO -TagsFromFile b.jpg -comment dst.jpg
7261
- Copy ISO from one image and Comment from another image to a
7262
- destination image.
7263
-
7264
- exiftool -tagsfromfile src.jpg -exif:all --subifd:all dst.jpg
7265
- Copy only the EXIF information from one image to another, excluding
7266
- SubIFD tags.
7267
-
7268
- exiftool "-FileModifyDate<DateTimeOriginal" dir
7269
- Use the original date from the meta information to set the same
7270
- file's filesystem modification date for all images in a directory.
7271
- (Note that "-TagsFromFile @" is assumed if no other -TagsFromFile
7272
- is specified when redirecting information as in this example.)
7273
-
7274
- exiftool -TagsFromFile src.jpg "-xmp:all<all" dst.jpg
7275
- Copy all possible information from "src.jpg" and write in XMP
7276
- format to "dst.jpg".
7277
-
7278
- exiftool "-Description<${FileName;s/\.[^.]*$//}" dir
7279
- Set the image Description from the file name after removing the
7280
- extension. This example uses the "Advanced formatting feature" to
7281
- perform a substitution operation to remove the last dot and
7282
- subsequent characters from the file name.
7283
-
7284
- exiftool -@ iptc2xmp.args -iptc:all= a.jpg
7285
- Translate IPTC information to XMP with appropriate tag name
7286
- conversions, and delete the original IPTC information from an
7287
- image. This example uses iptc2xmp.args, which is a file included
7288
- with the ExifTool distribution that contains the required arguments
7289
- to convert IPTC information to XMP format. Also included with the
7290
- distribution are xmp2iptc.args (which performs the inverse
7291
- conversion) and a few more .args files for other conversions
7292
- between EXIF, IPTC and XMP.
7293
-
7294
- exiftool -tagsfromfile %d%f.CR2 -r -ext JPG dir
7295
- Recursively rewrite all "JPG" images in "dir" with information
7296
- copied from the corresponding "CR2" images in the same directories.
7297
-
7298
- exiftool "-keywords+<make" image.jpg
7299
- Add camera make to list of keywords.
7300
-
7301
- exiftool "-comment<ISO=$exif:iso Exposure=${shutterspeed}" dir
7302
- Set the Comment tag of all images in "dir" from the values of the
7303
- EXIF:ISO and ShutterSpeed tags. The resulting comment will be in
7304
- the form "ISO=100 Exposure=1/60".
7305
-
7306
- exiftool -TagsFromFile src.jpg -icc_profile dst.jpg
7307
- Copy ICC_Profile from one image to another.
7308
-
7309
- exiftool -TagsFromFile src.jpg -all:all dst.mie
7310
- Copy all meta information in its original form from a JPEG image to
7311
- a MIE file. The MIE file will be created if it doesn't exist. This
7312
- technique can be used to store the metadata of an image so it can
7313
- be inserted back into the image (with the inverse command) later in
7314
- a workflow.
7315
-
7316
- exiftool -o dst.mie -all:all src.jpg
7317
- This command performs exactly the same task as the command above,
7318
- except that the -o option will not write to an output file that
7319
- already exists.
7320
-
7321
- exiftool -b -jpgfromraw -w %d%f_%ue.jpg -execute -b -previewimage -w
7322
- %d%f_%ue.jpg -execute -tagsfromfile @ -srcfile %d%f_%ue.jpg
7323
- -overwrite_original -common_args --ext jpg DIR
7324
- [Advanced] Extract JpgFromRaw or PreviewImage from all but JPG
7325
- files in DIR, saving them with file names like "image_EXT.jpg",
7326
- then add all meta information from the original files to the
7327
- extracted images. Here, the command line is broken into three
7328
- sections (separated by -execute options), and each is executed as
7329
- if it were a separate command. The -common_args option causes the
7330
- "--ext jpg DIR" arguments to be applied to all three commands, and
7331
- the -srcfile option allows the extracted JPG image to be the source
7332
- file for the third command (whereas the RAW files are the source
7333
- files for the other two commands).
7334
-
7335
- RENAMING EXAMPLES
7336
- By writing the "FileName" and "Directory" tags, files are renamed and/or
7337
- moved to new directories. This can be particularly useful and powerful
7338
- for organizing files by date when combined with the -d option. New
7339
- directories are created as necessary, but existing files will not be
7340
- overwritten. The format codes %d, %f and %e may be used in the new file
7341
- name to represent the directory, name and extension of the original
7342
- file, and %c may be used to add a copy number if the file already exists
7343
- (see the -w option for details). Note that if used within a date format
7344
- string, an extra '%' must be added to pass these codes through the
7345
- date/time parser. (And further note that in a Windows batch file, all
7346
- '%' characters must also be escaped, so in this extreme case "%%%%f" is
7347
- necessary to pass a simple "%f" through the two levels of parsing.) See
7348
- <https://exiftool.org/filename.html> for additional documentation and
7349
- examples.
7350
-
7351
- exiftool -filename=new.jpg dir/old.jpg
7352
- Rename "old.jpg" to "new.jpg" in directory "dir".
7353
-
7354
- exiftool -directory=%e dir
7355
- Move all files from directory "dir" into directories named by the
7356
- original file extensions.
7357
-
7358
- exiftool "-Directory<DateTimeOriginal" -d %Y/%m/%d dir
7359
- Move all files in "dir" into a directory hierarchy based on year,
7360
- month and day of "DateTimeOriginal". eg) This command would move
7361
- the file "dir/image.jpg" with a "DateTimeOriginal" of "2005:10:12
7362
- 16:05:56" to "2005/10/12/image.jpg".
7363
-
7364
- exiftool -o . "-Directory<DateTimeOriginal" -d %Y/%m/%d dir
7365
- Same effect as above except files are copied instead of moved.
7366
-
7367
- exiftool "-filename<%f_${model;}.%e" dir
7368
- Rename all files in "dir" by adding the camera model name to the
7369
- file name. The semicolon after the tag name inside the braces
7370
- causes characters which are invalid in Windows file names to be
7371
- deleted from the tag value (see the "Advanced formatting feature"
7372
- for an explanation).
7373
-
7374
- exiftool "-FileName<CreateDate" -d %Y%m%d_%H%M%S%%-c.%%e dir
7375
- Rename all images in "dir" according to the "CreateDate" date and
7376
- time, adding a copy number with leading '-' if the file already
7377
- exists ("%-c"), and preserving the original file extension (%e).
7378
- Note the extra '%' necessary to escape the filename codes (%c and
7379
- %e) in the date format string.
7380
-
7381
- exiftool -r "-FileName<CreateDate" -d %Y-%m-%d/%H%M_%%f.%%e dir
7382
- Both the directory and the filename may be changed together via the
7383
- "FileName" tag if the new "FileName" contains a '/'. The example
7384
- above recursively renames all images in a directory by adding a
7385
- "CreateDate" timestamp to the start of the filename, then moves
7386
- them into new directories named by date.
7387
-
7388
- exiftool "-FileName<${CreateDate}_$filenumber.jpg" -d %Y%m%d -ext jpg .
7389
- Set the filename of all JPG images in the current directory from
7390
- the CreateDate and FileNumber tags, in the form
7391
- "20060507_118-1861.jpg".
7392
-
7393
- GEOTAGGING EXAMPLES
7394
- ExifTool implements geotagging from GPS log files via 3 special tags:
7395
- Geotag (which for convenience is also implemented as an exiftool
7396
- option), Geosync and Geotime. The examples below highlight some
7397
- geotagging features. See <https://exiftool.org/geotag.html> for
7398
- additional documentation. (Note that geotagging from known GPS
7399
- coordinates is done by writing the GPS tags directly rather than using
7400
- the -geotag option.)
7401
-
7402
- exiftool -geotag track.log a.jpg
7403
- Geotag an image ("a.jpg") from position information in a GPS track
7404
- log ("track.log"). Since the "Geotime" tag is not specified, the
7405
- value of DateTimeOriginal is used for geotagging. Local system time
7406
- is assumed unless DateTimeOriginal contains a timezone.
7407
-
7408
- exiftool -geotag track.log -geolocate=geotag a.jpg
7409
- Geotag an image and also write geolocation information of the
7410
- nearest city (city name, state/province and country). Read here for
7411
- more details about the Geolocation feature:
7412
- <https://exiftool.org/geolocation.html#Write>
7413
-
7414
- exiftool -geotag t.log -geotime="2009:04:02 13:41:12-05:00" a.jpg
7415
- Geotag an image with the GPS position for a specific time.
7416
-
7417
- exiftool -geotag log.gpx "-xmp:geotime<createdate" dir
7418
- Geotag all images in directory "dir" with XMP tags instead of EXIF
7419
- tags, based on the image CreateDate.
7420
-
7421
- exiftool -geotag a.log -geosync=-20 dir
7422
- Geotag images in directory "dir", accounting for image timestamps
7423
- which were 20 seconds ahead of GPS.
7424
-
7425
- exiftool -geotag a.log -geosync=1.jpg -geosync=2.jpg dir
7426
- Geotag images using time synchronization from two previously
7427
- geotagged images (1.jpg and 2.jpg), synchronizing the image and GPS
7428
- times using a linear time drift correction.
7429
-
7430
- exiftool -geotag a.log "-geotime<${createdate}+01:00" dir
7431
- Geotag images in "dir" using CreateDate with the specified
7432
- timezone. If CreateDate already contained a timezone, then the
7433
- timezone specified on the command line is ignored.
7434
-
7435
- exiftool -geotag= a.jpg
7436
- Delete GPS tags which may have been added by the geotag feature.
7437
- Note that this does not remove all GPS tags -- to do this instead
7438
- use "-gps:all=".
7439
-
7440
- exiftool -xmp:geotag= a.jpg
7441
- Delete XMP GPS tags which were added by the geotag feature.
7442
-
7443
- exiftool -xmp:geotag=track.log a.jpg
7444
- Geotag an image with XMP tags, using the time from
7445
- DateTimeOriginal.
7446
-
7447
- exiftool -geotag a.log -geotag b.log -r dir
7448
- Combine multiple track logs and geotag an entire directory tree of
7449
- images.
7450
-
7451
- exiftool -geotag "tracks/*.log" -r dir
7452
- Read all track logs from the "tracks" directory.
7453
-
7454
- exiftool -p gpx.fmt dir > out.gpx
7455
- Generate a GPX track log from all images in directory "dir". This
7456
- example uses the "gpx.fmt" file included in the full ExifTool
7457
- distribution package and assumes that the images in "dir" have all
7458
- been previously geotagged.
7459
-
7460
- PIPING EXAMPLES
7461
- type a.jpg | exiftool -
7462
- Extract information from stdin.
7463
-
7464
- exiftool image.jpg -thumbnailimage -b | exiftool -
7465
- Extract information from an embedded thumbnail image.
7466
-
7467
- type a.jpg | exiftool -iptc:keywords+=fantastic - > b.jpg
7468
- Add an IPTC keyword in a pipeline, saving output to a new file.
7469
-
7470
- curl -s http://a.domain.com/bigfile.jpg | exiftool -fast -
7471
- Extract information from an image over the internet using the cURL
7472
- utility. The -fast option prevents exiftool from scanning for
7473
- trailer information, so only the meta information header is
7474
- transferred.
7475
-
7476
- exiftool a.jpg -thumbnailimage -b | exiftool -comment=wow - | exiftool
7477
- a.jpg "-thumbnailimage<=-"
7478
- Add a comment to an embedded thumbnail image. (Why anyone would
7479
- want to do this I don't know, but I've included this as an example
7480
- to illustrate the flexibility of ExifTool.)
7481
-
7482
- INTERRUPTING EXIFTOOL
7483
- Interrupting exiftool with a CTRL-C or SIGINT will not result in
7484
- partially written files or temporary files remaining on the hard disk.
7485
- The exiftool application traps SIGINT and defers it until the end of
7486
- critical processes if necessary, then does a proper cleanup before
7487
- exiting.
7488
-
7489
- EXIT STATUS
7490
- The exiftool application exits with a status of 0 on success, or 1 if an
7491
- error occurred, or 2 if all files failed the -if condition (for any of
7492
- the commands if -execute was used).
7493
-
7494
- AUTHOR
7495
- Copyright 2003-2024, Phil Harvey
7496
-
7497
- This is free software; you can redistribute it and/or modify it under
7498
- the same terms as Perl itself.
7499
-
7500
- SEE ALSO
7501
- Image::ExifTool(3pm), Image::ExifTool::TagNames(3pm),
7502
- Image::ExifTool::Shortcuts(3pm), Image::ExifTool::Shift.pl
7503
-
7504
- __HELP__
7505
-
7506
- my $dir = $ENV{PAR_GLOBAL_TEMP} || $ENV{PAR_TEMP} || $ENV{TMP} || $ENV{TEMP} || '/tmp';
7507
- my $docFile = "$dir/exiftool_${version}_doc.txt";
4643
+ my $docFile = "$Image::ExifTool::exeDir/exiftool_files/windows_exiftool.txt";
7508
4644
  # try backslashes first if it seems we may be running in cmd.exe
7509
4645
  $docFile =~ tr/\//\\/ if $ENV{ComSpec} or $docFile =~ /\\/;
7510
- unless (-e $docFile) {
7511
- unless (open(TEMP, ">$docFile") or
7512
- ($docFile =~ tr/\/\\/\\\// and open(TEMP, ">$docFile")) or # try forward slash
7513
- (CreateDirectory($docFile) and open(TEMP, ">$docFile"))) # try creating dir
7514
- {
7515
- warn "Error creating temp file $docFile\n";
7516
- warn "So ExifTool can't print the help documentation.\n";
7517
- return;
7518
- }
7519
- my $ok = print TEMP $help;
7520
- close TEMP;
7521
- unless ($ok) {
7522
- unlink $docFile;
7523
- warn "Error writing temp file $docFile\n";
7524
- }
7525
- }
7526
4646
  system(qq{more < "$docFile"}) and warn "Error running more $docFile\n";
7527
4647
  }
7528
4648