I have been using f-spot for a few years to manage my photo archive, which is about 50K images at the moment. With the development of f-spot slowing down in the recent years and me switching to KDE, I'm looking at using DigiKam, which seems to be very nice and packed with features beyond my wildest hopes :)

One thing I'm missing though is the way f-spot was importing the images: it was creating subdirectories based on the image's shooting date:


I don't seem to be able to find a way to make DigiKam to behave like this - although it has some settings to change the image filename according to some mask which may include shooting date, I see no way to tell it to create sub-directories. (Update - as user26687 pointed out, there is a way to create subdirectories like Photos/2011-11-13, but still I can find no way to create separate subdirectories for year, month and day)

Is there a way to make DigiKam to behave like this? Or, alternatively, what is a good program to import images from a camera and save them on disk in subdirectories according to their shooting date?



Offline docs: K > Applications > Help > Application Manuals > Graphics > digiKam

digiKam > Using digiKam > Using a Digital Camera With digiKam > Automatic Destination Albums Creation

Online docs: http://docs.kde.org/development/en/extragear-graphics/digikam/using-camera.html

If your camera provides information about the date of the photograph's taking, digiKam can use this to automatically create subalbums in the destination Album when it is downloaded...

Plug in a device. The digiKam import window has the settings for the "Auto Creation of Albums"

enter image description here

In recent versions of digiKam you can create multiple levels of sub-albums by using / in a custom date format:

auto-create sub-albums with date format "yyyy/MM/dd"

It seems that older versions of digiKam are limited to only one level automatic sub directories, so here is an alternative way:

A workaround is to use the [ExifTool] (http://www.sno.phy.queensu.ca/~phil/exiftool/#filename) ("Renaming and/or Moving Files"):

For example, the following command moves all images originally in directory "DIR" into a directory hierarchy organized by year/month/day:

  exiftool "-Directory<DateTimeOriginal" -d "%Y/%m/%d" DIR

ExifTool ubuntu package: libimage-exiftool-perl.

The easy way is to download the images to the main directory and move the pictures with the ExifTool. There is also an option to add a KDE device action.

An Example with the KDE/Kubuntu

The KDE has editable device/solid actions:

The KDE has a GUI to add/edit the device actions: System Settings > Device Actions.

A quick way with the commandline:

  1. Create the local action directory:

    mkdir -p ~/.kde/share/apps/solid/actions/
  2. Copy the digiKam action to work as a template:

    cp /usr/share/kde4/apps/solid/actions/digikam-opencamera.desktop ~/.kde/share/apps/solid/actions/movewithexiftools.desktop
  3. Edit the new action ~/.kde/share/apps/solid/actions/movewithexiftools.desktop to:

    [Desktop Entry]
    X-KDE-Solid-Predicate=[ [ StorageVolume.ignored == false AND StorageVolume.usage == 'FileSystem' ] OR Camera.supportedDrivers == 'gphoto' ]
    [Desktop Action open]
    # %f gives StorageAccess.filePath, %d gives Block.device, %i gives UDI
    Exec=konsole --workdir ~/Pictures --noclose -e exiftool "-Directory<DateTimeOriginal" -d "%Y/%m/%%d" "%f"
    Name=Move with the ExifTool
  4. Reboot

Testing with few pictures

Now there is a new option: Move with the ExifTool.

enter image description here

The Device Action is showing the success/failure with the terminal:

enter image description here

The sub directories have the /YYYY/MM/DD format

enter image description here

Working at here may or may not work there.

  • Thanks for pointing this out, however, the feature does not quite work as I would like: it seems to only be possible to create a single level of sub-folders, i.e. Photos/2011-11-20. I tried creating a custom format "yyyy/MM/dd", but it says "Album name cannot contain /"
    – Sergey
    Nov 20 '11 at 11:34
  • Thanks for the update, I somehow missed it. I'll try to follow your instructions and will report back
    – Sergey
    Dec 30 '11 at 8:40
  • After another reading I realized that the updated recipe will only work for cameras in "mass storage mode", or for a card-reader... guess I finally need to get a card-reader...
    – Sergey
    Dec 30 '11 at 20:45
  • Thanks for the alternative/exiftool version. I keep being amazed at what exiftool can do. Dec 1 '12 at 20:52
  • 3
    Looks like 2020 Digikam already allows multilevel album creation, so no workaround is needed. Just set format to something like 'yyyy/M/dd' and it will create subalbums as needed.
    – jesjimher
    Aug 25 '20 at 11:53

You can use Rapid Photo Downloader and create whatever directory structure you like using a GUI. Be aware, however, that it works better when you use a memory card reader.

  • The application looks awesome, however, it doesn't see my camera (which, as I understand, uses PTP mode, i.e. it's not mounted as a storage device). The note on the site is a bit confusing - "You may find that if you can set your camera to PTP mode, it will work better—it will be recognized as an external drive by Linux." - my understanding is that PTP mode is the opposite of "mass storage device" mode, so the camera won't bee seen as an external drive while in PTP mode
    – Sergey
    Dec 30 '11 at 8:37
  • The quickest and easiest way is to use a card reader. Works every time, and is much less hassle. Dec 31 '11 at 7:12
  • Ok, with a card-reader it works wonderfully. Accepting the answer, thanks
    – Sergey
    Jan 5 '12 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.