ExpandFileName (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

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

Personal tools
Assistance