' Create a directory ' expC1 Directory Public Function CreateDirectory(ByVal tcDirectory As String) As Boolean Dim llSuccess As Boolean llSuccess = False Try Directory.CreateDirectory(tcDirectory) llSuccess = True Catch loError As Exception ' Get the proper definition as per the current scope If oProcess Is Nothing Then oApp.ErrorSetup(loError) Else oProcess.ErrorSetup(loError) End If End Try Return llSuccess End FunctionThe following let you know if a directory exist:
' Check if a directory exist Public Function DirectoryExist(ByVal tcDirectory As String) As Boolean Dim llExist As Boolean = False If Directory.Exists(tcDirectory) Then llExist = True Else llExist = False End If Return llExist End Function