来个不用for循环的
@echo off
findstr "AutoIFICS" a.txt>nul
>a.txt (
    echo 
    echo         Testserver = TSTUSI09
    echo         station1 = B4
    echo         station2 = B6
    echo         user = m009986
    echo         shift = 1
    echo         opid = FNCT
    echo         opid = FNCT
)
if %errorlevel% equ 0 (
  >>a.txt echo         PROTOCOL= NOIFICS
) else (
  >>a.txt echo         PROTOCOL= AutoIFICS
)
 Last edited by HAT on 2008-4-30 at 12:28 AM ]