directory_exists (x)

The directory_exists(x) function returns True if directory x exists; False otherwise. x must be a fully qualified path.

If x contains ? or * wildcards, the directory_exists (x) function returns True if at least one directory matches the wildcard pattern. If any component in the path does not exist or is inaccessible, the function returns False.

This function returns a value of type Boolean.

Example

 directory_exists ("c:\somedirectory")

Result: True if the directory c:\somedirectory exists.

directory_exists returns False when used on the root of either of the following:

  • Shares (\\host\share)
  • Drives (c:\)