Get file name from full path and name?

Ken Ray kray at sonsothunder.com
Wed Feb 8 18:32:20 EST 2006


On 2/8/06 4:46 PM, "Garrett Hylltun" <garrett at paraboliclogic.com> wrote:

> Greetings,
> 
> Searched the docs for anything that might do this, but can't find
> anything....
> 
> Does anyone know how to extract a file name and extension from a full
> path, such as from "answer file" ?

Here's another one (the 'regex' way):

    get matchText(pPath,".*\/(.*?)$",tLeaf)
    return tLeaf

Still not a 1-liner, though...

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the Use-livecode mailing list