Method based on a filename starting with a non-digit character

Advanced Renamer forum
#1 : 27/01-15 06:58
Posts: 60
I am trying to write a Replace Method which checks if the first character in the filename is a non-digit and if it is will add numbering to the start of the filename based on the number of files in the directory.


27/01-15 06:58
#2 : 28/01-15 20:22
Kim Jensen
Kim Jensen
Posts: 800
Reply to #1:
Try to do this:

Add the Replace Method and configure it like this:
Text to be replaced: ^([^\d])
Replace with: <Inc NrDir:1>\1
Use regular expressions: Checked

The regular expressions explained:
The first ^ matches the beginning of the file.
\d matches any digit and [^\d] matches any non-digit.

28/01-15 20:22
#3 : 30/01-15 19:01
Posts: 60
Reply to #2:
Thanks very much for the solution.
I figured one out for myself

Text to be replaced

Replace With
<Inc NrDir:001> - \1

30/01-15 19:01
#4 : 09/09-16 20:08
Posts: 2
Reply to #2:

i've been rackin my brain for some time trying to figure out a way to essentially do the reverse of this. i'd like all files in a particular folder to include the date created. some of them conform to this while the newer ones do not. until i found this topic, i was attempting scripting =|

keyboard shortcuts2.doc
should resemble
keyboard shortcuts1 06-07-15.doc

any assistance in the solution, would be greatly appreciated.

09/09-16 20:08