Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!caen!uwm.edu!bionet!agate!ucbvax!hsdndev!cmcl2!adm!news From: NORM%IONAACAD.BITNET@cunyvm.cuny.edu ( Norman Walsh) Newsgroups: comp.lang.pascal Subject: FileExists() Message-ID: <25936@adm.brl.mil> Date: 12 Feb 91 15:55:48 GMT Sender: news@adm.brl.mil Lines: 9 In order to write a FileExists() function, I recommend using either the FindFirst method (and make sure it's a FILE not a directory or something) or a GetFAttr (ditto about making sure it's a file) rather than trying to open the file. Too many things can go wrong trying to open the file. Your pgm might be out of file handles or, if the file is read-only, you have to diddle with the FileMode variable (make sure you put it back) etc. ndw