parsing through pathnames
Jan Schenkel
janschenkel at yahoo.com
Tue Jan 27 15:16:49 EST 2004
--- Barry Levine <themacguy at macosx.com> wrote:
> Given a pathname such as
> "/Volumes/120GB/Applications/Appleworks\ 6"
> (I'm using shell for my commands hence the backslash
> preceding the
> space), is there an easy way of returning the last
> part of the path?
> ("/Appleworks\ 6" in this case)
>
> TIA,
> Barry
>
Hi Barry,
The shortest way I can think of is :
--
set the itemDelimiter to "/"
put "/" & item -1 of tPath into tLastPart
--
Hope this helped,
Jan Schenkel.
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
More information about the use-livecode
mailing list