Skip to content

Evan Hoffman's Blog

Something witty about computers and being a grownup

Month: March 2007

Posted on March 28, 2007

Java utility to reorganize photos by date taken (via EXIF metadata)

I wrote a little utility to reorganize my digital camera pics based on the EXIF date-taken data stored in the pic. It’s pretty simple, I hacked it together in about an hour,
but I thought it might be worth sharing for anyone else looking to do something similar. My camera organizes stuff as it sees fit sometimes, I am particular about my directory structure. This is probably a job best left to perl, but I don’t feel like getting Perl running on my Windows box where all the pics are. Now I can finally burn all my images to DVD.

  • Drew Noakes’s Metadata Extractor – this is
    a required library used to do the actual reading of the exif data.

  • FileOrganizer.java – Abstract base class that moves
    files from a source to a target directory based on criteria specified in the subclass.
  • JpegFileOrganizer.java – Subclass that
    accepts jpeg files and generates the correct path based on the EXIF data stored
    in the image’s header. So if picture pic00001.jpg was taken on August 20, 2004, and the supplied
    target directory is “/pics”, the directory to which the image would be moved would be
    /pics/2004/08/20/pic00001.jpg.

The main() method is in JpegFileOrganizer, its arguments are [sourceDir] [targetDir].

Recent Posts

  • Matrix Revolutions Review
  • Get your COVID Vaccine do-whatever-you-want maskless t-shirt!
  • Not much to say?
  • 2010 Hyundai Sonata review – 10 years later
  • One Year Later

Recent Comments

Shania M on Suffolk County High School Ran…
Jenn on New York Rising is a Scam
toni on New York Rising is a Scam
Lucas on Mac Drivers for the HooToo USB…
Doreen A Clay on New York Rising is a Scam

Archives

  • December 2021
  • May 2021
  • July 2020
  • February 2020
  • July 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • May 2018
  • April 2018
  • March 2018
  • July 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • July 2016
  • May 2016
  • February 2016
  • November 2015
  • October 2015
  • September 2015
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • March 2014
  • February 2014
  • December 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • April 2013
  • February 2013
  • January 2013
  • December 2012
  • September 2012
  • August 2012
  • June 2012
  • May 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • January 2008
  • September 2007
  • March 2007
  • August 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006
  • November 2005
  • September 2005
  • August 2005
  • March 2005
  • February 2005
  • July 2004
  • July 2003
  • April 2002
  • March 2002
  • February 2002
  • December 2001
  • October 2001
  • September 2001
  • August 2001

Categories

  • Uncategorized

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.com
Blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • Evan Hoffman's Blog
    • Join 25 other followers
    • Already have a WordPress.com account? Log in now.
    • Evan Hoffman's Blog
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar