Use export…file on disk and instead of jpg or what ever use copy…this will copy your file and you can use the variables or add a prefix suffix whatever… If you also put them in a different folder it will be easy to delete the originals if that is what you want to do…so its not a rename as DT will try to remain non-destructive for all options but you can perhaps leverage this…
You can export using them and there is an option called copy which copies your file with the new name…DT is non-destructive by nature so its not otherwise likely to have a rename feature…
Copy is in the file type selection…
Thanks for the suggestion, I will take a look.
Really, the process I adopted (been forced into) w/ dt is less effort than I had to put in when using other programs. Instead of copying the images from a mem card to a folder, importing the images and using whatever renaming function was available, I now do it all with a single process during import. At this point, though it is a different process, ultimately it worked out to be better/easier.
I use tagging capability of dt to link pictures with persons. This hast also the advantage to store information about more than one person (whole family on a Foto).
I use the following file naming pattern:
20250316_234516_00.ARW.
If there are more shots taken the same second as _00.ARW, they become _01.ARW, _02.ARW etc. Those are not subseconds, just a serial number.
Is this possible with this script?
I’m having some problems renaming DSC06586.ARW + DSC06586.ARW.xmp pairs using ExifTool due to darktable’s non-standard .ext.xmp XMP naming scheme.
find the variables you can use when renaming on import here: darktable user manual - import
What script?
Sorry. Here:

This script appears as a lighttable module.
Rename images Lua script

find the variables you can use when renaming on import here: darktable user manual - import
Thanks. It seems it’s sadly not possible to recreate my naming scheme.
maybe file a feature request (Sign in to GitHub · GitHub) - at least a variable for milliseconds is defined to be used in metadata, so maybe not impossible to use it also during import: see darktable user manual - variables

maybe file a feature request (Sign in to GitHub · GitHub) - at least a variable for milliseconds is defined to be used in metadata, so maybe not impossible to use it also during import: see darktable user manual - variables
Thanks! I will. However, millisecond metadata is not available for all cameras and is thus not safe if you want a consistent naming scheme for all your present and future raw files.
What makes sense (to me), after 24 years of shooting raw, is 20250316_234516_00.ARW
, where _00
is a “serial number” for images taken the same second. If there’s only one image taken at 23:45:16 (HH:MM:SS), there’ll only be a 20250316_234516_00.ARW
.
If I took three pictures at 23:45:16, they would be named 20250316_234516_00.ARW
, 20250316_234516_01.ARW
and 20250316_234516_02.ARW
.
EDIT: added time pattern info for 23:45:16.

Thanks. It seems it’s sadly not possible to recreate my naming scheme.

20250316_234516_00.ARW
This isn’t a pattern, it’s a filename. A pattern would be YYYYMMDD_???_??.ARW. I recognize the YYYYMMDD as year, month, day. Not sure what the next number is supposed to represent, and the last 2 are a sequence number based on multiple images in the same second?
If you explain the naming pattern then we could help figure out a solution.

I recognize the YYYYMMDD as year, month, day.
Correct.

Not sure what the next number is supposed to represent
HHMMSS

and the last 2 are a sequence number based on multiple images in the same second?

_00
is a “serial number” for images taken the same second. If there’s only one image taken at 23:45:16 (HH:MM:SS), there’ll only be a20250316_234516_00.ARW
. If I took three pictures at 23:45:16, they would be named20250316_234516_00.ARW
,20250316_234516_01.ARW
and20250316_234516_02.ARW
.
Correct.
So, YYYYMMDD_HHMMSS_SEQUENCENUMBERPERSECOND.EXT
. Basically the same dumbed down ISO 8601 that Google has been using for Android, but with a sequence number per second added.
For completeness sake, here’s my dir structure too:
YYYYY/YYYYMMDD/YYYYMMDD_HHMMSS_SEQUENCENUMBERPERSECOND.EXT
.
As expressed in ExifTool:
/%Y/%Y%m%d/%Y%m%d_%H%M%S%%+.2c.%%e
I’m having some trouble renaming the default camera filenames in ExifTool (with darktable _01.xmp
for duplicates) due to darktable’s non-convential XMP file naming and would love to find a renaming solution within darktable.
I use a very similar pattern, but during import. So that part is feasible. How many images you want to rename? Why do that after editing?

How many images you want to rename? Why do that after editing?
I have some dark years of unsorted files. It’s 30 000 files or more files.
They’re currently DSC02055.ARW
and DSC02055.ARW.xmp
style pairs with DSC02055_01.ARW.xmp
and DSC02055_02.ARW.xmp
style duplicates (sometimes).
Here’s what I want:

YYYYY/YYYYMMDD/YYYYMMDD_HHMMSS_SEQUENCENUMBERPERSECOND.ARW
YYYYY/YYYYMMDD/YYYYMMDD_HHMMSS_SEQUENCENUMBERPERSECOND.XMP
YYYYY/YYYYMMDD/YYYYMMDD_HHMMSS_SEQUENCENUMBERPERSECOND_01.XMP
YYYYY/YYYYMMDD/YYYYMMDD_HHMMSS_SEQUENCENUMBERPERSECOND_02.XMP
It’s certainly doable with a script. I have to think if it’s doable with the current rename script
OK, promising! Get back if you come to think of a solution.

It’s certainly doable with a script. I have to think if it’s doable with the current rename script
Perhaps the last message from a thread of mine on the ExifTool forum could be of help.
Here’s a script that will do the rename. It has shortcuts for renaming a selection, or the collection (current filmroll). You can also enable an option in Preferences->Lua options to have the files automatically renamed after import.
I would recommend you test this before applying it to all of your images just in case I didn’t understand something completely.
rename_by_date_time.zip (2.4 KB)

Here’s a script that will do the rename. It has shortcuts for renaming a selection, or the collection (current filmroll). You can also enable an option in Preferences->Lua options to have the files automatically renamed after import.
Not having used lua scripts in darktable before, how do use/install this script? I use the Flatpak version. What I’ve done:
- I created
~/.var/app/org.darktable.Darktable/config/darktable/luarc/
and placed the script there. - I clicked install scripts and execute (or something like that) in darktable. That created a new
~/.var/app/org.darktable.Darktable/config/darktable/lua/
directory and moved my recently created~/.var/app/org.darktable.Darktable/config/darktable/luarc/
to~/.var/app/org.darktable.Darktable/config/darktable/luarc.old/

I would recommend you test this before applying it to all of your images just in case I didn’t understand something completely.
For sure!
The install scripts and execute download the scripts into ~/.var/app/org.darktable.Darktable/config/darktable/lua
. Under that there are directories and you could drop the script in the one called contrib.
The next time you start darktable, script_manager (bottom left panel) will find it and then you can click the power button to enable it. Go to Preferences->shortcuts, then click on lua scripts and you can assign shortcuts.
I shoot sports with lots of bursts so I had plenty of images to test on. I managed to get to _07 for the sequence a few times.