昔はpingを使っていたが、今は

set errorlevel=
arp -a|findstr 192.168.0. >nul
if not %ERRORLEVEL% == 0 goto オフライン処理