一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

asp fso创建文件夹

时间:2022-07-02 22:44:24 编辑:袖梨 来源:一聚教程网


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

热门栏目