|I almost always paste instead of retyping. Saves errors.|
Next, you should run it at a prompt; not by clicking.
As written above it doesn't rename, but simply previews what's to be done.
Here's how it should look.
@echo off & setLocal EnableDelayedExpansion
for /f "tokens=1* delims=" %%a in ('find /v /n "" ^< myfile') do (
if %%a lss 10 (
ren msxrt0%%a.doc "%%b.doc"
) else (
ren msxrt%%a.doc "%%b.doc"
If at first you don't succeed, you're about average.