如何对一个文件夹进行创建和删除?

如何对一个文件夹进行创建和删除?

<% set fs=createobject(“scripting.filesystemobject”) %>

<% MyFolder=server.mappath(“/chunfeng/happy/”) %>

<%

If NOT fs.folderexists(MyFolder) then

     fs.createfolder(MyFolder)

End If

%>

 xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /??

<%

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]

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
青葱年少的头像青葱年少普通用户
上一篇 2023年12月29日
下一篇 2023年12月29日

相关推荐

此站出售,如需请站内私信或者邮箱!