Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!ucbvax!ucsfcgl!cgl.ucsf.edu!kneller From: kneller@cgl.ucsf.edu (Don Kneller) Newsgroups: comp.sys.ibm.pc Subject: Re: input == output, how do you tell? Message-ID: <11320@cgl.ucsf.EDU> Date: 20 Jan 89 00:35:15 GMT References: <3505@ucdavis.ucdavis.edu> Sender: daemon@cgl.ucsf.edu Reply-To: kneller@socrates.ucsf.edu.UUCP (Don Kneller) Organization: UCSF Computer Graphics Lab Lines: 21 In article <3505@ucdavis.ucdavis.edu> kinmonthprep@deneb.ucdavis.edu (Earl H. Kinmonth) writes: >What is a "fool proof" way of telling whether a program is writing to >its own input under MSDOS? > >File name comparions are NOT particularly good because there are too >many ways to write the same name. One possibility is to compare the filenames, sans path components, and the file times, dates, sizes and attributes. If all are the same, then chances are, the files are the same (or copies). You could determine if the files are copies by making some change to the output file (for example, change its date or attributes) and seeing if the input file reflects that changes. Buffering of directories might be a problem, but I suspect not. - don ----- Don Kneller UUCP: ...ucbvax!ucsfcgl!kneller INTERNET: kneller@cgl.ucsf.edu BITNET: kneller@ucsfcgl.BITNET