There is also an API which checks for the folder and creates it if it does
not exist.
Lorne

' *********************************

Declare Function MakeSureDirectoryPathExists Lib "IMAGEHLP.DLL" 
     (ByVal DirPath As String) As Integer   

' *********************************

Declare Function Create_Directory (byVal NewPath as String) As Logical

' *********************************

Function Create_Directory (byVal NewPath as String) As Logical

    If Right$(NewPath,1) <> "\" Then 
          NewPath = NewPath + "\"
    End If

      ' Call API
      ' MakeSureDirectoryPathExists(NewPath) will create the directory
      ' NewPath if it does not already exist.

    If MakeSureDirectoryPathExists(NewPath) <> 0 Then
        Create_Directory = True
    Else
        Create_Directory = False
    End If

End Function

' ************ '

-----Original Message-----
From: Jephe Nache [mailto:[EMAIL PROTECTED] 
Sent: September 8, 2005 5:04 PM
To: [email protected]
Subject: MI-L Check if Folder Exists


Does anyone know how to check if a folder exists?
 
I imagine you have to call some API functions?
 
SHGetFolderLocation perhaps?
 
 
 
Any ideas/examples appreciated.
 
Thanks

                
---------------------------------
 Click here to donate to the Hurricane Katrina relief effort.

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 17789

Reply via email to