But what I want to have is a file list like the following, because I want to handle long file lists with different date of the shooting time suddenly.
The numbers of the photos should begin with ...-001 for every new shooting date in the list.
I can give you a quick trick to perform the task in two operations.
The first step involves not adding a sequence number, but instead renaming the files using Dopus' auto-rename if file exists setting. The trick here is to place a (1) at the end of every file so that Dopus will name the second, third, etc. files as: ... (2), ... (3), etc. This gives you the numbering.
The next step is to remove the parens.
So, the first rename settings will be:
Type: Regular Expression
Automatically rename if new file exists:
Old Name: (.)(..)
New Name: {shootingtime|D#yyMMdd} (1)\2
The second will require a script to add the numeric padding. Change nPad to the desired number of padding places you want (it is set to 3 below);
Old Name: (.) ((\d+))(..)
New Name: \1###\2###\3
Type: Regular Expression
Script Mode, with the following script:
@script jscript
var nPad = 3;
var fillChar = 0;
function pad(toPad, padChar, length){
return (String(toPad).length < length)
? new Array(length - String(toPad).length + 1).join(padChar) + String(toPad)
: toPad;
}
Thank you very much for your answer. Sorry for my late reply, I had so much to do.
Your suggested trick sounds very good. But I tried your first step and copied your code into the lines of the rename dialog, marked the auto rename option if new name exist. But I got an syntax error. In the prewiew field all the files have the same name. It is "{shootingtime|D#yyMMdd} (1).jpg".
What do I wrong?
Thanks again!
Holger