Created
May 2, 2016 05:03
-
-
Save aoriani/22de0f521164a052b088a1a0384bedf5 to your computer and use it in GitHub Desktop.
Set the creation and modification date to reflect exif information
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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