Código Delphi
[-]function GetShortName(FileName: string): string;
var
Actually: string;
FindData: TWin32FindData;
Pos, Count: Integer;
begin
Count := 3;
Result := UpCase(FileName[1]) + ':';
while Count < Length(FileName) do
begin
Inc(Count);
Pos := System.Pos('\', Copy(FileName, Count, MAX_PATH));
if LongBool(Pos) then Inc(Count, Pos - 1) else Count := MAX_PATH;
Windows.FindClose(FindFirstFile(PChar(Copy(FileName, 1, Count - 1)), FindData));
if FindData.cAlternateFileName[0] <> #0 then
Result := Result + '\' + FindData.cAlternateFileName
else
Result := Result + '\' + StrUpper(@FindData.cFileName);
end;
end;
El problema ocurria cuando el nombre dado era un 8.3 válido, ahora debería funcionar. Las etiquetas son
[delphi] tu codigo aquí [/delph¡] ó el único boton cafe de la parte superior del editor.
Saludos