Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!kth!draken!tut!karikukko!ks From: ks@karikukko.tut.fi (Syst{ Kari) Newsgroups: comp.windows.news Subject: Re: How to find out if a file exists Message-ID: <7505@etana.tut.fi> Date: 7 Jun 89 12:52:39 GMT References: <7506@hoptoad.uucp> <8087@batcomputer.tn.cornell.edu> <8130@batcomputer.tn.cornell.edu> Sender: News@tut.fi Reply-To: ks@karikukko.UUCP (Syst{ Kari) Organization: Tampere University of Technology, Finland Lines: 23 In article <8130@batcomputer.tn.cornell.edu> prove@batcomputer.tn.cornell.edu (Roger Ove) writes: > I tried this and it fails when the file doesn't exist, it bombs >with the error "undefinedfilename" and terminates the process. Works >fine if the file is there, hardly a satisfactory substitute. It Well, I tried Heikki's idea and it worked just fine ! This is the pretty-printed version of the excluded fileexists: /fileexists { {(r) file} stopped { pop pop false } { closefile true } ifelse } def PS. We are running NeWS 1.1. Kari Systa ks@tut.fi (ks@tut.UUCP, ..!mcvax!tut!ks, ks@fintut.bitnet) Tampere Univ. Technology Telefax: Phone Software System Laboratory +358 31 162913 work: +358 31 162585 Po. Box. 527, SF-33101 Tampere, Finland home: +358 31 177412