![]() |
Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Convert long filename to DOS filename
Use API function GetShortPathName:
procedure TForm1.Button1Click(Sender: TObject);
var
FileName: string;
ATmp: array[0..255] of Char;
begin
FileName:=FileListBox1.FileName;
Label1.Caption:=FileName;
if GetShortPathName(PChar(FileName),ATmp,SizeOf(ATmp)-1)=0 then
Label2.Caption:=FileName
else
Label2.Caption:=StrPas(ATmp);
end;
- Related components
- TFileSearch
- TFolderMonitor
- TFileVersion
-
More for developers