# DirectoryExists

Returns YES if the directory specified in the argument does exist; otherwise, it returns NO.

See also FileExists.

### Syntax

    DirectoryExists(absolute_path)

##### absolute_path

Any absolute path.

### Examples

    <!--- This example shows the use of DirectoryExists --->
    <HTML>
    <HEAD>
    <TITLE>
    DirectoryExists Example
    </TITLE>
    </HEAD>

    <BODY BGCOLOR=silver>
    <H3>DirectoryExists Example</H3>

    <CFSET thisPath=ExpandPath("*.*")>
    <CFSET thisDirectory=GetDirectoryFromPath(thisPath)>
    <CFSET thisDirectory= Left(thisDirectory, Evaluate(Len(thisDirectory) -
    1"))>

    <CFOUTPUT>
    The current directory is: #GetDirectoryFromPath(thisPath)#
    <CFIF IsDefined("FORM.yourDirectory")>
    <CFIF FORM.yourDirectory is not "">
    <CFSET yourDirectory = FORM.yourDirectory>
        <CFIF DirectoryExists(yourDirectory)>
        <P>Your directory exists.  You entered
        a valid directory name, #yourdirectory#

    ...