Description
Determines whether on-disk or in-memory directory exists.
Yes, if the specified directory exists; No, otherwise.
DirectoryExists(path)
See also
DirectoryCreate, DirectoryDelete, DirectoryList, DirectoryRename
Parameter |
Description |
|---|---|
path |
An absolute on-disk or in-memory path. Alternatively, you can specify IP address as in the following example: DirectoryExists("//12.3.123.123/c_drive/test"); |
<cfscript>
theDir=GetDirectoryFromPath(GetCurrentTemplatePath());
theFile=theDir & "sheets/Books_AddColumn.xlsx";
path = directoryExists(theFile);
writeoutput("Does the path exists" & "<br>" & path);
</cfscript>
Output
Does the path exist:
NO
Sign in to your account