fso| keywords | essence <%@ language=vbscript%>
<%Server.ScriptTimeout=50000%>
<HTML>
<HEAD>
<meta name= "generator" content= "Microsoft Visual Studio 6.0" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
</HEAD>
<BODY>
<%
function Judgepararegular (IntID)
If intid<> "" and IsNumeric (IntID) Then
Judgepararegular=intid
Else
Response.Write "Input Error!" "
Response.End
End If
End Function
Intfilesize=judgepararegular (Request.QueryString ("Intfilesize"))
Strpath=request.querystring ("strpath")
If InStr (strpath, ":") =0 then Strpath=server. MapPath (strpath)
%>
<%
function Deletefiles (path)
On Error Resume Next
Set fs=server.createobject ("Scripting.FileSystemObject")
If Fs. FileExists (PATH) Then
Fs. DeleteFile Path,true
Response.Write "Successfully deleted" &path
Else
Response.Write "File does not exist!"
End If
Set fs=nothing
If Err.number<>0 then Response.Write err.number
End Function
Strfile=request ("strfile")
If Request ("strfile") <> "then
Deletefiles strfile
End If
%>
<%
function Listfolderfiles (Strpath,intfilesize,intflag)
Stroriginpath= Request.ServerVariables ("Script_name") & "? Strpath=" &request.querystring ("StrPath") & " &intfilesize= "&request.querystring (" Intfilesize ")
If strpath<> "" Then
If Intflag=0 Then
Intflag=intflag+1
End If
Set objfs=server.createobject ("Scripting.FileSystemObject")
Set Objfdir=objfs.getfolder (strpath)
Strparentpath= Objfs.getparentfoldername (strpath)
For each strsubfiles in Objfdir.files
If Strsubfiles.size/(1024^2) >=intfilesize Then
Response.Write "<TR>" & vbCrLf
Response.Write "<TD>" & Replace (Strnulltran (strsubfiles), Strnulltran (Strsubfiles.name), "<b>" & Strnulltran (strsubfiles.name) & "</b>") & "</TD>" & vbCrLf
Response.Write "<TD>" & Strnulltran (FormatNumber (Strsubfiles.size/(1024^2), 2)) & "Mb</td>" & vbCrLf
Response.Write "<TD>" & Strnulltran (Strsubfiles.type) & "</TD>" & vbCrLf
Response.Write "<TD>" & Strnulltran (strsubfiles.datelastmodified) & "</TD>" & vbCrLf
Response.Write "<td><a href=" "& Stroriginpath &" &strfile= "&strnulltran (strSubFiles) &" ' ></a></td > "& vbCrLf
Response.Write "</TR>" & vbCrLf
Intflag=intflag+strsubfiles.size
End If
Next
For each strsubfolders in Objfdir.subfolders
If Intflag=0 then intflag=1
Listfolderfiles Strsubfolders,intfilesize,intflag
Next
Else
Response.Write "<TR><TD colspan=5> input Error! </td></tr> "
End If
Listfolderfiles=intflag
End Function
function Strnulltran (str)
If IsNull (str) or str= "" Then
Strnulltran= "&n