MACROMEDIA COLDFUSION MX 61-CFML Reference page 471

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

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="expandpath.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>
--->
ExpandPath
471

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents