S
Steve
Hello,
tried to use || in a batch file (as a success test to see whether a pc
was on) as outlined below:
note that the pc name (%1) was a parameter passed on the command line
/code/
ping -n 1 %1 || goto ipsnf
nbtstat -a %1
goto end
:ipsnf
echo %1 failed
:end
/endcode/
I've tried variations on a theme with the command including escaping
the || as in the following:
^|^| and ^||
nothing seems to work. Any comments or suggestions?
Thanks in advance
Steve
tried to use || in a batch file (as a success test to see whether a pc
was on) as outlined below:
note that the pc name (%1) was a parameter passed on the command line
/code/
ping -n 1 %1 || goto ipsnf
nbtstat -a %1
goto end
:ipsnf
echo %1 failed
:end
/endcode/
I've tried variations on a theme with the command including escaping
the || as in the following:
^|^| and ^||
nothing seems to work. Any comments or suggestions?
Thanks in advance
Steve