procedure sample; var fileName : string; begin filename := 'c:\test.txt'; // Now see if the file exists if FileExists(fileName) then message_dlg(fileName+' exists OK') else message_dlg(fileName+' does not exist'); end;