复制代码 代码如下:
% @language=vbscript codepage=936 %>
%
'批量文件自动搜索替换插入器 Ver2.0
'飞云编写,CSDN帐号:jspadmin,QQ:33323489
'个人网站http://www.pifoo.com 蚍蜉中文站,欢迎交换链接。本站提供免费博客申请注册。
'你可以使用或修改本代码,但是请保留版权信息或链接,谢谢使用!
'如果有问题或建议,请给我留言 http://www.pifoo.com/guestbook/
%>
%
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>