Below is code to get the Long Filename path from a short filename string.
function LongPathName(const ShortPathName: string): string;
var
  Retval: DWORD;
  Buff: array [0..MAX_PATH-1] of Char;
begin
  Retval := GetLongPathName(PChar(ShortPat hName), Buff, Length(Buff));
  Win32Check(Retval <> 0);
  Result := Buff;
end;