Skip to content

Instantly share code, notes, and snippets.

@pal
Created March 20, 2011 14:14
Show Gist options
  • Save pal/878340 to your computer and use it in GitHub Desktop.
Save pal/878340 to your computer and use it in GitHub Desktop.
Organize my newly imported images to the correct folder
#!/bin/sh
# Used in an Automator action that is run as a Image Capture Plugin
# Setup some constants
SRC_DIR=${1:-"$HOME/Pictures"} # defaults to "$HOME/Pictures" or file argument
DEST_DIR="$HOME/Backuped/originals/pictures"
# use exiftool to organize all pictures, yay!
# http://www.sno.phy.queensu.ca/~phil/exiftool/
exiftool -r -d $DEST_DIR/%Y/%m/%d/%Y-%m-%d_%H.%M.%S%%-c.%%e "-filename<datetimeoriginal" $SRC_DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment