如何对一个文件夹进行创建和删除?
<% set fs=createobject("scripting.filesystemobject") %>
<% MyFolder=server.mappath("/chunfeng/happy/") %>
<%
If NOT fs.folderexists(MyFolder) then
fs.createfolder(MyFolder)
End If
%>
<%
If fs.folderexists(MyFolder) then
response.write "恭喜,文件夹创建成功!"
Else
response.write "警告:文件夹创建失败!"
End If
%>
<%
set remdir=fs.getfolder(myfolder)
remdir.delete
set remdir=nothing
If NOT fs.folderexists(myfolder) then
response.write "恭喜,文件夹删除成功!"
Else
response.write "警告:文件夹删除失败!"
End If
%>[1]
本文章来源于网络,作者是:,由代码部落进行采编,如涉及侵权请联系删除!转载请注明出处:https://daimabuluo.cc/biancheng10000wen/1129.html