Get file name from full path and name?

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

On 2/8/06 4:46 PM, "Garrett Hylltun" <garrett at> 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:
Email: kray at

More information about the Use-livecode mailing list