Last active
September 15, 2015 06:59
-
-
Save manishrjain/9e0a00aa1696e24f4333 to your computer and use it in GitHub Desktop.
Script to set DateTimeOriginal exif recursively
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
# This script would set all pics to the same date, but ensures | |
# that each pic has a different hour and minute. This is useful | |
# to ensure locality of files when librarian/organize generates | |
# file names from their exif datetime. | |
let h=8 | |
let m=0 | |
find . -type f -name "*.JPG" | while read -r path | |
do | |
let m+=1 | |
if [ $m -ge 60 ]; then | |
let m=0 | |
let h+=1 | |
fi | |
echo "$path => $h:$m" | |
exiftool -DateTimeOriginal="2013:10:15 $h:$m:00" "$path" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment