photoname is a command-line utility for renaming/moving photo image files. The new folder location and naming are determined by two things: the photo shoot date information contained within the file's EXIF tags and the usually-camera-assigned serial number, often appearing in the filename.
photoname is written in Haskell. It's known to work with GHC 6.8.2 on systems where System.Posix (unix) packages are available. Bjorn Bringert's libexif binding library is required to build this software.
The path calculation scheme used here is admittedly specific to my needs. I welcome suggestions discussing, or patches allowing, more flexibility.
photoname's --help usage information:
Usage: photoname [OPTIONS] PARENTDIR FILES
Rename and move photo files based on EXIF data
Options:
-n --no-action Display what would be done, but do nothing
-q --quiet Suppress normal output of what's being done
--move Move the files, don't just hard-link to the new locations
-h --help This help text
This software is for renaming and storing your digital photos. It will extract
shoot date from the EXIF data in the image file and use that along with the
usually-camera-assigned serial number to build a meaningful filename.
You get a subdirectory hierarchy consisting of directories for the years,
then subdirs within those for the day photos were shot. These day dirs
contain the image files, renamed as follows:
A photo shot on 2002-May-02 with a Canon camera:
img_1790.jpg -> <PARENTDIR>/2002/2002-05-02/20020502_790.jpg
The <PARENTDIR> is the one given on the command-line to this utility, and
represents the top-level of where you're storing photos.
Note that the default behavior of this software is to create hard links to
the new paths and leave the original links as they were. You can use the
--move switch to blow away the original location, leaving only the new.
Version 2.0 2008-Mar-04 Dino Morelli <dino@ui3.info>
older
last modified 2008-03-20