RE: Strip directory path to get just file name

2000-05-19 Thread Olive, Christopher M Mr USACHPPM

do a ListLast("c:\webshare\wwwroot\site\filename.cfm", "\").

Chris Olive
DOHRS Website Administrator
[EMAIL PROTECTED]


-Original Message-
From: cf kaizen [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 19, 2000 12:41 PM
To: [EMAIL PROTECTED]
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=listsbody=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=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Strip directory path to get just file name

2000-05-19 Thread Randy Adkins

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=listsbody=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=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Strip directory path to get just file name

2000-05-19 Thread Michael Imhoff

Try:

cfset filename = ListLast(filepath, "\")

Hope that does the trick for you,
-Michael


Michael Imhoff  www.omnicypher.com  icq: 10495667
[EMAIL PROTECTED] (home)  (320) 255-4447 (home)
[EMAIL PROTECTED] (cell)  (612) 247-8159 (cell)
Allaire Alliance Consulting Partner



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



RE: Strip directory path to get just file name

2000-05-19 Thread Duane Boudreau

Andy,

CF4.5:
cfset filename = GetFileFromPath(Path)

CF4.01
cfset filename = ListLast(Path, "\")

HTH,
Duane Boudreau,
Project/Beta Manager, eMPower
Director, Web Technologies
Ektron, Inc.
http://www.ektron.com
5 Northern Blvd, Suite 6
Amherst, NH 03031
Tel: 603-594-0249
Fax: 603-594-0258



 -Original Message-
 From: cf kaizen [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 19, 2000 12:41 PM
 To: [EMAIL PROTECTED]
 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=listsbody=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=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Strip directory path to get just file name

2000-05-19 Thread pan


From: cf kaizen [EMAIL PROTECTED]

 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?
 

H  have you looked at the list functions?
Your string is a list delimited by the "\" char.

Pan


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



RE: Strip directory path to get just file name

2000-05-19 Thread Larry Juncker

How about this?

CFSET ItemURL = "c:\webshare\wwwroot\site\filename.cfm"

CFOUTPUT
CFSET filename = #RemoveChars(ItemURL,1,Len(spanExcluding(ItemURL,"f")))#

#filename#

/cfoutput

H   Larry Juncker
 L  Senior Cold Fusion Programmer
  I Heartland Communications Group
  Internet Division

-Original Message-
From: cf kaizen [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 19, 2000 11:41 AM
To: [EMAIL PROTECTED]
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=listsbody=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=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.