
| Quote: | |
|
CODE: [Copy to clipboard][ Last edited by zw19750516 on 2008-4-21 at 10:53 AM ]:: 0
@echo off
set /p n=<%~nx0
call, set n=%n:~2%
set /a n+=1
setlocal enabledelayedexpansion
for /f "delims=" %%i in ('type %~nx0') do (
set /a m+=1
if !m! equ 1 (
echo :: !n!>%~nx0
) else (
endlocal&echo %%i>>%~nx0
)
)
ren %~nx0 已运行%N%次.bat
CODE: [Copy to clipboard][ Last edited by zw19750516 on 2008-4-21 at 11:01 AM ]@echo off
for /f "delims=::" %%i in (%~nx0) do set n=%%i
set /a n+=1
setlocal enabledelayedexpansion
echo :: !n!>>%~nx0
endlocal
ren %~nx0 已运行%N%次.bat
:: 0
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |