Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!elroy.jpl.nasa.gov!usc!snorkelwacker.mit.edu!hsdndev!husc6!ukma!seismo!dimacs.rutgers.edu!rutgers!cmcl2!adm!news From: NORM%IONAACAD.BITNET@tecmtyvm.mty.itesm.mx ( Norman Walsh) Newsgroups: comp.lang.pascal Subject: Exists() revisited Message-ID: <26028@adm.brl.mil> Date: 15 Feb 91 14:10:29 GMT Sender: news@adm.brl.mil Lines: 17 >2. the file is not found if it's a read-only file on a network > drive. This is because untyped files (and any other non-text files) > are opened in update mode by reset( .. ). > First, I agree wholeheartedly with Reino's assertion that trying to open the file is not the best solution to the problem. However, the fact that Turbo Reset()s untyped files in r/w mode can be overridden by setting the FileMode variable to 0. SaveMode := FileMode; {which is usually 3, by the way} FileMode := 0; Reset(F); FileMode := SaveMode; The above code will open any file "F" in r/o mode. ndw