Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!samsung!umich!sharkey!tygra!dave From: dave@tygra.UUCP (David Conrad) Newsgroups: comp.lang.pascal Subject: Re: Selective write within files Message-ID: <1991Mar28.101710.12356@tygra.UUCP> Date: 28 Mar 91 10:17:10 GMT References: <1991Mar27.160905.1962@cs.mcgill.ca> Organization: CAT-TALK Conferencing System, Detroit, MI Lines: 24 In article <1991Mar27.160905.1962@cs.mcgill.ca> storm@cs.mcgill.ca (Marc WANDSCHNEIDER) writes: > >My Question: Is there any way to just selectively take this text file, >delete and then rewrite the file to a different name WITHOUT >loading the ENTIRE file into memory and REWRITING the whole thing....? > >Ie, I need to search in the text file for somthing (even though I ALWAYs know >where the thing I am looking for is), then remove that word, replace it with >another, and then rewrite the file. > >Can I do it, or do I have to load the entire file into memory and then work >with string handlers from there before rewriting. > Why not access it as a File of Char? Just remember that you then have to send the CR/LF's and EOF yourself. Dave Conrad dave%tygra@sharkey.cc.umich.edu -- = CAT-TALK Conferencing Network, Computer Conferencing and File Archive = - 1-313-343-0800, 300/1200/2400/9600 baud, 8/N/1. New users use 'new' - = as a login id. AVAILABLE VIA PC-PURSUIT!!! (City code "MIDET") = E-MAIL Address: dave%tygra@sharkey.cc.umich.edu