![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Функция преобразования имени файла... [D5, Win2k]
BillyJeans © (2004-07-12 17:16:00)Существует ли функция преобразующая длинные имена файлов и каталогов в короткие (8.3)?
DVM (2004-07-12 19:48:00) [1]function LongPathToShortPath(const Path: string): string;
var
Required: Integer;
begin
Result := Path;
Required := GetShortPathName(PChar(Path), nil, 0);
if Required <> 0 then
begin
SetLength(Result, Required);
Required := GetShortPathName(PChar(Path), PChar(Result), Required);
if (Required <> 0) and (Required = Length(Result) - 1) then
SetLength(Result, Required)
else
Result := Path;
end;
end;
Anatoly Podgoretsky (2004-07-12 17:22:00) [2]Да
rOOse (2004-07-12 17:22:00) [3]WinApi
GetShortPathName