Skip to content

Instantly share code, notes, and snippets.

@filipefigcorreia
Last active December 16, 2024 18:03
Show Gist options
  • Save filipefigcorreia/2929831150b330097c088fdbbf55cd5f to your computer and use it in GitHub Desktop.
Save filipefigcorreia/2929831150b330097c088fdbbf55cd5f to your computer and use it in GitHub Desktop.

My exiftool commands

Commands for handling photos taken with a Nokia 7650

Extracts the date from the filename (does not take into account summer times)

exiftool "-datetimeoriginal<filename" -overwrite_original .
exiftool '-datetimeoriginal-=00:00:00 01:00:00' -overwrite_original .

Extract date from nokia 7650 comments (apparently most reliable)

exiftool -overwrite_original '-datetimeoriginal<${Comment; $_ =~ /(\d{2})-(\d{2})-(\d{4})\s+(\d{2}:\d{2}:\d{2})/; $_ = "$3-$2-$1 $4"}' .

Copy from datetimeoriginal to file date

exiftool -overwrite_original "-filecreatedate<datetimeoriginal" .

exiftool -overwrite_original "-filemodifydate<datetimeoriginal" .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment