function fun1(fn: string): string;
var
i,j,k: integer;
begin
result := '';
j := 0;
k := 0;
for i:=length(s) downto 1 do
begin
if s[i] = '\' then
begin
if j = 0 then j := i
else
begin
k := i;
break;
end;
end;
if(j <> 0 and k <> 0) then
result := copy(s,k+1,j-k-1);
end;
end;