- //&cls& dir /a-d/b *.txt|cscript -nologo -e:jscript "%~0"&pause&exit/b
- var fso=new ActiveXObject("scripting.filesystemObject");
- while (!WSH.StdIn.AtEndOfStream){
- f=WSH.StdIn.ReadLine();
- text=fso.OpenTextFile(f,1).Readall();
- arr=text.match(/请求超时/g)||[]
- count=arr.length;
- file=fso.OpenTextFile("result.txt",8,1)
- file.write('文件'+f+'中的重复次数:'+count+'\r\n');
- file.close();
- }
复制代码
|