Listmates,
I've been meaning to pass this snippet along. I believe it was Patrick that
pointed me to exiftool some time back. Organizing you mass of digital pictures
couldn't be any easier than with exiftool or jhead. Both available for openSuSE
and, for your friends that don't use linux, each has a windows counterpart that
runs from the command prompt.
Many of you already know, but for those that don't, one of the biggest pains
about digital cameras is organizing the hundreds or thousands of 103Z2987.jpg
files into a meaningful file structure that allows you to find pictures when you
need them.
A filename like 103Z2987.jpg doesn't tell me anything about that photo except
that it came from my wife's camera because I set her camera to create 103Z...
files. What I want in a filename is information that tells me when the picture
was taken that will sort in chronological order no matter what I am looking at
them with. I like a filename of the form YYYY-mm-DD-HHMMSS.jpg. For example:
2009-01-27-165238.jpg
That way, just by looking at the filename, I know exactly when that photo was
taken.
Both exiftool and jhead provide the perfect solution. They will read the exif
data and rename the photos with the format you provide. (the format parameters
are from strftime). exiftool is a bit more flexible because, not only will it
rename for you, but it will move the resulting files to where ever you want them.
I had thousands of files in an awkward directory structure partially created
from digikam and partially created by copying the photos from the memory stick.
With one basic command line, I was able to rename and reorganize everything into
a logical structure by year, by months 1-12, and then by date and time in each
month. Example:
2003
2004----
01
02
03-------
2004-03-05-174331.jpg
2004-03-05-174522.jpg
2004-03-07-082311.jpg
04
..
12
2005
...
2009
The man page for exiftool is quite good (see the example section at the bottom)
I used the following command to reorder everything into the directory structure
above using the exif tag 'CreateDate' for the file name:
exiftool -r '-FileName