- Credits to exiftool-cheat-sheet
Read Existing Tags
The bare command just lists all the existing tags found in an image file:
Use the -a
option to see all the entries:
If you want to see a specific tag add it to the command like:
If you need a custom output format, you can use theย -p
ย for Print Format and use tag names as a variable within a string, e.g.
Multiple pictures
To deal with multiple pictures you can either point ExifTool at a directory instead of a single file. Theย -r
ย will run the command recursively, and process any images it finds in sub-directories. e.g. the following will work on all pictures in the Pictures directory, and below.
If you want to filter files based on their type/extension then use theย -ext
ย flag and choose your extension. This isย notย case sensitive, but it will differentiate between โ.jpgโ and โ.jpegโ should you have both in your collection.
Editing tags
Generally editing tags is in the formatย -tagname='new tag value'
, the single quotes are only needed if your new value has spaces in it.
To delete a tag, and its value, just leave a blank after the equals sign, e.g.ย -tagname=
.
There is also a special โallโ tag, which is most useful if you want to remove any metadata from an image, e.g. the following would remove all metadata from all jpg files in the directory โPicturesโ.
List tags
Some tags, like โKeywordsโ are a list. These behaveย slightly differentlyย to other tags. Here you have to either list the entries separately, as follows:
or use theย -sep
ย flag to do it in one entry.
If all you want to do is add or remove specific items you can use theย +=
andย -=
ย operators.