creatfolder.htm
' 表單文件.
<form name="form1" method="post" action="folder.asp">
創建一個文件夾:
<input type="text" name="name">
<input type="submit" name="Submit" value="提交">
</form>
folder.asp
<%@ LANGUAGE = "VBScript" %>
<% Dim Name
Name = Request("Name")
set fs=createobject("scripting.filesystemobject")
MyFolder=server.mappath(""&name&"")
If NOT fs.folderexists(MyFolder) then
fs.createfolder(MyFolder)
End If
If fs.folderexists(MyFolder) then
%>
恭喜,文件夾:<%=MyFolder%>創建成功!
<%Else%%>
噢,出錯啦!
<%End If
%>