Computer Hope
Microsoft => Microsoft DOS => Topic started by: Glenn Allen on July 27, 2004, 07:05:17 PM
-
ok heres my script.
ping ls890.hostcentris.com -n 1
IF Ping request could not find host ls890.hostcentris.com. Please check the name and try again
"ECHO The server is currently offline"
"IF Pinging ls890.hostcentris.com [65.254.51.138] with 32 bit of data:"
"ECHO The Server is currently online"
"Pause"
What I want it to do is to: Ping that URL and if the host is unreachable then I want it to say "the server is currently offline" and if it starts to ping I want it to say "the server is currently online"
when it gets executed in windows XP it auto closes the bat file and I want it to stay open for at least 30sec.
can anybody help me please?
Thanks in advance.
-
;D That is easy! You have to open the file in the command prompt, not double click it. (Don't use the Start command to open it.)