Get file name from full path and name?

Klaus Major klaus at major-k.de
Wed Feb 8 18:06:46 EST 2006


Hi Garrett,

> Excellent!  And I actually understand that too!

Great :-)

> Thank you Klaus,

You're welcome!

> -Garrett
> On Feb 8, 2006, at 2:50 PM, Klaus Major wrote:
>> Hi Garrett,
>>> 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" ?
>> ...
>> answer file "Is there any beer left?"
>> if it = empty then exit mouseup ##or whatever
>> set the itemdel to "/"
>> put item -1 of it into t_filename
>> set the itemdel to "."
>> put item -1 of t_filename into t_suffix
>> put item 1 to -2 of t_filename into t_filename_without_suffix
>> ...
>> Hope that helps :-)
>>> Thanks,
>>> -Garrett

Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de



More information about the use-livecode mailing list