Skip to content

Instantly share code, notes, and snippets.

@aoriani
Created May 2, 2016 05:03
Show Gist options
  • Save aoriani/22de0f521164a052b088a1a0384bedf5 to your computer and use it in GitHub Desktop.
Save aoriani/22de0f521164a052b088a1a0384bedf5 to your computer and use it in GitHub Desktop.
Set the creation and modification date to reflect exif information
for a in *
do
date=$(exiftool -s -s -s -DateTimeOriginal ${a} |cut -d":" -f1,2,3,4 | tr -d ":" | tr -d " ")
touch -mt ${date} ${a}
touch -t ${date} ${a}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment