Created
December 10, 2019 07:29
-
-
Save mmrobins/4e4d8577f2b0a8c3175ce0a89a036b42 to your computer and use it in GitHub Desktop.
set photo exif timestamp based on directory name
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 dir in */; do; | |
year=`echo $dir | sed 's/\([0-9]\{4\}\).*/\1/'` | |
month=`echo $dir | sed 's/[0-9]\{4\}\([0-9]\{2\}\).*/\1/'` | |
echo "year $year" | |
echo "month $month" | |
exiftool -P -overwrite_original_in_place "-datetimeoriginal=$year:$month:01 12:00:00" "$dir"/* | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment