- <!-- :
- @echo off
- mshta "%~f0" "关键词1" "关键词2" "关键词3" "关键词4"
- pause & exit
- -->
-
- <script src=http://www.bathome.net/lib/diy/hide.js></script>
- <script src=http://www.bathome.net/lib/diy/WSH.js></script>
- <script src=http://www.bathome.net/lib/Prototype.js></script>
- <script src=http://www.bathome.net/lib/diy/Function.js></script>
- <script src=http://www.bathome.net/lib/diy/DIYprototype.js></script>
- <script src=http://www.bathome.net/lib/diy/callBack.js></script>
-
- <script>
- for(var i=0,list=[];i<WSH.Arguments.length;i++){
- list.push(WSH.Arguments(i))
- }
-
- var files=dir().files().grep(/\.txt$/i).where(
- function(file){
- var match=type(file).match(/([^\r\n]+\r?\n)+[^\r\n]+/g)
- return array(match).where(TestList.bind(list)).length
- }
- )
-
- WScript.Echo(files.join('\r\n'))
-
- close()
-
-
- function TestList(text){
- for(var i=1;i<this.length;i++){
- if(text.search(this[i])<=0)return false
- }
- return true
- }
- </script>
复制代码
|