Controlling sequence numbers in export filenames

I’m naming exported files in a sequence – October2018-0001, October2018-0002, etc – using the following template

(FILE_FOLDER)/darktable_edited/October2018-(SEQUENCE)

But I would like to be able to control the starting number for the sequence, so that, for example, I could add more similarly-named files to a folder that already contains several such files, but starting from the next number in the existing sequence.

Can I adjust the template so that I can declare a starting value for $(SEQUENCE)? If so, how?

TIA

If you have the “do not over write” option checked, this is how it should work, I think.

@paperdigits Thanks for replying, but I’m afraid I don’t see that check box on darktable 2.4.4 for Mac. There’s only a selector for what the export module should do ‘on conflict’ (i.e. if a file with the same name already exists); and the options are ‘create unique filename’ or ‘overwrite’.

When you select several files to export, $(SEQUENCE) appends a number to each filename sequentially, starting at 0001. If you later select several more files from the folder you’re working in, and export them with the same template, the export module starts that new sequence at 0001 again. It seems to start every new export action with a sequence starting 0001. Setting the ‘on conflict’ option to ‘Create unique filename’ justs adds a second numeric suffix to the end of any filename that already exists, rather than counting on from what’s already in the target folder.

Of course, the export module can’t know which file already in the target folder has the last number in an a previously-saved sequence. But I would like some way of telling export what number to start from. I rather hoped I might be able to do this by adding something to the template to specifiy where to start the next sequence.

ah yes, that is what I was referencing, sorry.

@paperdigits Doh! You’re quite right — I was being too clever by half trying to control the numbering sequence via a template. Darktable just does it if you use something like
$(FILE_FOLDER)/darktable_edited/October2018
with ‘create unique filename’.

Sorted! Thanks!

1 Like