⤷ Check if a file exists

Use FileExists function. If file exists, then this function will return True.

procedure TForm1.Button1Click(Sender: TObject);
begin
  if FileExists(Edit1.Text) then
    ShowMessage('File already exists!')
  else
    ShowMessage('This file is unique');
end;
More for developers