Stripping variable

2002-12-03 Thread FlashGuy
Hi,

I have the following variable (which can change based on directory). Below is the 
output from some examples:

dir = D:\mywork\temp
dir1 = D:\mywork\temp\dir1

How can I output only temp or dir1 from the above variables?




---
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



Stripping variable

2002-12-03 Thread Keith Dodd
If all look similar to that shown, you might treat path as a list, with the / as 
delimiter. Then do a ListLast with the delimiter set to /

My thought

Keith Dodd
[EMAIL PROTECTED]
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



RE: Stripping variable

2002-12-03 Thread Mike Townend
ListLast(dir, \)

HTH



-Original Message-
From: FlashGuy [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 3, 2002 13:30
To: CF-Talk
Subject: Stripping variable


Hi,

I have the following variable (which can change based on directory).
Below is the output from some examples:

dir = D:\mywork\temp
dir1 = D:\mywork\temp\dir1

How can I output only temp or dir1 from the above variables?




---
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: Stripping variable

2002-12-03 Thread Robertson-Ravo, Neil (RX)
erm...

ListLast(dir1,\)

should do it.


-Original Message-
From: FlashGuy [mailto:[EMAIL PROTECTED]]
Sent: 03 December 2002 13:30
To: CF-Talk
Subject: Stripping variable


Hi,

I have the following variable (which can change based on directory). Below
is the output from some examples:

dir = D:\mywork\temp
dir1 = D:\mywork\temp\dir1

How can I output only temp or dir1 from the above variables?




---
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com