I am trying to write a batch file to tell if the internet is down at our school. Sometimes it is a network issue, and sometimes it is a website issue. here` is the code I have so far, feel free to edit or copy and paste. I am new to batch files, and this is my first question.
@ echo off
color B
goto pingwifi
:pingwifi
cls
ping -n 5 172.16.1.1
if errorlevel 1 (
color c
msg * WIFI DOWN
goto pingwifi
)
:pingjostens
cls
ping -n 5 192.189.112.185
if errorlevel 1 (
color c
msg * JOSTENS DOWN
goto pingwifi
)
goto pingjostens