当前位置:编程学习 > asp >>

asp fso创建文件夹

asp fso创建文件夹

Function CreatePath(fromPath)
 Dim objFSO, uploadpath
 uploadpath = Year(Now) & "-" & Month(Now) '以年月创建上传文件夹,格式:2003-8
 On Error Resume Next
 Set objFSO = CreateObject(Newasp.FSO_ScriptName)
 If objFSO.FolderExists(Server.MapPath(fromPath & uploadpath)) = False Then
  objFSO.CreateFolder Server.MapPath(fromPath & uploadpath)
 End If
 If Err.Number = 0 Then
  CreatePath = uploadpath & "/"
 Else
  CreatePath = ""
 End If
 Set objFSO = Nothing
End Function

补充:asp教程,ASP入门
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,