How can I extract only "test" from the FileName variable below?


<cfset FileName = ListLast(url.filename, "\")>
<cfset DirPath = Left(url.filename, Evaluate(Len(url.filename) - 
len(FileName) - 1))>
<cfset TheFile = ListLast(url.filename)>
<cfset TheFolder = DirPath>

<cfoutput>
TheFolder: #TheFolder#\<br>
FileName: #FileName#<br>
</cfoutput>


Results:
------------

TheFolder: D:\test\dir1\
FileName: test.dat





+-----------------------------------------------------------------------------------+ 

Philip Humeniuk
[EMAIL PROTECTED]
[EMAIL PROTECTED]
+------------------------------------------------------------------------------------+



-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to