Created
July 26, 2017 12:33
-
-
Save grimmo/41af3a91a5401ffb58b47fea4ed25da0 to your computer and use it in GitHub Desktop.
Set the timestamp via exiftool based on directory name structure
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 foto in `find . -name "*.jpg" -not -path "*/.xvpics/*"` ; do DATAFOTO=`dirname $foto | cut -d '.' -f3,4 | cut -d '-' -f1 | sed -e 's/^/19/'| sed -e 's/[a-z]//g' | tr '.' ':' | sed -e 's/$/:01 00:00:00/'` ; if [ ${#DATAFOTO} -eq 19 ] ; then exiftool "-AllDates=$DATAFOTO" "$foto"; fi ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment