![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-09 10:06 |
47,811 topics / 349,895 posts / today 0 new / 48,253 members |
| DOS批处理 & 脚本技术(批处理室) » [Help] A shared-file scanner for the local network that I wrote myself! |
| Printable Version 747 / 0 |
| Floor1 heheguai | Posted 2008-08-07 20:06 |
| 初级用户 Posts 18 Credits 30 | |
|
I wrote a shared-file scanner for the local network myself, but the problem comes up at the very last step. Please give me some pointers, experts!
@echo off&setlocal enabledelayedexpansion for /f "tokens=1* delims=:" %%i in ('ipconfig^|find /i "IP Address"') do set ip=%%j echo %ip:~1,10% for /l %%a in ( 99,1,99 ) do ( ping %ip:~1,10%%%a -n 1 -w 10|find "TTL"&&for /f "skip=7" %%c in ('net view %ip:~1,10%%%a') do ( for /r "\\%ip:~1,10%%%a\%%c" %%k in (*.rar) do echo %%k ) ) pause Explanation: this was tested on my own machine. My local IP is 192.168.1.99. Actually, if you want to scan the local network, you only need to change for /l %%a in ( 99,1,99 ) here. But the current problem is that the command for /r "\\%ip:~1,10%%%a\%%c" %%k in (*.rar) do echo %%k ) is not executing properly. I’d appreciate some pointers from an expert! Many thanks! Waiting online! |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |