
CODE: [Copy to clipboard]问题的关键就在于按过滤文件循环处理src.txt,将其中不包括过滤记录的内容提取出来,然后在下一循环中继续处理。@echo off
type ieuse.log |findstr ":192.168.0.30:" >a.txt
for /f "tokens=2,4" %%a in (a.txt) do @echo %%a %%b>>src.txt
del a.txt
copy src.txt target.txt
for /f "tokens=*" %%a in (filter.txt) do (
type target.txt | find /i/v "%%a" > tmp.txt
ren tmp.txt target.txt)
echo src.txt是需要处理的文件,target.txt则是过滤后的最终文件。
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |