使用 MakeSureDirectoryPathExists 迅速建立多级目录
2009-12-27 01:08
585 查看
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 If
End Function
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 If
End Function
相关文章推荐
- 使用 MakeSureDirectoryPathExists 迅速建立多级目录
- 使用 MakeSureDirectoryPathExists 迅速建立多级目录
- 使用MakeSureDirectoryPathExists 创建多级目录
- VC++ MFC 创建多级目录的方法 MakeSureDirectoryPathExists (另附 文件、目录操作类)
- 2014-03-14周五工作日志:检查指定目录是否存在的函数MakeSureDirectoryPathExists
- MakeSureDirectoryPathExists检查目录是否存在
- MakeSureDirectoryPathExists和CreateDirectory的区别
- MakeSureDirectoryPathExists与CreateDirectory的区别
- MakeSureDirectoryPathExists
- MakeSureDirectoryPathExists参数不能是正斜杠(“/”)
- windows api一日一练(dbghelp sdk)-002-MakeSureDirectoryPathExists,SearchTreeForFile
- MakeSureDirectoryPathExists与CreateDirectory的区别
- ftpClient.makeDirectory(path) 一直返回false,无法创建目录的问题
- 【练习题】 使用程序建立一个多级的目录,在每个目录下,新建一个和目录名字一样的txt文件,并写入1990
- Objective-C创建目录接口createDirectoryAtPath:withIntermediateDirectories:attributes:error:中参数attributes的设置
- tesseract-ocr 出现 错误 Please make sure the TESSDATA_PREFIX environment variable is set to the parent d irectory of your "tessdata" directory.解决方案
- IOS创建目录接口createDirectoryAtPath:withIntermediateDirectories:中参数attributes的设置
- 使用System.DirectoryServices.DirectoryEntry来实现iis虚拟目录的管理
- os、os.path模块中关于文件、目录常用的函数使用方法
- C#对文件/目录的操作:Path、File、Directory、FileStream、StreamReader、StreamWriter等类的浅析