Results 1 to 3 of 3

Thread: How Do I see if a directory exists?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Australia
    Posts
    149
    Just wondering how I can find out if a directory exists using code and then if it does bring up a prompt and if not do nothing.

    I dont know if i can use the dir$() function or if there is some eaiser or better way.

    Any help would be appreciated.

    Please if you could post some code to help me.

    Thanks

    -|- Hurgh -|-

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    [code]
    If (Dir(pathName) <> "") Then
    MsgBox "Path exists"
    End If
    [code]
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    Guest
    Code:
    If Dir("MyDirectory", vbDirectory) <> "" Then
    Msgbox "Directory exists"
    End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width