@echo off
title set station ID for mPCIe
mode con cols=100 lines=20
setlocal enabledelayedexpansion
set /p IP=please input the IP number:
set /p ID=please input the ID number:
set one=1
set zero=0
cd\
d:
for /r d:\zt4_mpcie %%a in (*.cfg) do (
set temp=%%a
set mo=!temp:~16,14!
set phase=!temp:~13,2!
set dirc=!temp:~0,31!
cd !dirc!
del sfis.cfg
echo >>sfis.cfg
echo MP_PN=!mo!>>sfis.cfg
echo RMA_PN=NA>>sfis.cfg
echo SN_LENGTH=13>>sfis.cfg
echo^.>>sfis.cfg
echo >>sfis.cfg
echo Enable=!one!>>sfis.cfg
echo SFIS_TIMEOUT = 25000>>sfis.cfg
echo SFIS_IP=10.5.5.!IP!>>sfis.cfg
echo SFIS_Port=5010>>sfis.cfg
echo FixtureID=!phase!_!ID!>>sfis.cfg
echo LINE=ZT4>>sfis.cfg
echo^.>>sfis.cfg
echo >>sfis.cfg
if !mo!=T1 call :upload
if !mo!=T2 call :check
if !mo!=T3 call :check
echo FA_Debug=disable>>sfis.cfg
echo SfCheckAutoFocus=disable>>sfis.cfg
echo^.>>sfis.cfg
echo >>sfis.cfg
echo R=255>>sfis.cfg
echo G=!zero!>>sfis.cfg
echo B=!zero!>>sfis.cfg
echo Message="ERROR!">>sfis.cfg
echo^.>>sfis.cfg
echo >>sfis.cfg
echo Enable=!zero!>>sfis.cfg
echo ApplicationPath=fciv.exe>>sfis.cfg
echo CheckSumPath=imagefile_12MB.cks>>sfis.cfg
echo ConfigPath=param.ini>>sfis.cfg
echo BlockName=Options>>sfis.cfg
echo ItemName=UpLoadImagePath>>sfis.cfg
)
goto end
:upload
echo ChipId=upload>>sfis.cfg
goto eof
:check
echo ChipId=check>>sfis.cfg
goto eof
:end
end
为什么我加了IF后就会出错?
if !mo!=T1 call :upload
if !mo!=T2 call :check
if !mo!=T3 call :check