1.

Solve : MS DOS Ping batch file?

Answer»

I'm sending a system to Brazil. One of the ISSUES with this system is that I have IP addresses that range from 192.168.0.1 through 192.168.0.12.

I can write individual commands to PING but when I do they run away, get stuck in a loop. I've tried to batch a few pings together but the first one loops.

I've been away from DOS programming for so long I don't remember the basics.

My style of programming is more to the function block and ladder LOGIC type applications. Any higher level geeks that can help me out?
Its not clear from this what you are trying to accomplish. Can you add further explanation?When you set up a network in INDUSTRIAL control the user tends to want to blame any outage on lack of communication between controllers. If there was a batch file that could be invoked to ping all of the addresses in the system that could be eliminated with the push from one single button.

I'm trying to write a batch file that will ping each address from the first address to the last, 192.168.0.1 through 192.168.0.14, with a single click of a button.


Try this:
for /l %i in (1,1,14) do ping 192.168.0.%i



Discussion

No Comment Found