主题:删除同名文件代码,出错.
objfilesname=request.Form("checkbox1")
objfilesname=split(objfilesname,",")
response.write objfilename
set objfso=server.createobject("scripting.filesystemobject")
set objfolder=objfso.getfolder(server.mappath("../temp"))
for each objfilename in objfilesname
for each objfile in objfolder.files
if not objfile.name<>objfilename then
objfile.delete
exit for
end if
next
next
删除同名文件代码,但是传递两个文件名,只能删除第一个 第二个就删除不了 这是怎么回事啊.
objfilesname=split(objfilesname,",")
response.write objfilename
set objfso=server.createobject("scripting.filesystemobject")
set objfolder=objfso.getfolder(server.mappath("../temp"))
for each objfilename in objfilesname
for each objfile in objfolder.files
if not objfile.name<>objfilename then
objfile.delete
exit for
end if
next
next
删除同名文件代码,但是传递两个文件名,只能删除第一个 第二个就删除不了 这是怎么回事啊.