Assim:
setlocal EnableDelayedExpansion
set IP=...
for /f "delims=() tokens=2" %%a in ('ping %IP% ^| find "% loss"') do (
set loss=%%a
set loss=!loss:% loss=!
if !loss! equ 100 (
echo %IP% is unavailable
) else (
echo %IP% is available
)
)
endlocal