Problems with PING in BATCH files - TechRepublic
Question
January 8, 2008 at 03:59 AM
day1118

Problems with PING in BATCH files

by day1118 . Updated 17 years, 11 months ago

Hi all, Trying to make a simple batch file that will ping a computer, and display the results. So far I have

@Echo off
Echo Test if 192.168.2.1 is available
Ping -n 1 192.168.2.1
@Pause
Exit

It is saved in a file called Ping.bat. If i run the file, it displays ‘Test if 192.168.2.1 is available’ then just sits there.

But if I open up command prompt and then run the file through it, it works perfectly!

Any suggestions of what could be wrong?

This discussion is locked

All Comments