GetDirectoryFromPath

Extracts the directory (with a \ (back slash)) from a fully specified path.

See also ExpandPath and GetFileFromPath.

Syntax

GetDirectoryFromPath(path)
path

Fully specified path (drive, directory, filename, and extension).

Examples

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

<BODY bgcolor=silver>
<H3>GetDirectoryFromPath Example</H3>

<CFSET thisPath= ExpandPath("*.*")>
<CFSET thisDirectory= GetDirectoryFromPath(thisPath)>
<CFOUTPUT>
The current directory is: #GetDirectoryFromPath(thisPath)#
</CFOUTPUT>