Skip to content

Instantly share code, notes, and snippets.

@robcolburn
Created June 3, 2015 19:15
Show Gist options
  • Save robcolburn/b9d2ba4cd92414448bec to your computer and use it in GitHub Desktop.
Save robcolburn/b9d2ba4cd92414448bec to your computer and use it in GitHub Desktop.
Set the modification date / creation date of a set of photos to their filenames
# example 20150502_114929.jpg was taken on 2015-05-02 at 11:49:29
for f in *.jpg; do t=$(echo $f | sed -E 's/20([0-9]{6})_([0-9]{6}).jpg/\1\2/'); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment