Sunday, December 10, 2017

DELPHI - How check if file exists

var
  sPath : string;
begin
  ...
  if not FileExists( sPath ) then
    begin
      MessageDlg( Format( 'File "%s" not found.', [sPath] ), mtError, [mbOk], 0 );
      exit;
    end;
  ...
end;

No comments:

Post a Comment