ExifTool Usage Examples

By Ercan - 13/04/2025

ExifTool is a robust and open-source command-line application developed by Phil Harvey, designed to read, write, and manipulate metadata across hundreds of file formats.
Whether you're geotagging images for a research dataset or updating timestamps after image capture, ExifTool provides a flexible and script-friendly solution.

You can download ExifTool by using link below.

https://exiftool.org/

📦 Basic Metadata Operations

View all metadata:

exiftool image.jpg

View specific fields:

exiftool -Make -Model -DateTimeOriginal image.jpg

Export all metadata to a text file:

exiftool image.jpg > metadata.txt

List all supported tags:

exiftool -list

 

🗓️ Date & Time Adjustments

Set a new capture date:

exiftool -DateTimeOriginal="2025:10:10 12:30:00" image.jpg

Shift timestamps (e.g., +3 hours):

exiftool "-DateTimeOriginal+=3:0:0" image.jpg

Copy timestamp from file system modification date:

exiftool "-DateTimeOriginal<FileModifyDate" image.jpg

 

🧭 GPS & Location Examples

Add GPS coordinates:

exiftool -GPSLatitude=41.015137 -GPSLongitude=28.979530 -GPSLatitudeRef=N -GPSLongitudeRef=E image.jpg

Remove GPS information:

exiftool -GPS*="" image.jpg

Copy GPS data from another file:

exiftool -tagsFromFile source.jpg -GPS:all target.jpg

Convert GPS to decimal format:

exiftool -c "%.6f" -GPSLatitude -GPSLongitude image.jpg

 

🧑‍💻 Author & Copyright Tags

Add author and copyright:

exiftool -Artist="Ercan S." -Copyright="© 2025 ercan.dev" image.jpg

Add description and keywords:

exiftool -ImageDescription="Product photo for dataset" -Keywords="OpenCart,Product,Dataset" image.jpg

Remove creator info:

exiftool -Creator= -Artist= image.jpg

 

🏷️ Working with Custom Tags

Add custom comment:

exiftool -Comment="Validated for AI training" image.jpg

Read comment:

exiftool -Comment image.jpg

Add or update software tag:

exiftool -Software="Metadata Processor 1.2.0" image.jpg

 

📂 Batch Processing Examples

Add metadata to all .jpg files in a directory:

exiftool -overwrite_original -Artist="ercan.dev" *.jpg

Recursively process all images in subfolders:

exiftool -r -GPSLatitude=41.0151 -GPSLongitude=28.9795 .

Copy all metadata from one file to another (clone metadata):

exiftool -TagsFromFile reference.jpg -all:all target.jpg

Remove all metadata from multiple files:

exiftool -all= *.jpg

 

🧪 Data Export & Integration

Export metadata to JSON (useful for dataset indexing):

exiftool -json image.jpg > metadata.json

Export only selected tags:

exiftool -json -DateTimeOriginal -Make -Model image.jpg

Generate CSV of metadata for all images:

exiftool -csv -r -Make -Model -DateTimeOriginal *.jpg > metadata.csv

 

🚀 Final Notes

ExifTool is a powerful tool for managing and manipulating image metadata.
It allows you to read, edit, and automate metadata tasks efficiently, whether you are working with a single file or large collections of images.

💡 Pro tip: Always test commands on a copy of your images before applying batch operations. ExifTool creates .jpg_original backups by default, or you can use -overwrite_original to modify files directly.

With its flexibility and broad format support, ExifTool is an essential utility for anyone handling images, providing a reliable way to enhance, organize, and standardize metadata across your files.

Tags: exiftool