Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Get the number of online people in the LAN within one minute (without relying on third-party software)
View 3,617 Replies 17
Credits 78 Posts 64 Joined 2008-08-29 11:09 18-year member UID 124464 Gender Male
Status Offline
for /l %%i in (1 1 254) do (start /min ping -n 1 192.168.1.%%i)
arp -a | find /v "00-00-00-00-00">>1.txt
for /f "tokens=3" %%a in ('find /v /c "" 1.txt') do echo "There are %%a machines"
pause
Is there any more efficient way besides using NBTSCAN?