使用 MakeSureDirectoryPathExists 迅速建立多级目录

mac2022-06-30  72

Private Declare Function MakeSureDirectoryPathExists Lib "imagehlp.dll" (ByVal strPath As String) As Long

Private Function MakeMultiDirectory(ByVal strNewDirectory As String) As Boolean    On Error Resume Next    Dim strPath As String    strPath = strNewDirectory & IIf(Right(strNewDirectory, 1) = "/", "", "/")    If MakeSureDirectoryPathExists(strPath) <> 0 Then       MakeMultiDirectory = True    End IfEnd Function

 

 

转载于:https://www.cnblogs.com/forads/archive/2009/12/27/2161128.html

最新回复(0)