ExifTool Commands Cheat Sheet

• Updated November 21, 2019

ExifTool by Phil Harvey is a fantastic tool to edit the exif metadata on your pictures. It is especially useful when you have a lot of pictures to edit and have no desire to change metadata by hand.

This post will be an ever growing list of useful exiftool commands and scripts.

Remove Exif Properties from Pictures

If you are uploading a picture to a public website, it would be wise to scrub any exif properties - especially if there are GPS exif properties. You can do this with the following command:

exiftool -all= picture.jpg

If you are in a directory with many pictures that you want to scrub the exif data from, you can use a wildcard to process them all:

exiftool -all= *.jpg

Find Files Missing Exif Properties

You can quickly figure out if a picture is missing a particular exif property by running the following command. In this example, I want to see if my picture has the DateTimeOriginal exif property set:

exiftool -filename -r -if '(not $datetimeoriginal)' /path/to/picture.jpg

If you have a folder of pictures to check, or even a folder contaning even more folders of pictures, you can simply replace /path/to/picture.jpg with /path/to/picture/directory/:

exiftool -filename -r -if '(not $datetimeoriginal)' /path/to/picture/directory/

The picture does not have the DateTimeOriginal exif property if its file name is returned.

Ryan M provides more insight into finding and fixing images with no exif dates.

Add CreateDate Exif Property to a Picture

If your picture was taken on June 29, 2007 at 1:38:55 PM, you can add the CreateDate exif property to your picture with the following command:

exiftool -createdate="2007:06:19 13:38:55" /path/to/picture.jpg

Add CreateDate Exif Property and Copy DateTimeOriginal Exif Property Value to It

I had a situation where many of my pictures did not have the CreateDate exif property but they did have the DateTimeOriginal exif property. I wanted the CreateDate exif property to have the same value as the DateTimeOriginal exif property. ExifTool’s if functionality makes this easy to fix:

exiftool '-createdate<datetimeoriginal' -r -if '(not $createdate and $datetimeoriginal)' /path/to/picture/directory/

ExifTool will always copy the original picture and then make its modifications. If you want it to overwrite the original picture, add -overwrite_original_in_place to the exiftool command line.


If you found this post useful and would like to help support this site - and get something for yourself - sign up for any of the services listed below through the provided affiliate links. I will receive a referral payment from any of the services you sign-up for.

Get faster shipping and more with Amazon Prime: About to order something from Amazon but want to get more value out of the money you would normally pay for shipping? Sign-up for a free 30-day trial of Amazon Prime to get free two-day shipping, access to thousands of movies and TV shows, and more.

Thanks for reading and take care.