免费体验120秒视频_榴莲榴莲榴莲榴莲官网_2021国产麻豆剧果冻传媒入口_一二三四视频社区在线
當前位置: 首頁IT技術 → 利用FSO根據文件大小瀏覽文件目錄并執行刪除工作的實例代碼分享

利用FSO根據文件大小瀏覽文件目錄并執行刪除工作的實例代碼分享

更多

 下面提供的是關于利用FSO根據文件大小瀏覽文件目錄并執行刪除工作的實例代碼分享,希望能夠給大家帶來幫助或啟發。

<%@ 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 "輸入錯誤!"
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.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)&"'><img align=absmiddle border=0 src='images/delete.gif'></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>輸入錯誤!</td></tr>"
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 "<TABLE WIDTH=100% BORDER=1 CELLSPACING=1 CELLPADDING=1>" & vbcrlf
Response.Write "<TR>" & vbcrlf
Response.Write "<TD>文件名及路徑</TD>" & vbcrlf
Response.Write "<TD align=center>大小</TD>" & vbcrlf
Response.Write "<TD align=center>類別</TD>" & vbcrlf
Response.Write "<TD align=center>修改時間</TD>" & vbcrlf
Response.Write "<TD align=center>刪除</TD>" & vbcrlf
Response.Write "</TR>" & vbcrlf
intFlag=ListFolderFiles(strPath,CDbl(intFileSize),0)
Response.Write "<tr><td align=right>總計:</td><td colspan=4>"&formatNumber((intFlag-1)/(1024^2),2) &" MB</td></tr>" & vbcrlf
Response.Write "</TABLE>" & vbcrlf
%>
</BODY>
</HTML>

熱門評論
最新評論
昵稱:
表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
字數: 0/500 (您的評論需要經過審核才能顯示)
免费体验120秒视频_榴莲榴莲榴莲榴莲官网_2021国产麻豆剧果冻传媒入口_一二三四视频社区在线
主站蜘蛛池模板: 午夜人成| 大片毛片| 6080理论片国产片| 吃奶摸下激烈免费视频免费| 成年人午夜影院| 天天色影网| 久久久久亚洲精品无码蜜桃| 欧美性猛交xxxx乱大交| 免费少妇荡乳情欲视频| 8av国产精品爽爽ⅴa在线观看| 国模吧双双大尺度炮交gogo| 亚洲av专区无码观看精品天堂| 国产精品va在线播放| 国产福利精品一区二区| 国产精品高清一区二区三区| 午夜理论影院第九电影院| 丰满少妇被猛烈进入无码| 女人与公拘交酡过程高清视频| 亚洲精品无码av人在线观看| 香港三日本8A三级少妇三级99| 久久精品国产精品青草| 色婷婷精品大在线视频| 国产男女猛烈无遮挡免费视频网站 | 被公侵犯肉体中文字幕| 成年在线观看免费人视频草莓| 国产精品嫩草影院在线| 波多野结衣未删减在线| igao在线观看| 亚洲免费在线看| 成人在线午夜| 亚洲美女视频一区二区三区| 制服美女视频一区| 男女一边摸一边做爽爽毛片| 综合色在线| 中文在线免费不卡视频| 日本免费一二区在线电影| 国产精品电影一区二区三区| 國产一二三内射在线看片| 性做久久久久久久久| 久久久久国产精品| 精品一区二区三区四区在线|