Created attachment 102351 [details] Patch to add some functionality to the unique modifier My aim was to replace my current bash script for renaming my pictures. My renaming scheme is: *date*_*time**uniq*-*title*.*ext* where the uniq modifier is an alphabetic character in case of naming conflicts. So I implemented an option to user alphabetic characters instead of numbers and to use a custom separator (or none at all in my case). Unfortunately it turned out that there is one major problem with the entire advancedrename module: Renaming is done file by file, so a single renaming process can only be aware of already renamed files. Thus the first file that will be conflicting does not get the *uniq* attachment, e.g. two conflicting files are renamed: datetime-title.jpg datetime_1-title.jpg while the desirable thing to happen would be datetime_1-title.jpg datetime_2-title.jpg However I do not see how this could be easily achieved, so I will keep using my script. However this functionality might be useful to someone, so you might as well integrate it.
Simon, Any feedback and plan to rebase the patch with master ?
Maik, did you review this patch already ? Gilles
Another helpful option of the {unique} modifier would be to make it extension‑aware or to check for real file‑system conflicts only. For example, when renaming RAW+JPEG pairs with the same basename, digiKam currently adds _1 to one of them even though their extensions differ, which results in datetime.jpg datetime_1.arw datetime_2.jpg datetime_3.arw instead of datetime.jpg datetime.arw datetime_1.jpg datetime_1.arw (or optionally combined with Simons request datetime_1.jpg datetime_1.arw datetime_2.jpg datetime_2.arw)
Try the "All" option: {unique:1,_,a} Maik