delphi7
if not DirectoryExists(Edit1.Text) then 判断目录是否存在 begin //判断目录不存在 end;
delphi 10.3
uses FileCtrl; procedure TForm4.FormCreate(Sender: TObject); begin if not FileCtrl.DirectoryExists('C: emp') then showmessage('目录不存在'); end;
delphi7
if not DirectoryExists(Edit1.Text) then 判断目录是否存在 begin //判断目录不存在 end;
delphi 10.3
uses FileCtrl; procedure TForm4.FormCreate(Sender: TObject); begin if not FileCtrl.DirectoryExists('C: emp') then showmessage('目录不存在'); end;