
CODE: [Copy to clipboard]生成的ans.txt为:@echo off
setlocal enabledelayedexpansion
for /f "tokens=1* delims=:" %%i in ('findstr /n /c:"( )" a.txt') do (
set /a num=%%i+1
call :p %%i
set qus=%%j
call set qus=!qus:( =(%%ans%%!
echo !qus!>>ans.txt
)
pause
goto :EOF
:p
for /f "tokens=1* delims=:、" %%a in ('more a.txt +%1 ^| findstr /c:"答案:、"') do (
set ans=%%b
goto :EOF
)
goto :EOF
CODE: [Copy to clipboard][ Last edited by dikex on 2008-11-3 at 13:50 ]标题请尽量表意(明确)、清晰,能大概反映帖子内容
能大概反映帖子(内容),而不要使用诸如"请帮忙
| Quote: | |
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |