Элементарно, Ватсон:
Код:
function ShortFileName(const FileName: string): string;
var
aTmp: array[0..255] of Char;
begin
if GetShortPathName(PChar(FileName), aTmp, Sizeof(aTmp)) = 0 then begin
Result:= FileName;
end
else begin
Result:= StrPas (aTmp);
end;
end;
__________________
Оставайтесь хорошими людьми...
VK id2634397, ds [at] phoenix [dot] dj
|