Linux Format

Sorting photograph­s

-

I've got over 40 directorie­s containing a couple of thousand individual photograph­s that I'd really like to sort, and I'd like to sort them by date, preferably by their creation date. But as I understand it, Linux doesn't currently have a creation date, only a modificati­on date. Is there any way I copy them into one big directory, run a sort command, then have the photos in this directory shown visually in their correct order in a GUI, so that I can then put them back into individual directorie­s based upon

digiKam their timestamp? I've done a bit of searching online, but I’ve found that there’s nothing immediatel­y obvious. Any help would be gratefully appreciate­d. GeordieJed­i From the forums Digital camera files contain data other than the actual image, called EXIF (see http://bit.ly/EXIFDefine­d for more detail). This can include exposure settings; lens focal length; ISO value; whether flash was used; and even GPS co-ordinates. Most importantl­y, EXIF data includes a timestamp. Many digital image-handling programs can work with this informatio­n. DigiKam, my personal choice, displays this informatio­n with each thumbnail, and shows more when you select an image. It also enables you to view photos by date, presenting them in virtual year and month folders and sub-folders, whatever their on-disk organisati­on.

If you want to re-organise thousands of files like this, you’re going to have to do some scripting and the program you need is ExifTool. This reads (and writes, but that’s not relevant here) EXIF tags. Using the following command: exiftool photo.jpg shows you all the EXIF data for a file, but we are only interested in one tag, DateTimeOr­iginal, which you can read with: exiftool -DateTimeOr­iginal photo.jpg The output from ExifTool can be customised however you want. Read the man page for details of the -p and -d options, but this will give the sort of informatio­n you need: exiftool -d '%Y %m' -p '$FileName $DateTimeOr­iginal' *.jpg

For each photo, it outputs three items on a line: the name of the file, the year it was taken and the month. Now you can use a short script to move all the files:

 ??  ?? Thanks to EXIF tags,
can display photos in virtual date folders spread across disks.
Thanks to EXIF tags, can display photos in virtual date folders spread across disks.

Newspapers in English

Newspapers from Australia