This will strip the SCRIPT_NAME and leave you with the actual
filename that is being served up to the server.

<cfset pagename = #RemoveChars(CGI.SCRIPT_NAME,1,1)#>



----- Original Message -----
From: "cf kaizen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 19, 2000 12:41 PM
Subject: Strip directory path to get just file name


> Hi All,
>
> If my value in a string is
>
> c:\webshare\wwwroot\site\filename.cfm
>
> , how I just strip it down so I can dump filename.cfm
> into a variable?
>
> I am thinking that I should access the above string
> from the right side, looping through each character
> until I get to the first "\". However, I don't know
> where to start with the code (and, I left both cfwacks
> books at home :(
>
> Any help is very much appreciated!
>
> Thanks!
> Andy
>
> __________________________________________________
> Do You Yahoo!?
> Send instant messages & get email alerts with Yahoo! Messenger.
> http://im.yahoo.com/
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to