Converts FileNames Shorts -> Longs  

Send By: Q3 Team
Web : http://www.q3.nu
Email: dlib@q3.nu
Date: 14/09/99

Tip accessed 450 times

 


That is to say, to convert a short file name as: 'NombreD~1.pas' to 'NombreDeFicheroLargo.pas'.

Add 'ShellApi' in the uses of your form


    Function GetLongFileName(Const FileName : String) : String;
    var
      aInfo: TSHFileInfo;
    begin
      if SHGetFileInfo(PChar(FileName),0,aInfo,Sizeof(aInfo),SHGFI_DISPLAYNAME)<>0 then
         Result:= String(aInfo.szDisplayName)
      else
         Result:= FileName;
    end;




Updated at 14/09/99
Added 'Uses ShellApi'