Skip to content

Instantly share code, notes, and snippets.

@mobilemind
Created May 10, 2014 00:26
Show Gist options
  • Save mobilemind/bb5955bccc90e42d6caf to your computer and use it in GitHub Desktop.
Save mobilemind/bb5955bccc90e42d6caf to your computer and use it in GitHub Desktop.
set file date to EXIF date
# depends on exiftool
for TKJF in photo\(?\).jpg
do touch -t "$(exiftool -DateTimeOriginal -S "$TKJF" | awk '{gsub(":","",$0); print $2 substr($3, 1, 4) "." substr($3, 5, 6) }')" "$TKJF"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment