Created
December 28, 2014 19:11
-
-
Save dpq/db783def6e0a8ffd9906 to your computer and use it in GitHub Desktop.
Batch rename JPEG files to match the datetime they had been taken on
This file contains hidden or 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 x in $(ls -1 *JPG); do mv -i $x IMG_$(exif $x | grep Date | head -1 | awk '{ print $4"_"$5 }' | sed 's/[|:]//g').jpg; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment