Currently, I'm importing a huge batch of photos from my camera, and it's busy renaming the files to *_v1, *_v2, cuz I've formatted the memory card so the camera started counting up from zero again and I so far haven't applied the "rename-on-import" feature of digikam (which most probably I should have).

So while it's doing the importing, I'm wondering if I can save the day ex-post / ex-import "easily". Can I? If so, how?

  • \$\begingroup\$ btw, you can usually set a camera to not start over on the count. I wait until it gets close to the 10,000 mark then change the last letter instead DSC, DSD, DSE etc \$\endgroup\$
    – Tetsujin
    Aug 13, 2022 at 8:57

2 Answers 2


The existing answer explains how to do this with other tools but since the question is about digiKam:

You can easily do at least the the renaming directly in digiKam:

  • Select all images that you want to rename (e.g. use Ctrl+A to select all)
  • Press F2 to open the rename dialog
  • In the text field below the file list, put something like [date:ISO]_###[e]. This results in files to be renamed based on their creation date and a incremented number (something like 2023-01-13T10:57:17_001.jpg). You can also use custom date formats (e.g. [date:"yyyy-mm-dd"] for only the date). The ###-part adds the increasing number at the end. I find this helpful to avoid name collisions if two photos were taken in the same second (e.g. when bracketing). [e] makes this number "extension aware", i.e. files with identical names but different extensions will get the same number (useful if you shoot raw+jpg). There are lots of other variables you can use, see the buttons below the text field. You will also get a preview of the new names in the file list, so you can play around until you are happy, before actually renaming the files.

enter image description here

Note however, that it seems not to be possible to create directories as part of this renaming, so you cannot have the photos automatically moved into date-based subdirectories with this. I'm not sure if digiKam also has a feature for this, at least I couldn't find something on first glance.


As far as I understand it, this is a case of a mass rename problem.

In all but trivial cases, it requires a specialised tool. But since it's a common problem, it's worth having a good tool. I'll describe how I deal with the problem in Windows.

I use a multi-rename tool built in the Total Commander file manager. If you are not already using it, getting a whole file manager for just renaming may seem excessive, but 1) it's very small and non-disruptive (can be used in a portable way); 2) it's insanely more productive and convenient than Windows Explorer, so it's worth having it anyway.

Then, you need an EXIF plug-in to it. To install it, just open this zip from within Total Commander, and it will offer to install it.

Now you are set up. With Total Commander, navigate to the folder where you dumped all the photos. Select all photos:

  • Ctrl+A, or
  • Numpad * (this inverts selection, which is presently none), or
  • if you have other files in the folder, position the cursor on any jpg file and press Alt+(Numpad +): this will select all files with the extension matching the current file.

Now press Ctrl+M to invoke the Multi-Rename Tool.

TC Multi-rename

All you need to do is to create the rename mask, i.e. the pattern for the new file names.

I don't know how you prefer to name your files, but let's name them with just a sequential number yet put them in separate folders according to their EXIF date.

Delete what's in the Rename mask field currently, click [=?] Plugin and select the required EXIF field in the preferred format.

Then add a backslash \. This will cause it to make a folder. You can have any depth, like <year>\<month>\<photo.jpg>.

Then add a counter [C]. You can start from any number and have any width (and step). Say, if you had last number 123 before you formatted the card and you want to continue, type in [C124:4]: this will make the first name 0124 (with the unchanged extension, given the default pattern [E]). But note all files will have a sequential number in the current operation. Your camera may or may not have a built-in sequence number somewhere in EXIF and you can try to explore, but most likely you will have to handle the number yourself from now on.

Altogether, we have a pattern like [=exif.DateOriginal.Y-M-D]\[C124:4] for now. If you are happy with the new names displayed, press Start!.

If it somehow went wrong, you can undo this action, even after closing the tool: just invoke it again (with any selection) and press Undo.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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