Date

This can be used for Date Taken (DateTimeOriginal), Date Created (CreateDate), Date Modified (ModifyDate), or all the three (AllDates).

# Set exact date and time for all files in the current directory
exiftool "-DateTimeOriginal=YYYY:MM:DD HH:MM:SS" ./
exiftool "-CreateDate=YYYY:MM:DD HH:MM:SS" ./
exiftool "-ModifyDate=YYYY:MM:DD HH:MM:SS" ./
exiftool "-AllDates=YYYY:MM:DD HH:MM:SS" ./

# Set exact date and time for a single file
exiftool "-DateTimeOriginal=YYYY:MM:DD HH:MM:SS" filename.jpg
...

# Shift date and time for a single file
exiftool "-DateTimeOriginal+=YYYY:MM:DD HH:MM:SS" filename.jpg
exiftool "-DateTimeOriginal-=YYYY:MM:DD HH:MM:SS" filename.jpg
...

# Print formatted date and time for all jpg files in the current directory.
exiftool -d "%r %a, %B %e, %Y" -DateTimeOriginal -S -s *.jpg
...

Read Metadata

# Print all available metadata for a file
exiftool filename.jpg

# Print all metadata for all files in the current directory
exiftool ./

# Print a specific tag
exiftool -DateTimeOriginal filename.jpg

# Print metadata in short, one-line-per-file format
exiftool -s ./

# Print GPS coordinates
exiftool -GPSLatitude -GPSLongitude filename.jpg

Write/Edit Metadata

# Set a specific tag
exiftool -Artist="John Doe" filename.jpg

# Set multiple tags at once
exiftool -Artist="John Doe" -Copyright="© 2026 John Doe" filename.jpg

# Copy all metadata from one file to another
exiftool -TagsFromFile source.jpg target.jpg

# Remove all metadata
exiftool -all= filename.jpg

# Remove all metadata but keep the original as a backup (default behavior)
exiftool -all= filename.jpg
# Creates filename.jpg_original as backup

# Remove all metadata without creating a backup
exiftool -all= -overwrite_original filename.jpg

# Remove only GPS data (useful for privacy before sharing)
exiftool -gps:all= filename.jpg

Rename Files Using Metadata

# Rename files based on DateTimeOriginal
exiftool "-FileName<DateTimeOriginal" -d "%Y%m%d_%H%M%S.%%e" ./

# Rename and move files into folders by year/month
exiftool "-Directory<DateTimeOriginal" -d "%Y/%m" ./

Batch Processing

# Process files recursively through subdirectories
exiftool -r ./

# Process only specific file types
exiftool -ext jpg -ext png ./

# Exclude specific file types
exiftool --ext cr2 ./

# Process files listed in a text file (one path per line)
exiftool -@ filelist.txt

Output Formats

# Output metadata as JSON
exiftool -json filename.jpg

# Output metadata as CSV for all files in a directory
exiftool -csv ./ > metadata.csv

# Output specific tags as CSV
exiftool -csv -DateTimeOriginal -Model ./ > dates.csv