setlocal ENABLEDELAYEDEXPANSION
for /l %%i in (1,1,259200) do for /f "tokens=1 usebackq" %%k in ("%userprofile%\桌面\adsl.vdx") do (set/a x=%%k) & (set/a y=x+1) & echo %y% >"%userprofile%\桌面\adsl.vdx" endlocal
结果,运行之后,解释器出来内容是这样的:
for /l %i in (1 1 259200) do for /f "tokens=1 usebackq" %k in ("c:\documents and settings\user\adsl.vdx") do (set/a x=%k) & (set/a y=x+1) & echo endlocal 1>"c:\documents and settings\user\adsl.vdx"
明显不是我想要的结果。请高手不吝赐教。
上面还有一个问题,这个数字位数不断增大,1位,2位,3位,4位,该如何处理呢?作者: Climbing 时间: 2007-5-26 01:47 没看明白你要干什么。