was heist denn kompletter pfad bei dir?
"C:\Foo\Bar\blah.txt"
oder
"blah.txt" ?
Delphi-Quellcode:
var
sFileName: string = 'C:\Foo\Bar\Blah.txt';
begin
sFileName := SysUtils.ExtractFileName(sFileName);
Dialogs.ShowMessage(sFileName); // ergibt "Blah.txt"
end;