【Asp】ASP删除文件 ASP删除目录/文件夹

admin 2021年4月3日19:03:05评论24 views字数 939阅读3分7秒阅读模式

ASP删除文件:

Dim FSO '声明一个名称为 objFSO 的变量以存放对象实例
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
If FSO.FileExists(Server.MapPath("newfile.asp")) Then
    FSO.DeleteFile Server.MapPath("newfile.asp"),True
    Response.Write "已经成功地对文件"&Server.MapPath("newfile.asp")&"进行了删除"
Else
    Response.Write Server.MapPath("newfile.asp")&"不存在,无法进行删除"
End If
Set FSO = Nothing '释放 FileSystemObject 对象实例内存空间
%>

ASP删除目录/文件夹:

Dim FSO '声明一个名称为 objFSO 的变量以存放对象实例
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
If FSO.FileExists(Server.MapPath("newfile.asp")) Then
    FSO.DeleteFolder Server.MapPath("newfile.asp"),True
    Response.Write "已经成功地对文件"&Server.MapPath("newfile.asp")&"进行了删除"
Else
    Response.Write Server.MapPath("newfile.asp")&"不存在,无法进行删除"
End If
Set FSO = Nothing '释放 FileSystemObject 对象实例内存空间
%>

文章来源于lcx.cc:【Asp】ASP删除文件 ASP删除目录/文件夹

相关推荐: 我来分享一个小技巧,Burp修改response欺骗

我来分享一个小技巧,Burp修改response欺骗 小胖子 (VIP你快回来,园长欺负我!) | 2014-05-29 11:38 上次看到某同学在问,很多人都说用fiddler。 在drops里面的burp教程也是一笔带过,没有很好的实例。 这里就说一下,…

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年4月3日19:03:05
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   【Asp】ASP删除文件 ASP删除目录/文件夹http://cn-sec.com/archives/319721.html

发表评论

匿名网友 填写信息