SystemGetDir (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

Description

This example reports the current directory and drive. Set Help on GetDir for reporting information on other drives.

Code

procedure TForm1.Button1Click(Sender: TObject);
var
  s : string;
begin
  GetDir(0,s); { 0 = Current drive }
  MessageDlg('Current drive and directory: ' + s, mtInformation, [mbOk] , 0);
end;

Uses