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

Author Topic: MS DOS Ping batch file  (Read 3767 times)

0 Members and 1 Guest are viewing this topic.

Semilogical

    Topic Starter


    Greenhorn

    MS DOS Ping batch file
    « on: May 04, 2009, 08:48:34 PM »
    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?

    uSlackr



      Rookie

    • A turtle on the information highway since 1989
    • Thanked: 2
      Re: MS DOS Ping batch file
      « Reply #1 on: May 04, 2009, 09:06:46 PM »

      Its not clear from this what you are trying to accomplish.  Can you add further explanation?
      \\uSlackr

      Semilogical

        Topic Starter


        Greenhorn

        Re: MS DOS Ping batch file
        « Reply #2 on: May 04, 2009, 10:11:31 PM »
        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.



        tonlo



          Rookie

          Re: MS DOS Ping batch file
          « Reply #3 on: May 04, 2009, 10:51:10 PM »
          Try this:
          for /l %i in (1,1,14) do ping 192.168.0.%i