Returns a path equivalent to the relative_path appended to the base template path. Note the following:
See also FileExists, GetClientVariablesList, and GetFileFromPath.
ExpandPath(relative_path)
Any relative path. ExpandPath converts relative directory references (.\ and ..\)to an absolute path. The function throws an error if this argument or the resulting absolute path is invalid.
<!--- This example shows the use of ExpandPath --->
<HTML>
<HEAD>
<TITLE>
ExpandPath Example
</TITLE>
</HEAD>
<BODY bgcolor=silver>
<H3>ExpandPath Example</H3>
<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:
...