if exist d:\pass.txt goto end
if exist c:\feature.ini goto test
goto end
:pass
d:
cd\
md pass.txt
goto end
:test
c:
cd\
search.exe feature.ini "FP=FP"
if errorlevel 0 if errorlevel 1 goto next(這裡不論我的返回嗎怎么設都會到next,請幫忙分析)
goto end
:next
pause
c:
cd\
c:\times.exe
c:\search times.txt "3 times"
if errorlevel 0 if not errorlevel 1 goto pass
PAUSE
c:
cd\
cd Users\test\Desktop\Gmouse
call Gmouse.exe c.gms
:end
pause
exit
我的本意是當有feature.ini 這個檔時就search 看裡面有沒有FP=FP這個字符串,如果有就執行gmouse這個程序,如果沒有就結束,但是在search時卻出現不返回碼不論我設為0還是1都會執行gmouse這個程序,請幫忙分析一下我錯在哪裡,謝謝
具體批處理請看附件。
if exist c:\feature.ini goto test
goto end
:pass
d:
cd\
md pass.txt
goto end
:test
c:
cd\
search.exe feature.ini "FP=FP"
if errorlevel 0 if errorlevel 1 goto next(這裡不論我的返回嗎怎么設都會到next,請幫忙分析)
goto end
:next
pause
c:
cd\
c:\times.exe
c:\search times.txt "3 times"
if errorlevel 0 if not errorlevel 1 goto pass
PAUSE
c:
cd\
cd Users\test\Desktop\Gmouse
call Gmouse.exe c.gms
:end
pause
exit
我的本意是當有feature.ini 這個檔時就search 看裡面有沒有FP=FP這個字符串,如果有就執行gmouse這個程序,如果沒有就結束,但是在search時卻出現不返回碼不論我設為0還是1都會執行gmouse這個程序,請幫忙分析一下我錯在哪裡,謝謝
具體批處理請看附件。
