Once I was looking for a batch script(shell script), that can be used to ping any range of IPs on LAN or internet, but ultimately I thought why not write a script by myself. So here it goes.
An incremental ping script which will ping a specific range or all the IPs available. This is for IP4 only. For IP6 I will post later once done.
Create a batch file(same file attached Attachment 8376) with the following code in it and run it.
::In the following A,B,C,D are IP values as Ai.Bi.Ci.Di or Ar.Br.Cr.Dr
::IP values concatenated to give an IP address
::Change the value followed by "-w" in the following ping line to change default ping wait time in case of late or no response
::Change the value followed by "-n" in the following ping line to change default number of ping requests to be sent for one IP
PING -a -n 1 -w 500 %IP%
IF ERRORLEVEL 1 (echo %IP% Unavailable or not responding) ELSE (echo %IP% Available)
SET /A Di=%Di%+1
IF %Di% LSS %Dr% (GOTO SETIP) ELSE (GOTO Ci)
SET /A Ci=%Ci%+1
IF %Ci% LSS %Cr% (GOTO SETIP) ELSE (GOTO Bi)
SET /A Bi=%Bi%+0
IF %Bi% LSS %Br% (GOTO SETIP) ELSE (GOTO Ai)
SET /A Ai=%Ai%+0
IF %Ai% LSS %Ar% (GOTO SETIP) ELSE (GOTO STR)
Results are sometimes unpredictable but least expected to happen.
If you fail to run the script directly by double-click, then drag the file to command line and hit enter, it should work.
Everybody is welcome to modify and suggest anything new but do notify about the improvement in this thread.
I don't think the shell script will have any big difference, so try it by yourself.
Waiting for comments as always.