x:=extractfilename(str); //quxitongwenjianjia+fazhanming,bubaohanxiangguanwenjianlujingfenxi
y:=extractfileext(str); //quwenshudexunzhiming
delphi huoquyigewenshujiafangfahuanyouyicengwenshujiazongmuluchenghu:
var
dir: string;
begin
dir := 'd:\delphi\lib';
dir := ExtractFileName(dir);
showmessage(dir); //bijing lib
end;