I used to lug around a big DSLR camera before I started traveling more often and before I decided packing light was a skill I had to conquer. Flexible and creative packing is the reason my little iPhone camera turned in to my favorite snapshot tool and most of my photography shifted from stock and portraits to being just about capturing my own favorite memories. Every so often, I still get my hands on a nicer-than-nice, borrowed, gorgeous Nikon—which is pretty awesome because I can get a real photography fix without spending too much cash on equipment.
When it comes to photos just for me though, I love the iPhone camera so much. It’s freedom. It’s versatile. It does just enough. However, I was missing a way to organize photos into the folders I wanted exactly how I wanted them organized.
I use Lightroom, and I know it has an import feature, but I want the raw photo data where I put it, organized how I want it, and backed up the way I decide. Okay, so it’s about control, but it’s also about keeping my photo workflow the way I like it and the way I’ve always done it. Also, I really like bash scripts.
I organize my photos by date like this:
Then I use a setup like so to move photos:
- Make sure ExifTool is installed and working
- Set up a folder named
- Connect your iPhone and open Image Capture
- For the “Connecting this iPhone opens” setting, select AutoImporter.app
- Open Finder, press Cmd+G and go to
- Double click AutoImporter.app and open Preferences right away
- For the “Import folder” setting, select
- Uncheck the subfolder option
- Check the option to “Delete items from camera after successful import”
- Create a bash script
~/bin/movephotos.sh(see code below)
- Open AppleScript Editor and compile this line:
do shell script "/Users/yourusername/bin/movephotos.sh”
- Save the AppleScript as
~/Library/Scripts/Folder Action Scripts/movephotos.scpt
- Open Finder, right-click
~/Pictures/Imported, and go to Services > Folder Actions Setup…
- Select “movephotos.scrpt,” check “Enable Folder Actions,” and click the Attach button
~/bin/movephotos.sh sample code:
if [ -d $DEST_DIR ]; then
for i in $( find $SOURCE_DIR -type f ) ; do
mkdir -p $(exiftool -d $DEST_DIR/%Y/%m/%y%m%d/ -p '$DateTimeOriginal' $i);
mv -n $i $_;
If you want to change file locations, just adjust the source and destination variables and the paths in the bash script to your liking.
Not everyone will like this setup. :) It’s pretty manual in some respects, but I like it because it lets me mess around with ExifTool and bash scripting and I can organize my photos exactly how I like.
[UPDATE: 2015-04-03 Based on Common Mistakes when using ExifTool, I was able to reduce the bash script above to a single line shown below. The path after “-d” is the target and the next path listed is the source.]