That works very well!
Thanks very much - it takes a while to learn the language.
I do have a follow up question - w.r.t. renaming files using batch files. (Can I post it here, or is it a new post?)
I would like to keep only the first two and in some case three digits of the original name and delete the rest of the name. The digits are always at the start of the file name.
So if the file name was:
I would like to keep only the 10.rst
but if the files name is:
I would like to keep the 101.rst
So I need the code to recognise numbers, and limit it to the first three characters of the file name; if true, keep it, if false loose it.
Thanks so much again