变态重口极致另类在线-波多久久夜色精品国产-波多野结衣在线观看一区-波多野结衣在线观看一区二区-污污的网站免费阅读-污污视频网址

當前位置:首頁文章首頁 IT學院 IT技術

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

作者:  來源:  發布時間:2011-6-21 15:12:05  點擊:

 下面提供的是關于利用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>

相關軟件

相關文章

文章評論

軟件按字母排列: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
主站蜘蛛池模板: 欧美成人亚洲国产精品 | 成人爽爽激情在线观看 | 我想看一级毛片免费的 | 青青青国产依人精品视频 | 青青草国产在线 | 亚洲永久中文字幕在线 | 操久久久 | 青青草原手机在线视频 | 精品日本亚洲一区二区三区 | 亚洲成人福利 | 国产草莓视频入口免费网站 | 波多野结衣国产一区 | 人人干夜夜操 | 99久久伊人 | 国产日韩欧美不卡www | 欧美激情精品久久久久久不卡 | 天天天天天操 | 特黄aaaaaa久久片 | 国产精品天天干 | 欧美亚洲另类一区中文字幕 | 99热成人精品免费久久 | 日韩精品欧美亚洲高清有无 | 日韩福利社 | 欧美成人久久一级c片免费 欧美成人看片 | 欧美成人午夜视频在线观看 | 大黄网站在线观看 | 狠狠色狠狠色综合日日五 | 一区二区视频在线观看 | 黄色美女网站视频 | 九九在线精品视频播放 | 青青青青青青草 | 在线欧美a| 免费九九视频 | 国产精品合集一区二区三区 | 新婚第一次一级毛片 | 成年视频xxxxx在线观看 | 日本在线视频二区 | 日韩视频在线精品视频免费观看 | 久久亚洲欧美成人精品 | 在线观看精品福利片香蕉 | 欧美高清第一页 |