The code copy is as follows:
<%@language=vbscriptcodepage=936%>
<%
'Batch File Automatic Search Replace Insert Ver2.0
'Feiyun writing, CSDN account: jspadmin, QQ: 33323489
'Personal website http://www.pifoo.com Chinese website, welcome to exchange links. This site provides free blog application and registration.
'You can use or modify this code, but please keep the copyright information or links, thank you for using it!
'If you have any questions or suggestions, please leave me a message http://www.pifoo.com/guestbook/
%>
<%
bakpath=request("bakpath")
delbak=server.mappath(bakpath)
setfso=createobject("scripting.filesystemobject")
response.write"deletion operation result is as follows: "&"<br>"
iterate(delbak)
functioniterate(path)
dimfolder,folders,files,file
setfolder=fso.getfolder(path)
setfiles=folder.files
foreachfileinfiles
iffso.getextextensionname(file.name)="bak"then
response.writefile.name&"has been successfully deleted!<br>"&file.path&"<br><br>"
file.deletetrue
endif
next
setfolders=folder.subfolders
foreachfinfolders
iteratef.path
next
endfunction
setfso=nothing
%>
<AHREF="index.asp">Return to homepage</A>