Jul 312007

For a while now I’ve been giving all my digital photos filenames that are meaningful to browse, useful to organise and easy (automated) to implement. The date is used to facilitate easy sorting, a few keywords are added to ease browsing, and the timestamp is added to ensure uniqueness. Thus, I end up with filenames like 20070731_a_great_photo_1425-39.jpg.

I use a nifty command-line utility called jhead to automatically assign filenames based on the exif metadata tag that contains the information about when the photo was taken:

jhead -n%Y%m%d__%H%M-%S *.jpg

Having recently purchased a Nikon D70 digital SLR, I am playing with Nikon’s raw file format. To automatically rename the .nef (Nikon Electronic Format) files I have found Exiv2 that can be used as follows.

exiv2 -r'%Y%m%d__%H%M-%S' rename *.nef

This utility can also be used for jpeg files, and may end up superseding jhead for me. To insert human-meaningful keywords into the filenames, I use the rename command:

rename __ _a_great_photo_ 20070731*

  2 Responses to “Easy systematic rename of .jpg and .nef photos”

  1. I’m curious as to your opinion regarding Nikon’s use of a proprietry format.

  2. Well, the short answer is basically a redirect to OpenRAW.

    The long answer might form a post of its own sometime soon.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>