uses System.IOUtils;var Exists: Boolean;begin Exists := TFile.Exists('file.txt'); WriteLn('exists is ', Exists);end.