|
Answer» hy! i have this
for /f "tokens=1-7 delims=." %%d in ("%date%") do rename "c:\test.txt" %%d.%%e.%%f.txt
i run this script in windows xp and it works FINE but under windows 2003 i GOT this
"The system cannot find the FILE specified."
why?
(every path is ok)
thank you all! A guess... the 2k3 setup has a different date format producing illegal characters?
You're quite sure that c:\test.txt exists, is not HIDDEN or read only, and you have privileges to modify it?
If you REWRITE the code like this
for /f "tokens=1-7 delims=." %%d in ("%date%") do ( echo %%d.%%e.%%f.txt rename "c:\test.txt" %%d.%%e.%%f.txt )
what do you see?
|