用asp实现批量删除bak文件
当前位置:点晴教程→知识管理交流
→『 技术文档交流 』
<% @language=vbscript codepage=936 %>
<% bakpath=request("bakpath") delbak=server.mappath(bakpath) set fso = createobject("scripting.filesystemobject") response.write "删除操作结果如下:" & "<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 & "已经被成功删除!<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 编辑过 |
关键字查询
相关文章
正在查询... |