|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
ListLast()
Hello,
I know I can use currentscript=ListLast(cgi.script_name,"/"); to get the name of a file -- the last entry after the "/" in the path to the file, culled from the web address. But, I really want to get the name of the *directory* that the file is in. Is there a function called something like ListSecondToLast() ??? Thanks all, Laura S. |
|
#2
|
|||
|
|||
|
This should do it:
<cfoutput> #listGetAt( cgi.script_name, ( listLen( cgi.script_name, '/' ) - 1 ), '/' )# </cfoutput> |
|
#3
|
|||
|
|||
|
Thanks ... I also figured out that
ListFirst(cgi.script_name,"/"); will also work to get me the directory name I want, if the path to the file is only one level deep. Cheers, Laura S. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > ListLast() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|