DirectoryExists

Description

Returns YES if the directory specified in the argument exists; otherwise, returns NO.

Category

System functions

Syntax


DirectoryExists(absolute_path) 

See also

FileExists

Parameters

Parameter
Description
absolute_path
A absolute path

Example

<!--- 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#







Banner.Novgorod.Ru