最近用到的东西,mark一下吧。
CreateDir.asp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<% Function CreateDir(path)'文件夹名称,文件夹路径 Dim fso, msg Set fso = CreateObject("Scripting.FileSystemObject") '设置FSO文件 If fso.FolderExists(path) Then '如果文件夹存在的话那么提示已有目录信息 msg = "exists." Else msg = "doesn't exist." Set f = fso.CreateFolder(path) '新建此目录 End If Response.write(msg) End Function '创建目录 strfilename=Request("PcName") thisUploadDir=server.mappath(""&strfilename&"") '上传文件目录路径 thisUploadDir=CreateDir(thisUploadDir) '设置上传目录名称 %> |
http://127.0.0.1/asp/createdir.asp?pcname=testdir
转载请注明:exchen's blog » VBScript在服务器上创建目录