|Ibrahim - at last good news - thank you. If you really want to do something for me please make a small donation to your local Breast Cancer Support Group.|
Your comment that there is minor problem if it can be fixed that will be great i.e the number is assigned randomly not according to the alphabetical order of the files is possibly caused by the Directory listing. I overlooked that I have the Dircmd environment variable set to list files in alpha order by name so just add the /on switch to the For loop so that it reads:
for /f "tokens=*" %%1 in ('dir /b /on *.htm') do (
Thank you for allowing me to view the files, very interesting, now all I need is a medicalese interpreter!!
Please come back & tell us if your problem is resolved.