Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!math.fu-berlin.de!ira.uka.de!unido!mcshh!frimp From: frimp@mcshh.hanse.de (Frank Heinzius) Newsgroups: comp.lang.pascal Subject: Re: TP error while opening R/O files Keywords: r/o turbo pascal 6.0 borland files opening error Message-ID: <9144@mcshh.hanse.de> Date: 6 May 91 07:56:53 GMT References: <1991May02.160542.28060@cs.ruu.nl> Lines: 22 In <1991May02.160542.28060@cs.ruu.nl> ajbanck@cs.ruu.nl (Arent Banck) writes: ]Using Turbo Pascal 6.0, I wanted to open a file witch was ]write protected. I used RESET to open the file, but ended here ]with a error saying I couldn't open a file. ]Why can't I open the file? And is there a way to open it? ]I am using 4dos, and msdos 5.0. and have not tried it with command.com You must reassign the "filemode" system variable like this: temp := filemode; filemode := 0; reset(read_only_file); {other file operations} {...} close(read_only_file); filemode := temp; -- Real : Frank Heinzius Voice: +49 40 814 416 Smart: frimp@mcshh.hanse.de Blah : 2B or not 2B, that's FF