night^man
Dec 31 2003, 06:13 PM
how i can build a .BAT file that checks pings ?
help plz
BlaStA
Dec 31 2003, 06:58 PM
What do you mean by "checks pings"?
Read a text-file and ping every IP? Ping every IP in a given range?
night^man
Dec 31 2003, 07:36 PM
| QUOTE (BlaStA @ Dec 31 2003, 06:58 PM) |
What do you mean by "checks pings"?
Read a text-file and ping every IP? Ping every IP in a given range? |
yup
jockel
Dec 31 2003, 10:28 PM
here it is by text file ..
btw ... i'll go an smoke a spliff ... cya and happy nu year @ll !!!
randalizm
Jan 5 2004, 01:17 PM
nice work, shame is doesnt work though! lol
i think i might fix if i can be bothered
but its almost dere!
BlaStA
Jan 5 2004, 03:58 PM
It definitively does work. You have to enter the file with the Ips in it.
So here's my batch script to echo all Ips from xx.xx.0.1 to xx.xx.255.254 to a file:
| CODE |
@echo off set /p subnet=Subnet (e.g. 192.168): set /p file=Output file: IF EXIST %file% DEL %file% /F /Q FOR /F "delims=. tokens=1,2" %%i IN ("%subnet%") DO ( set primary=%%i&& set secondary=%%j) FOR /L %%i IN (0,1,255) DO ( FOR /L %%j IN (1,1,254) DO ( echo %primary%.%secondary%.%%i.%%j>>%file% ) ) echo Done. All IPs from %primary%.%secondary%.0.1 to %primary%.%secondary%.255.254 saved to %file%. pause
|
ara2
Jan 6 2004, 10:21 PM
ahh i like the token trick hehe
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.