标题:
字符串写不进文本文档
[打印本页]
作者:
wen513520
时间:
2008-8-20 19:31
标题:
字符串写不进文本文档
@Echo off
setlocal enabledelayedexpansion
date /t > IPList.txt
time /t >> IPList.txt
echo =========== >> IPList.txt
For /L %%f in (1 1 100) do (
ping -n 1 192.168.0.%%f >nul
if !errorlever! equ 1 echo 192.168.0.%%f >>IPList.txt
)
cls
Echo Finished!
@Echo on
Notepad.exe IPList.txt
pause
各位大侠,批处理理论方面的知识不太了解。我想问问为什么IP地址会写不进IPList.txt文本文档里面!
作者:
HAT
时间:
2008-8-20 19:49
是errorlevel,不是errorlever
作者:
wen513520
时间:
2008-8-20 20:01
不是这里的问题!!!!
作者:
flyinspace
时间:
2008-8-20 20:08
ping 192.168.1.%%i | findstr /i "Reply from" && echo 192.168.1.%%i>>IPList.txt
作者:
wen513520
时间:
2008-8-20 21:11
那为什么我那个会写不进去字符串呢?
作者:
wen513520
时间:
2008-8-20 21:11
有没有哪位大侠给我解释一下!
作者:
fw623080014
时间:
2008-8-21 00:30
飘过 只看懂几句
欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/)
Powered by Discuz! 2.5