I am having a problem with particular device where i transfer files to. This device is not capable of sorting files for use, it always uses ascending
a-z sorting. That creates a problem where i need files to be "processed" by creation date instead.
That said, I came up with an idea to have script in form of .bat
file i.e. I would put that script into directory where all the files are and simply run it.
The idea is that script would need to iterate over all the files, the only requirement would be that it needs to sort files descending
by creation date before it starts. Then during iteration it would need to rename each file for the purpose of adding letters and digits in front.
The result would be following:
a1-file-name.dat // created 5 min ago
...
a2-file-name.dat // created 10 min ago
...
a9-file-name.dat // created 15 min ago
b1-file-name.dat // created 20 min ago
...
b6-file-name.dat // created 25 min ago
...
b9-file-name.dat // created 30 min ago
I have zero experience and know-how in case of windows scripts, so i would ask for help with this one.
Couple of facts:
- I can only add up to 6 characters to every file name
- I cannot add
0
digit to a file name