这个是我用的fso删除文件的代码,其实是类似的
for each files in ListFolder.Files
tem_Files=Replace(files,Path&"\","")
temFilesArray=split(files,"_")
temFiles = temFilesArray(UBound(temFilesArray))
temFiles = Replace(tem_Files,temFiles,"")
temFiles = Replace(temFiles,"_","")
if filenum = temFiles then
fso.DeleteFile files
'response.write"
"
Response.Redirect "default.asp"
else
'Response.Redirect "default.asp"
end if
Response.Write "
正在删除中……"&Mid(filenum,5)&"
"
next