news |
info |
people |
software |
stuff |
If passed a folder path (with or without a colon on the end), it returns the name of the folder.
Note that this routine doesn't check to see whether the file/folder exists or whether the path is legal.
function FL_NameFromPath path -- given the path to a file, returns just the filename -- remove final colon if its a folder if last char of path is colon then delete last char of path end if -- return everything after last colon get the itemDelimiter set the itemDelimiter to colon put last item of path into name set the itemDelimiter to it return name end FL_NameFromPath