function ShortToLongFileName(const ShortName: string): string;
var
Temp: TWIN32FindData;
SearchHandle: THandle;
begin
SearchHandle := FindFirstFile(PChar(ShortName), Temp);
if SearchHandle <> ERROR_INVALID_HANDLE then
begin
Result := string(Temp.cFileName);
if Result = '' then
Result := string(Temp.cAlternateFileName);
end
else
Result := '';
Windows.FindClose(SearchHandle);
end;
여러가지 방법이 있습니다. 아래는 그중 하나입니다...
function ShortToLongFileName(const ShortName: string): string;
var
Temp: TWIN32FindData;
SearchHandle: THandle;
begin
SearchHandle := FindFirstFile(PChar(ShortName), Temp);
if SearchHandle <> ERROR_INVALID_HANDLE then
begin
Result := string(Temp.cFileName);
if Result = '' then
Result := string(Temp.cAlternateFileName);
end
else
Result := '';
Windows.FindClose(SearchHandle);
end;
^^ 항상 즐코하세요...