VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Check if Folder Exists or not using filesystem Object

by Mohammed Gafoor (1 Submission)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 9th December 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Check if Folder Exists or not using filesystem Object

Rate Check if Folder Exists or not using filesystem Object



Public Function FolderExists(DirPath As String) As Boolean
On Error GoTo FolderErr
    'Declare File System Object
    Dim fso As Object

    'Create File System Object
    Set fso = CreateObject("Scripting.FileSystemObject")

    'Check Wheather Folder exists or not
    FolderPathExists = fso.FolderExists(sDir)
    Exit Function
FolderErr:
    MsgBox Err.Description, vbCritical, "Error " 
    FolderPathExist = False
End Function

'Please if  any feedback let me know my email is  [email protected]
'[email protected]

Download this snippet    Add to My Saved Code

Check if Folder Exists or not using filesystem Object Comments

No comments have been posted about Check if Folder Exists or not using filesystem Object. Why not be the first to post a comment about Check if Folder Exists or not using filesystem Object.

Post your comment

Subject:
Message:
0/1000 characters