Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: notesfiles - hp 1.2 08/01/83; site hp-pcd.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!tektronix!hplabs!hp-pcd!bill From: bill@hp-pcd.UUCP (bill) Newsgroups: net.micro.pc Subject: Re: Write protecting a file in DOS? Message-ID: <13600002@hpcvla.UUCP> Date: Mon, 2-Dec-85 12:21:00 EST Article-I.D.: hpcvla.13600002 Posted: Mon Dec 2 12:21:00 1985 Date-Received: Thu, 12-Dec-85 04:33:47 EST References: <4232@fritz.UUCP> Organization: Hewlett-Packard - Corvallis, OR Lines: 19 Nf-ID: #R:fritz:-423200:hpcvla:13600002:000:792 Nf-From: hpcvla!bill Dec 2 09:21:00 1985 All you need to do is set the file's Read-Only attribute bit. The easiest way to do this is to use one of the many available programs that let you monkey with file attributes -- CHMODE (aka CHMOD) is probably the most popular; TCHMOD is another I know of, as well as one of the programs that comes with the Norton Utilities (I forget its name, I think it's FA.COM or something like that). With CHMODE, you just say chmode +r filename Kind of like the way you'd do it with Unix. If you want to do it programmatically, there's a dos function called Get/Set Attribute. Unfortunately, I don't have its specifics in front of me so I'll leave it to someone else to describe it to you, or you can look it up in any handy-dandy MS-DOS Programmer's Reference Manual ... bill frolik hp-pcd!bill