* * STRIPPATH - Strip the path from a file name. * * Description: * Find positions of backslash in the name of the file. If there is one * take everything to the right of its position and make it the new file * name. If there is no slash look for colon. Again if found, take * everything to the right of it as the new name. If neither slash * nor colon are found then return the name unchanged. * * Parameters: * filename - character string representing a file name * * Return value: * The string "filename" with any path removed * FUNCTION strippat PARAMETER m.filename PRIVATE m.slashpos, m.namelen, m.colonpos m.slashpos = RAT("\", m.filename) IF m.slashpos <> 0 m.namelen = LEN(m.filename) - m.slashpos m.filename = RIGHT(m.filename, m.namelen) ELSE m.colonpos = RAT(":", m.filename) IF m.colonpos <> 0 m.namelen = LEN(m.filename) - m.colonpos m.filename = RIGHT(m.filename, m.namelen) ENDIF ENDIF RETURN m.filename