从数据库中根据多个ID查询出记录文件地址,全部删除本机文件(ASP)
set conn=server.createobject("adodb.connection")
conn.ConnectionString ="Provider=SQLOLEDB.1;Password=password;Persist Security Info=True;User ID=SA;Initial Catalog=SA;Data Source=127.0.0.1;Connect Timeout=20" 'MSSQL2005
set rs=server.createobject("adodb.recordset")
rs.open "select html from table where id in (111,222,333,444,555)",conn,1,1
do while not rs.eof
FH=rs("html")
set fso=createobject("scripting.filesystemobject")
if fso.FileExists(FH) then
fso.deletefile(server.mappath(FH))
end if
set fso=nothing
rs.movenext
loop
rs=nothing
rs.close
![]()

浙公网安备 33010602011771号