Update image timestamp
William McKeehan

Related notes by tag


Update image timestamp

Update image timestamp

This script will update the file timestamp on an image to match its creation date.

Copy
find . -type f | while read PIC
do
  DATE=$(/usr/local/bin/exiftool -p '$DateTimeOriginal' "$PIC" | sed 's/[: ]//g')
  touch -t $(echo $DATE | sed 's/\(..$\)/\.\1/') "$PIC"
done