发布网友
共1个回答
热心网友
NotDel="asp|jpg"
set Fso=createobject("Scripting.filesystemobject")
set M_fso=fso.getfolder(Server.MapPath(Path))
if M_fso.files.count>0 then
for each f in M_fso.files
if instr(NotDel,lcase(mid(f.name,instrRev(f.name,".")+1)))>0 then Fso.DeleteFile(Server.MapPath(Path)&"\"&f.name)
next
end if
Set Fso=Nothing