ExpandFileName (Delphi)
Description
The following example uses a listbox, an edit control, and a button on a form. When the button is clicked, the filename specified in the edit control is expanded to a fully qualified filename and added to the list box.
Code
procedure TForm1.Button1Click(Sender: TObject);
begin
ListBox1.Items.Add(SysUtils.ExpandFileName(Edit1.Text));
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Label2.Caption := ExtractFilePath(Application.ExeName);
end;
Uses
- System.SysUtils.ExpandFileName ( fr | de | ja )
- System.AnsiStrings.ExpandFileName ( fr | de | ja )