(编辑:jimmy 日期: 2024/11/13 浏览:2)
folder.htm
<html>
<head>
<title>闪亮日子之在线创建文件夹</title>
</head>
<body>
春风精彩<br>
在线创建文件夹</td>
<tr>
<td height="28"><form name="form1" method="post" action="creatfolder.asp">
<div align="center"><center><p>新建文件夹:
<input type="text" name="name" size="20" style="font-size: 12pt">
<input type="submit" name="Submit" value="创建" style="font-size: 12pt"> </p>
</center></div>
</form>
</td>
</tr>
</center></div>
</body></html>
creatfolder.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
%>