<%
function JudgeParaRegular(intID)
if intID”” and isnumeric(intID) then
JudgeParaRegular=intId
else
Response.Write “输入错误!”
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 “成功删除”&path
else
response.write “文件不存在!”
end if
Set fs=nothing
if Err.number0 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 “” & vbcrlf
Response.Write “” & replace(strNullTran(strSubFiles),strNullTran(strSubFiles.Name),”“&strNullTran(strSubFiles.Name)&”“) & “” & vbcrlf
Response.Write ““& strNullTran(FormatNumber(strSubFiles.size /(1024^2),2)) &” MB” & vbcrlf
Response.Write “” & strNullTran(strSubFiles.type) & “” & vbcrlf
Response.Write “” & strNullTran(strSubFiles.datelastmodified) & “” & vbcrlf
Response.Write “” & vbcrlf
Response.Write “” & 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 “

输入错误!


end if
ListFolderFiles=intFlag
end function
function strNullTran(str)
if isnull(str) or str=”” then
strNullTran=” “
else
strNullTran=str
end if
end function
Response.Write “

” & vbcrlf
Response.Write “” & vbcrlf
Response.Write “” & vbcrlf
Response.Write “” & vbcrlf
Response.Write “” & vbcrlf
Response.Write “” & vbcrlf
Response.Write “” & vbcrlf
Response.Write “” & vbcrlf
intFlag=ListFolderFiles(strPath,CDbl(intFileSize),0)
Response.Write “

” & vbcrlf
Response.Write “

文件名及路径大小类别修改时间删除
总计:“&formatNumber((intFlag-1)/(1024^2),2) &” MB
” & vbcrlf
%>