I am using a PCRE compatible file rename program. Is there a character or pattern I can type in the "replace" field of the program to tell it to append numbers at the end of file names and that they should be increasing for each new file?
Here is an example I made on the fly.
doc1 - Kopia (2) - Kopia.txt
doc1 - Kopia (2) - Kopia_2.txt
doc1 - Kopia (2).txt
doc1 - Kopia (2)_2.txt
doc1 - Kopia (3).txt
doc1 - Kopia (3)_2.txt
doc1 - Kopia - Kopia (2).txt
doc1 - Kopia - Kopia (2)_2.txt
doc1 - Kopia - Kopia - Kopia.txt
doc1 - Kopia - Kopia - Kopia_2.txt
doc1 - Kopia - Kopia.txt
doc1 - Kopia - Kopia_2.txt
doc1 - Kopia.txt
doc1 - Kopia_2.txt
doc1.txt
doc1_2.txt
I want to retain "doc" at the beginning and I want to retain the file name extension. The program has a check mark that either enables or disables processing of extensions. So if I leave that unchecked I should not have to worry about that. I want the number after "doc" to increase for each file, since I am not allowed to have several files with the same same name in the same folder.
So this is what it should end up with.
doc1.txt
doc2.txt
doc3.txt
etc... you get the idea
I only use .*
as the "match" pattern. And I figure the "replace" pattern should be something like doc{n}
but what should I type in place of {n}
I have no idea. Is there any simple pattern like that, that I can use here?