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

<BASEFONT FACE="Arial, Helvetica" SIZE=2>
<BODY  bgcolor="#FFFFD5">
<H3>GetDirectoryFromPath Example</H3>

<p>This is a read-only example. Because file access is a sensitive area,
consider the security of your directory hierarchy prior to allowing
access to it.</p>
<!--- 
<CFSET thisPath=ExpandPath("*.*")>
<CFSET thisDirectory=GetDirectoryFromPath(thisPath)>
<CFOUTPUT>
The current directory is: #GetDirectoryFromPath(thisPath)#
<CFIF IsDefined("form.yourFile")>
<CFIF form.yourFile is not "">
<CFSET yourFile = form.yourFile>
	<CFIF FileExists(ExpandPath(yourfile))>
	<P>Your file exists in this directory.  You entered
	the correct file name, #GetFileFromPath("#thisPath#/#yourfile#")#
	<CFELSE>
	<P>Your file was not found in this directory:
	<BR>Here is a list of the other files in this directory:
	<!--- use CFDIRECTORY to give the contents of the
	snippets directory, order by name and size --->
	<CFDIRECTORY DIRECTORY="#thisDirectory#"
	NAME="myDirectory"
	SORT="name ASC, size DESC">
	<!--- Output the contents of the CFDIRECTORY as a CFTABLE --->	
	<CFTABLE QUERY="myDirectory">
	<CFCOL HEADER="NAME:"
			TEXT="#Name#">
	<CFCOL HEADER="SIZE:"
			TEXT="#Size#">
	</CFTABLE>
	</CFIF>
</CFIF>
<CFELSE>
<H3>Please enter a file name</H3>
</CFIF>
</CFOUTPUT>

<FORM action="getdirectoryfrompath.cfm" METHOD="post">
<H3>Enter the name of a file in this directory <I><FONT SIZE="-1">(try expandpath.cfm)</FONT></I></H3>
<INPUT TYPE="Text" NAME="yourFile">
<INPUT TYPE="Submit" NAME="">
</FORM> --->

</BODY>
</HTML>       
