Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site utastro.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!genrad!panda!talcott!harvard!seismo!ut-sally!utastro!nather From: nather@utastro.UUCP (Ed Nather) Newsgroups: net.micro.pc Subject: Re: How does a program know when a disk is changed. Message-ID: <12@utastro.UUCP> Date: Thu, 28-Mar-85 11:52:10 EST Article-I.D.: utastro.12 Posted: Thu Mar 28 11:52:10 1985 Date-Received: Sun, 31-Mar-85 03:13:52 EST References: <131@creed.UUCP> Organization: U. Texas, Astronomy, Austin, TX Lines: 23 > I have a program that needs to keep a file open for a long time. > How can I be sure that someone hasn't changed the disk since I > opened the file? > > Bruce Arden > ..!mcvax!ukc!stc-a!creed!arden If the disk in question has a file on it you can be sure has a unique name (perhaps you could write one on it you're sure would be unique) then you can search the disk for its existence. In a .bat file, the "If exist filename ..." does that job. Apparently DOS does it that way -- you can swap disks around if they have the same directory names, and are "in" a subdirectory -- and DOS will leave you there, on the new disk, if it hasn't seen you refer to that drive and been unable to find the path it last saw. -- Ed Nather Astronony Dept, U of Texas @ Austin {allegra,ihnp4}!{noao,ut-sally}!utastro!nather