'创建文件夹，能嵌套创建所有的，成功反回：True  失败返回：False
'--------------------------------------------------------------------------------

Function CreateFolder(ByVal P as String) as Long '创建文件夹
   Dim Pa() as String, I as Long, b as String
   If Right(p, 1) = "\" Then p = Left(p, Len(p) -1)
   vbSplit(P, "\", Pa())
   b = Pa(0)
   For I = 1 To UBound(Pa)
      b = b & toStr("\") & Pa(I)
      If Len(Pa(I)) > 0 Then
         If Dir(b, fbDirectory) = "" Then
            MkDir b
         End If
         
      End If
   Next
   
   Function = Dir(p, fbDirectory) <> ""
   
End Function