你那个是无限循环来的- while true
-
- d pth
-
- wscript.sleep 1000
-
- wend
复制代码 这里要改。- set ws=createobject("wscript.shell")
- set fso=createobject("scripting.filesystemobject")
-
- wc="aa.exe"
- pth="e:\"
-
- d pth
- wscript.sleep 1000
-
- sub d(x)
- for each i in fso.getfolder(x).subfolders
- f i
- next
- end sub
-
- sub f(x)
- for each c in fso.getfolder(x).files
- if instr(1,c,wc,1)>0 then
- fso.deleteFile c
- msgbox "ok"
- end if
- next
- end sub
复制代码
|