濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > 使用FSO按文件大小瀏覽文件目錄并進(jìn)行刪除操作

使用FSO按文件大小瀏覽文件目錄并進(jìn)行刪除操作

熱門標(biāo)簽:外呼系統(tǒng)API接口 修改地圖標(biāo)注 武夷山旅游地圖標(biāo)注 萊西電子地圖標(biāo)注 縣域地圖標(biāo)注打印店 怎么在地圖標(biāo)注自己 金昌電話機(jī)器人價(jià)格 個(gè)人可以辦理400電話么 鳳臺(tái)百度地圖標(biāo)注店
%@ 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 "輸入錯(cuò)誤!"
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>輸入錯(cuò)誤!/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>修改時(shí)間/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>總計(jì):/td>td colspan=4>"formatNumber((intFlag-1)/(1024^2),2) " MB/td>/tr>" vbcrlf
Response.Write "/TABLE>" vbcrlf
%>
/BODY>
/HTML>

標(biāo)簽:南京 赤峰 通遼 上海 楚雄 邢臺(tái) 清遠(yuǎn) 涼山

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《使用FSO按文件大小瀏覽文件目錄并進(jìn)行刪除操作》,本文關(guān)鍵詞  使用,FSO,按,文件,大小,瀏覽,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《使用FSO按文件大小瀏覽文件目錄并進(jìn)行刪除操作》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于使用FSO按文件大小瀏覽文件目錄并進(jìn)行刪除操作的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    抚松县| 岑巩县| 自贡市| 唐河县| 永修县| 恭城| 奉贤区| 保靖县| 景洪市| 甘洛县| 赣榆县| 荥经县| 从化市| 甘南县| 满洲里市| 萨迦县| 昌黎县| 贵阳市| 长子县| 抚顺县| 浑源县| 洛扎县| 沙洋县| 临武县| 黔西县| 高碑店市| 阿拉尔市| 宁明县| 奉节县| 宣威市| 体育| 黔江区| 云南省| 苍山县| 元氏县| 特克斯县| 娄底市| 鄢陵县| 准格尔旗| 泸西县| 彭阳县|