用asp實現(xiàn)批量刪除bak文件
當(dāng)前位置:點晴教程→知識管理交流
→『 技術(shù)文檔交流 』
<% @language=vbscript codepage=936 %>
<% bakpath=request("bakpath") delbak=server.mappath(bakpath) set fso = createobject("scripting.filesystemobject") response.write "刪除操作結(jié)果如下:" & "<br>" iterate(delbak) function iterate(path) dim folder, folders, files, file set folder = fso.getfolder(path) set files = folder.files for each file in files if fso.getextensionname(file.name)="bak" then response.write file.name & "已經(jīng)被成功刪除!<br>" & file.path & "<br><br>" file.delete true end if next set folders = folder.subfolders for each f in folders iterate f.path next end function set fso=nothing %> <A HREF="index.asp">返回首頁</A> 該文章在 2011/2/16 10:42:58 編輯過 |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |