After importing several 1000 Files from a camera onto a hard drive I realized, that the counter, used in the process of renaming the file - does not start from 0. This leads to file structure like this:
My vacation 2018-05-03 2345.jpg
My vacation 2018-05-03 2346.jpg
My vacation 2018-05-04 2347.jpg
I would like to batch rename all those files in a wax, that the index starts with 0
My vacation 2018-05-03 0001.jpg
My vacation 2018-05-03 0002.jpg
My vacation 2018-05-04 0003.jpg
I went already through some topics dealing with batch renaming files and adding an counter/index (bash loop) or usig rename/prename but I was not able to get a working solution for my case.
Basically, I would like to match the part of the filename with the description and the date using the regular expression .*(\d\d\d\d\-\d\d\-\d\d){1}
and add a suffix counter on the end.
My vacation 2018-05-03 0000.jpg
) as you say, or from 1 as you show (My vacation 2018-05-03 0001.jpg
)?