Learn how to use ExifTool to manipulate metadata in various file formats.
exiftool -GPSLatitude= -DateTimeOriginal= image.jpg
exiftool -alldates image.jpg
exiftool -all= directory/
exiftool -IPTC:all= file.jpg
exiftool -XMP:all= file.jpg
exiftool -Make= -Model= image.jpg
exiftool -GPS:all= image.jpg
exiftool -IPTC:Caption= -IPTC:Keywords= image.jpg
exiftool -XMP:XMP:Creator= -XMP:XMP:Subject= image.jpg
exiftool -QuickTime:CreationDate= -QuickTime:Artist= video.mp4
exiftool -ExposureTime= -FNumber= image.jpg
exiftool -icc_profile:all= image.jpg
exiftool -Photoshop:AuthorsPosition= -Photoshop:Credit= image.jpg
exiftool -XMP-GPS:all= image.jpg
exiftool -IPTC-Location:all= image.jpg
exiftool -XMP-MP:all= video.mp4
exiftool -MPEG:all= video.mp4
exiftool -JFIF:all= image.jpg
Manipulate Dates
Update the DateTimeOriginal of an image to a specific date and time:
exiftool -DateTimeOriginal="2022:01:15 10:30:00" image.jpg
Shift the DateTimeOriginal of an image by a specific time offset (e.g., 1 hour forward):
exiftool "-DateTimeOriginal+=0:1:0 0" image.jpg
Set the CreateDate, ModifyDate, and DateTimeOriginal of an image to the current date and time:
exiftool "-CreateDate<now" "-ModifyDate<now" "-DateTimeOriginal<now" image.jpg
Adjust the DateTimeOriginal of an image by a specific time difference (e.g., 2 hours earlier):
exiftool "-DateTimeOriginal-=0:2:0 0" image.jpg
Set the GPSDateStamp and GPSTimeStamp of an image to a specific date and time:
exiftool -GPSDateStamp="2022:01:15" -GPSTimeStamp="10:30:00" image.jpg
Set the FileModifyDate of a file to a specific date and time:
exiftool -FileModifyDate="2022:01:15 10:30:00" file.txt
Adjust the ModifyDate of a file by a specific time offset (e.g., 30 minutes forward):
exiftool "-ModifyDate+=0:0:30" file.txt
exiftool "-MediaCreateDate<now" "-MediaModifyDate<now" video.mp4
Update the DateTimeOriginal of multiple images in a directory to a specific date and time:
exiftool -DateTimeOriginal="2022:01:15 10:30:00" directory/
Set the DateCreated and DateModified of a file to a specific date and time:
exiftool -DateCreated="2022:01:15 10:30:00" -DateModified="2022:01:15 10:30:00" file.txt
Set the ISO value of an image to a specific value:
exiftool -ISO=200 image.jpg
Change the ExposureTime of a photo to a longer exposure:
exiftool -ExposureTime=1/30 image.jpg
exiftool -Copyright="Copyright © 2022 Your Name" image.jpg
Set the Artist tag of an image to a specific value:
exiftool -Artist="John Doe" image.jpg
exiftool -Make="Nikon" -Model="D850" image.jpg
exiftool -Keywords+="landscape" -Keywords+="nature" image.jpg
Set the GPS latitude and longitude of an image:
exiftool -GPSLatitude=37.7749 -GPSLongitude=-122.4194 image.jpg
Rotate an image based on the Orientation tag:
exiftool -Orientation#=1 image.jpg
exiftool -XMP:Description="A beautiful sunset over the mountains" image.jpg
exiftool -Model="Canon EOS 5D Mark IV" image.jpg
exiftool -IPTC:Title="Sunflower Field" image.jpg
Adjust the exposure compensation value of an image:
exiftool -ExposureCompensation=-0.5 image.jpg
Set the resolution unit and XResolution/YResolution values of an image:
exiftool -ResolutionUnit=inches -XResolution=300 -YResolution=300 image.jpg
exiftool -XMP:Creator="Jane Smith" image.jpg
exiftool -all= /path/to/folder1/*
Set all dates to January 1, 1990, for files in folder2
exiftool -AllDates="1990:01:01 00:00:00" /path/to/folder2/*
for file in /path/to/folder3/*; do
exiftool -all= "$file"
done
Set all dates to January 1, 1990, for files in folder4 using a loop
for file in /path/to/folder4/*; do
exiftool -AllDates="1990:01:01 00:00:00" "$file"
done
exiftool -all= /path/to/folder5/*.jpg
Set all dates to January 1, 1990, for JPEG files in folder6
exiftool -AllDates="1990:01:01 00:00:00" /path/to/folder6/*.jpg
for file in /path/to/folder7/*.jpg; do
exiftool -all= "$file"
done
Example 8: Set all dates to January 1, 1990, for JPEG files in folder8 using a loop
for file in /path/to/folder8/*.jpg; do
exiftool -AllDates="1990:01:01 00:00:00" "$file"
done
exiftool -all= /path/to/folder9/*.png
Set all dates to January 1, 1990, for PNG files in folder10
exiftool -AllDates="1990:01:01 00:00:00" /path/to/folder10/*.png
for file in /path/to/folder11/*.png; do
exiftool -all= "$file"
done
Set all dates to January 1, 1990, for PNG files in folder12 using a loop
for file in /path/to/folder12/*.png; do
exiftool -AllDates="1990:01:01 00:00:00" "$file"
done
exiftool -all= /path/to/folder13/*.mov
Set all dates to January 1, 1990, for MOV files in folder14
exiftool -AllDates="1990:01:01 00:00:00" /path/to/folder14/*.mov
for file in /path/to/folder15/*.mov; do
exiftool -all= "$file"
done
Set all dates to January 1, 1990, for MOV files in folder16 using a loop
for file in /path/to/folder16/*.mov; do
exiftool -AllDates="1990:01:01 00:00:00" "$file"
done
exiftool -all= /path/to/folder17/*.mp3
Set all dates to January 1, 1990, for MP3 files in folder18
exiftool -AllDates="1990:01:01 00:00:00" /path/to/folder18/*.mp3
for file in /path/to/folder19/*.mp3; do
exiftool -all= "$file"
done
Set all dates to January 1, 1990, for MP3 files in folder20 using a loop
for file in /path/to/folder20/*.mp3; do
exiftool -AllDates="1990:01:01 00:00:00" "$file"
done