分享你我的心得.
共乘一片美好网络.

ASP利用FSO删除文件

‘删除图片函数,purl为图片的文件名
function delimg(purl)
on error resume next
dim fso
set fso=server.CreateObject(“Scripting.FileSystemObject”)
fso.DeleteFile server.MapPath(“../upImages/” & purl),true
set fso=nothing
end function

2.
FilePath=Server.MapPath(“image/2004922dao1.jpg”)
Dim fso
Set fso = CreateObject(“Scripting.FileSystemObject”)
IF fso.FileExists(FilePath) Then
fso.DeleteFile(FilePath)
End IF
Set fso = Nothing

 

赞(0)
未经允许不得转载:小叶白龙博客 » ASP利用FSO删除文件
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址