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!
Credits 32 Posts 16 Joined 2006-10-19 21:11 19-year member UID 66985 Gender Male
Status Offline
Software can't even do it, let alone batch processing. If the users in the LAN haven't even turned on the server service, see how you're going to handle it
Credits 11,386 Posts 4,938 Joined 2006-07-23 17:10 19-year member UID 59080
Status Offline
Originally posted by mackyliu at 2006-12-28 16:00:
Software can't do it, let alone batch processing. If the users in the LAN haven't even turned on the server service, see how you can do it
Credits 11,386 Posts 4,938 Joined 2006-07-23 17:10 19-year member UID 59080
Status Offline
Re ygzxw:
Please send me the result of the net view command on your internal network. I don't have a test environment here, so it's not easy to write code, so I can only refer to yours.
Credits 11,386 Posts 4,938 Joined 2006-07-23 17:10 19-year member UID 59080
Status Offline
First try this, see if it works?
@echo off
for /l %%a in (1,1,254) do (
echo.&echo/&echo===================================>>list.txt
for /f "delims== tokens=2" %%i in ('nbtstat -a 192.168.1.%%a^|find "MAC Address"') do echo %%i------------192.168.1.%%a >>list.txt
)
pause
notepad.exe list.txt
goto :eof
Credits 11,386 Posts 4,938 Joined 2006-07-23 17:10 19-year member UID 59080
Status Offline
Try again:
@echo off
for /l %%a in (1,1,254) do (
echo.&echo/&echo===================================>>list.txt
for /f "delims== tokens=2" %%i in ('nbtstat -a 192.168.0.%%a^|find "MAC Address"') do echo %%i------------192.169.0.%%a >>list.txt
)
pause
notepad.exe list.txt
goto :eof