Could not load tags. Latest commit. Git stats commits. Failed to load latest commit information. View code. Same as the -x option. Group names and wildcards are permitted as described above for -TAG. Once excluded from the output, a tag may not be re-included by a subsequent option. May also be used following a -tagsFromFile option to exclude tags from being copied when redirecting to another tag, it is the source tag that should be excluded , or to exclude groups from being deleted when deleting all information eg.
But note that this will not exclude individual tags from a group delete unless a family 2 group is specified, see note 4 below. Instead, individual tags may be recovered using the -tagsFromFile option eg.
For example, --xmp-crs:all may speed processing significantly in cases where a large number of XMP-crs tags exist. To use this feature to bypass processing of a specific XMP property, the property name must be used instead of the ExifTool tag name eg.
Write a new value for the specified tag eg. TAG may contain one or more leading family 0, 1, 2 or 7 group names, prefixed by optional family numbers, and separated colons. If no group name is specified, the tag is created in the preferred group, and updated in any other location where a same-named tag already exists.
When specified with wildcards, "Unsafe" tags are not written. However, color space information is removed, so the colors may be affected but this may be avoided by copying back the tags defined by the ColorSpaceTags shortcut. Use the -listd option for a complete list of deletable groups, and see note 5 below regarding the "APP" groups.
Also, within an image some groups may be contained within others, and these groups are removed if the containing group is deleted:. If two assignments affect the same tag, the latter takes precedence except for list-type tags, for which both values are written.
This avoids many potential problems, including the inevitable compatibility problems with OEM software which may be very inflexible about the information it expects to find in the maker notes. Otherwise all deletable tags in the specified group s are removed individually, and in this case is it possible to exclude individual tags from a mass delete.
This difference also applies if family 2 is specified when deleting all groups. Special feature: Integer values may be specified in hexadecimal with a leading 0x , and simple rational values may be specified as fractions.
Tag names on the command line after this option specify the tags to be copied, or excluded from the copy. Wildcards are permitted in these tag names. If no tags are specified, then all possible tags see note 1 below from the source file are copied to same-named tags in the preferred location of the output file the same as specifying -all.
More than one -tagsFromFile option may be used to copy tags from multiple files. By default, this option will update any existing and writable same-named tags in the output FILE , but will create new tags only in their preferred groups. This allows some information to be automatically transferred to the appropriate group when copying between images of different formats.
However, if a group name is specified for a tag then the information is written only to this group unless redirected to another group, see below. If All is used as a group name, then the specified tag s are written to the same family 1 group they had in the source file ie. For example, the common operation of copying all writable tags to the same specific locations in the output FILE is achieved by adding -all:all. A different family may be specified by adding a leading family number to the group name eg.
In this case, may be used to represent the source file ie. Specified tags are then copied from each file in turn as it is rewritten. See the -w option for FMT string examples. A powerful redirection feature allows a destination tag to be specified for each copied tag. With this feature, information may be written to a tag with a different name or group. Wildcards are allowed in both the source and destination tag names.
If no destination group is specified, the information is written to the preferred group. As a convenience, -tagsFromFile is assumed for any redirected tags which are specified without a prior -tagsFromFile option. See the -p option and the "Advanced formatting feature" section for more details about this syntax. A single space at the start of the string is removed if it exists, but all other whitespace in the string is preserved.
See note 8 below about using the redirection feature with list-type stags, shortcuts or when using wildcards in tag names. See the tag name documentation for more details about "Unsafe" tags. Excluding a tag prevents it from being copied to the destination image, but deleting will remove a pre-existing tag from the image. Also, since the PreviewImage referenced from the maker notes may be rather large, it is not copied, and must be transferred separately if desired.
Any tag assignment to the right of the -tagsFromFile option is made after all tags are copied. For example, new tag values are set in the order One, Two, Three then Four with this command:. This is significant in the case where an overlap exists between the copied and assigned tags because later operations may override earlier ones.
While this avoids duplicate list items when copying groups of tags from a file containing redundant information, it also prevents values of different tags from being copied into the same list when this is the intent.
So a -addTagsFromFile option is provided which allows copying of multiple tags into the same list. Similarly, -addTagsFromFile must be used when conditionally replacing a tag to prevent overriding earlier conditions. See the -struct option for details. When copying directly, the values of each matching source tag are copied individually to the destination tag as if they were separate assignments. However, when interpolated inside a string, list items and the values of shortcut tags are concatenated with a separator set by the -sep option , and wildcards are not allowed.
Also, UserParam variables are available only when interpolated in a string. Finally, the behaviour is different when a destination tag or group of All is used. Exclude the specified tag. There may be multiple -x options. This has the same effect as -- TAG on the command line.
See the -- TAG documentation above for a complete description. Note that trailing spaces are removed from extracted values for most output text formats. The exceptions are -b , -csv , -j and -X. Output information in the form of exiftool arguments, suitable for use with the - option when writing.
May be combined with the -G option to include group names. This feature may be used to effectively copy tags between images, but allows the metadata to be altered by editing the intermediate file out. Note: Be careful when copying information with this technique since it is easy to write tags which are normally considered "Unsafe". For instance, the FileName and Directory tags are excluded in the example above to avoid renaming and moving the destination file.
Also note that the second command above will produce warning messages for any tags which are not writable. As well, the -sep option should be used as in the second command above to maintain separate list items when writing metadata back to image files, and the -struct option may be used when extracting to preserve structured XMP information.
Output requested metadata in binary format without tag names or descriptions -b or -binary. This option is mainly used for extracting embedded images or other binary data, but it may also be useful for some text strings since control characters such as newlines are not replaced by '. By default, list items are separated by a newline when extracted with the -b option, but this may be changed see the -sep option for details.
With a leading double dash --b or --binary , tags which contain binary data are suppressed in the output when reading. Set the print format for GPS coordinates. FMT uses the same syntax as a printf format string. The specifiers correspond to degrees, minutes and seconds in that order, but minutes and seconds are optional.
For example, the following table gives the output for the same coordinate using various formats:. FILE arguments.
Other values of TYPE listed below are used to specify the internal encoding of various meta information formats. When importing, the CSV file must be in exactly the same format as the exported file. Empty values are ignored when importing unless the -f option is used and the API MissingTagValue is set to an empty string, in which case the tag is deleted. Also, FileName and Directory columns are ignored if they exist ie. ExifTool will not attempt to write these tags with a CSV import.
Multiple databases may be imported in a single command. When exporting a CSV file, the -g or -G option adds group names to the tag headings. If the -a option is used to allow duplicate tag names, the duplicate tags are only included in the CSV output if the column headings are unique. Adding the -G4 option ensures a unique column heading for each tag. The -b option may be added to output binary data, encoded in base64 if necessary indicated by ASCII "base" as the first 7 bytes of the value.
Values may also be encoded in base64 if the -charset option is used and the value contains invalid characters. When exporting specific tags, the CSV columns are arranged in the same order as the specified tags provided the column headings exactly match the specified tag names, otherwise the columns are sorted in alphabetical order. When importing from a CSV file, only files specified on the command line are processed. Any extra entries in the CSV file are ignored.
List-type tags are stored as simple strings in a CSV file, but the -sep option may be used to split them back into separate items when importing. This affects only list-type tags. Also applies to the -j option. Note that this option is fundamentally different than all other output format options because it requires information from all input files to be buffered in memory before the output is written.
This may result in excessive memory usage when processing a very large number of files with a single command. Also, it makes this option incompatible with the -w option. A double quote is not allowed in the delimiter. Default is ','. The specifics of the FMT syntax are system dependent -- consult the strftime man page on your system for details.
This option has no effect on date-only or time-only tags and ignores timezone information if present. Only one -d option may be used per command. For XML, only these 5 characters are escaped. The -E option is implied with -h , and -ex is implied with -X. For C, all control characters and the backslash are escaped. The inverse conversion is applied when writing tags.
Force printing of tags even if their values are not found. This option only applies when specific tags are requested on the command line ie.
With this option, a dash - is printed for the value of any missing tag, but the dash may be changed via the API MissingTagValue option. Organize output by tag group. May be combined with other options to add group names to the output. Multiple families may be specified by separating them with colons. By default the resulting group name is simplified by removing any leading Main: and collapsing adjacent identical group names, but this can be avoided by placing a colon before the first family number eg.
Use the -listg option to list group names for a specified family. Same as -g but print group name for each tag. May be combined with a number of other options to add group names to the output. Note that NUM may be added wherever -G is mentioned in the documentation. See the -g option above for details. Use HTML table formatting for output.
Implies the -E option. Generate a dynamic web page containing a hex dump of the EXIF information. This can be a very powerful tool for low-level analysis of EXIF information. The -htmlDump option is also invoked if the -v and -h options are used together. The verbose level controls the maximum length of the blocks dumped. Use -htmlDump0 for absolute offsets. This option may be combined with -g to organize the output into objects by group, or -G to add group names to each tag.
List-type tags with multiple items are output as JSON arrays unless -sep is used. By default XMP structures are flattened into individual tags in the JSON output, but the original structure may be preserved with the -struct option this also causes all list-type XMP tags to be output as JSON arrays, otherwise single-item lists would be output as simple strings.
The -a option is implied when -json is used, but entries with identical JSON names are suppressed in the output. Adding the -D or -H option changes tag values to JSON objects with "val" and "id" fields, and adding -l adds a "desc" field, and a "num" field if the numerical value is different from the converted "val".
The -b option may be added to output binary data, encoded in base64 if necessary indicated by ASCII "base" as the first 7 bytes of the value , and -t may be added to include tag table information see -t for details. The imported JSON file must have the same format as the exported JSON files with the exception that the -g option is not compatible with the import file format use -G instead. Additionally, tag names in the input JSON file may be suffixed with a to disable print conversion.
This is the original file before removing the metadata. I used quotes around "remove" because for PDF files the metadata is only removed from the document information dictionary, and not actually deleted from the file. It sounds from your description as if you would like to delete this information permanently from the file. You should be able to do this by using the acrobat distiller to linearize the PDF after removing the metadata with ExifTool, but I haven't actually tested this myself.
Thanks for such a quick and comprehensive response. I DO want to remove the data permanently, so I will investigate the linearization what a word! Actually, would you need to do that, or would linearization remove it anyway? Cheers Chris. I'm not sure how the acrobat distiller handles metadata, but unless it has a special option to remove it then you would need something like ExifTool to do this for you first. I just had another idea. So you could also remove the metadata using a technique like this, but note that the print conversion may affect the look of the document since it could change the layout for printing.
I tried running Distiller but it says it does not process PDF files it appears to only process Postscript files See the -n option in the application documentation for more details. Note: Changes to PDF files are reversible because the original metadata is never actually deleted from these files.
See the PDF Tags documentation for details. Many tag names are valid for more than one of these groups. If a group name is not specified when writing information, then the information is added only to the highest priority group for which the tag name is valid however, the information is updated in all groups where the tag already existed.
The priority of the groups is given by the list above. Alternatively, information may be written to a specific group only, bypassing these priorities, by providing a group name for the tag. The " Writing Meta Information " section above gave the syntax rules for exiftool command-line arguments to do this.
Any family 0, 1, 2 or 7 group name may be used when writing information, although not all groups are writable. A special ExifTool option allows copying tags from one file to another. Any tags specified after this option on the command line are extracted from source file and written to the destination file.
If no tags are specified, then all writable tags are copied. This option is very simple, yet very powerful. Depending on the formats of the source and destination files, some of tags read may not be valid in the destination file, in which case they aren't written.
This option may also be used to transfer information between different tags within a single image or between different images. See the -tagsFromFile option in the application documentation for more details.
This may be a security problem if ExifTool is executed from another application that blindly passes untrusted file names on the command line since they may be interpreted as ExifTool options if they begin with a dash. One way to accomplish this is to prefix input file names with a known directory name, eg.
ExifTool has a time shift feature that makes it easy to apply a batch fix to the timestamps of the images eg. Say for example that your camera clock was reset to when you put in a new battery at Then all of the pictures you took subsequently have timestamps that are wrong by 5 years, 10 months, 2 days, 10 hours and 48 minutes.
To fix this, put all of the images in the same directory " DIR " and run exiftool:. The example above changes only the DateTimeOriginal tag, but any writable date or time tag can be shifted, and multiple tags may be written with a single command line. For convenience, a Shortcut tag called AllDates has been defined to represent these three tags.
So, for example, if you forgot to set your camera clock back 1 hour at the end of daylight savings time in the fall, you can fix the images with:. See Image::ExifTool::Shift. Or a new directory can be specified by setting the value of the Directory tag. There is a significant overhead in loading ExifTool, so performance may be greatly improved by taking advantage of ExifTool's batch processing capabilities the ability to process multiple files or entire directories with a single command to reduce the number of executed commands when performing complex operations or processing multiple files.
0コメント