SET PTFS=945,915,865,855,845,830,815,810,
SET EX=
SET CMDS=
SET LP=
FOR %%I IN (%PTFS%) DO IF EXIST I%%IDIAG.EXE SET EX=I%%IDIAG
IF NOT "%EX%"=="" GOTO START
ECHO.
ECHO Error! 8xx/9xx executable not found.
ECHO.
GOTO END
REM Process the loop parameter this batch file.
:START
IF "%1"=="" GOTO RUN
REM If 'loop' param, set flag and remove.
REM
IF "%1"=="loop" SET LP=Y
IF "%1"=="loop" SHIFT
IF "%1"=="loop" GOTO START
REM Section overcomes DOS's nine parameter limit.
REM Collect all the non loop command line args.
REM
IF NOT "%1"=="" SET CMDS=%CMDS% %1
SHIFT
GOTO START
REM Call the exe with all the parameters.
:RUN
%EX%%CMDS%
ECHO .
IF ERRORLEVEL 2 GOTO FAIL
IF ERRORLEVEL 1 GOTO ABORT
IF "%LP%"=="Y" GOTO RUN
IF ERRORLEVEL 0 GOTO PASS
ECHO INVALID RETURN CODE
GOTO END
:PASS
ECHO Pass
GOTO END
:FAIL
ECHO Fail
GOTO END
:ABORT
echo incomplete
GOTO END
:END
ECHO .
REM Clean up environment
FOR %%I IN (EX,CMDS,PTFS,LP,LPF) DO SET %%I=作者: field4728 时间: 2006-10-26 09:52
怎么没人帮我?版主求救啊!!作者: xypcmac 时间: 2006-10-26 13:02
自己看看置顶帖子的DOS命令帮助吧!也可以下载看看