copyphotos

Ever get frustrated by the meaningless filenames your digital camera uses?

copyphotos is a command-line utility which renames your photos based on the date and time they were taken, giving you useful filenames like 2007-04-21_10-09-42.JPG instead of P017732.JPG. It also creates directories for the year, month, and date, making it simple to keep your photo collection organised.

Download

Usage

copyphotos [options] <source-directory> <destination-directory> 

Description
Copies all image files (JPEG or TIFF format) from the source-directory into the destination-directory, renaming the files by timestamp and building a year/month/date directory structure. Note that all sub-folders in the source-directory will be searched for images, so you only need to supply the top-level directory of your camera's memory card.

If two images have the same timestamp (e.g. from a camera taking multiple frames per second), the new filenames will be given a numeric suffix (_1, _2, _3, etc).

Options

  • --template
    Changes the format of file and directory names. The default template is "YYYY/MM/DD/YYYY-MM-DD_HH24-MI-SS", which will create directories for the year, month, and date, and rename files with a full timestamp. The template uses the Oracle date format.
  • --offset
    Applies an offset value (specified in hours) to each timestamp, useful when travelling abroad!

A sample directory structure created by copyphotos.pl (using the default filename template) is shown below:

2005/
      10/
          25/
               2005-10-25_20-11-35.JPG
               2005-10-25_21-49-06.JPG
          28/
               2005-10-28_09-15-00.JPG
               2005-10-28_09-15-00_1.JPG
               2005-10-28_09-15-01.JPG
      11/
          06/
               2005-11-06_12-42-18.JPG

Dependencies
To run copyphotos.pl, the following Perl modules are required:

Copyright and License
Copyright © 2008 Jon Allen.
This software is licensed under the terms of the Artistic License version 2.0.