[API]
CreateDirectoryA
CreateDirectoryW

[INCLUDE]
GetFileAttributes

[CODE]
Public Function CreateDirectoryEx(ByVal FullPath As String) As Boolean
  Dim xChar1 As String
  Dim xLong1 As Long
  
  xLong1 = InStr(FullPath, "\")
  If Not xLong1 = 0& Then
    FullPath = FullPath & "\"
    xChar1 = Left(FullPath, xLong1 - 1&)
    FullPath = Mid(FullPath, xLong1 + 1&)
    Do
      xLong1 = InStr(FullPath, "\")
      If xLong1 = 0& Then
        Exit Do
        Else
        xChar1 = xChar1 & "\" & Left(FullPath, xLong1 - 1&)
        If IsUnicode Then
          Call CreateDirectoryW(StrPtr(xChar1), 0&)
          Else
          Call CreateDirectoryA(xChar1, 0&)
          End If
        FullPath = Mid(FullPath, xLong1 + 1&)
        End If
      Loop
    CreateDirectoryEx = ((GetFileAttributes(xChar1) And 16&) = 16&)
    End If
  End Function
