Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Visual Basic >> Snippet

Create a full folder path


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

Function CreatePath (NewPath As String ) As Boolean
'requires \ at end
If Right$(NewPath,1) <> "\" then NewPath = NewPath & " \ "
If MakeSureDirectoryPathExists(NewPath) <> 0 Then CreatePath = True
End Function