有100个文本文件,文件名是1.txt-100.txt 现在在要将文件名改为001.txt 010.txt 100.txt 怎么写???
以下是我写的,不过有错误
set /a beg=1
set /a end=001
:round1
if %beg% GEQ 10 (goto round2)else (
ren h:\%beg%.txt %end%.txt-------------------------------这里有问题 ,可是我不会解决 请教高手
set /a beg=%beg%+1
set /a end=%end%+001
goto round1
)
:round2
pause
—————————————— willsort 版务记录 ——————————————
修改原标题:dos批处理问题 急!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
—————————————— willsort 版务记录 ——————————————
[ Last edited by willsort on 2005-11-26 at 17:30 ]
以下是我写的,不过有错误
set /a beg=1
set /a end=001
:round1
if %beg% GEQ 10 (goto round2)else (
ren h:\%beg%.txt %end%.txt-------------------------------这里有问题 ,可是我不会解决 请教高手
set /a beg=%beg%+1
set /a end=%end%+001
goto round1
)
:round2
pause
—————————————— willsort 版务记录 ——————————————
修改原标题:dos批处理问题 急!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
—————————————— willsort 版务记录 ——————————————
[ Last edited by willsort on 2005-11-26 at 17:30 ]
