Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Checking to see if folder exists (2002)

    Hi All,
    In my DB I am trying to use the dir command to see if a folder exists in a certain location. I use this in other places to see if a file exists. Checking to see if a folder is there doesn't seem to work. What is the proper method?

    Thanks,
    Mark

  2. #2
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Checking to see if folder exists (2002)

    OK, I found it.... You have to use the vbDirectory extension if the Dir command.

    Thanks,
    Mark

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Checking to see if folder exists (2002)

    You can specify vbDirectory as second argument:

    If Dir("C:MyFolder", vbDirectory) = "" Then
    ' Folder does not exist
    Else
    ' Folder exists
    End If

  4. #4
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Checking to see if folder exists (2002)

    Thanks, early here and not quite awake yet! Just have to read the built in help file!

Posting Permissions

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