Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: *.BAT script needed please help me.  (Read 5873 times)

0 Members and 1 Guest are viewing this topic.

Glenn Allen

  • Guest
*.BAT script needed please help me.
« 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.

PCgeek8080

  • Guest
Re: *.BAT script needed please help me.
« Reply #1 on: July 28, 2004, 08:35:11 AM »
 ;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.)