| 发表于:2007-09-26 18:55:591楼 得分:0 |
public function getfilenameofpath(path as string) on error goto proc_err: dim i as integer, arraylen as integer, temp as integer arraylen = len(path) for i = arraylen to 1 step -1 if mid(path, i, 1) = "\ " then temp = i exit for end if next i if arraylen <= 3 then getfilenameofpath = " " else getfilenameofpath = right(path, (arraylen - temp)) end if proc_exit: exit function proc_err: goto proc_exit end function | | |
|