lundi 24 octobre 2016

error comparing file content in windows batch

I have a text file called "isUp.o" containing conection result error, like "FATAL ERROR: Network error: Connection timed out". I just want to check that and change ip variable to a new ip value, but I get the followin message: sorry original message is in spanish

No se esperaba "FATAL ERROR: Network error: Connection timed out" en este momento.
d:\> if [ "FATAL ERROR: Network error: Connection timed out" <> "" ] (

translation could be:

Not waited "FATAL ERROR: Network error: Connection timed out" at this moment.

I don't know where the problema is.

for /f "delims=" %%j in (isUp.o) do (
 set /p result=%%j
 if [ "%result%" <> "" ] (
   set Ip=%alternativeIp%
 )
)

Thanks.rené

Aucun commentaire:

Enregistrer un commentaire