Date: Wed, 28 Apr 93 10:10:38 EDT From: peprbv AT cfa0 DOT harvard DOT edu (Bob Babcock) To: a_tucker AT paul DOT spu DOT edu Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: managing diff's >I've been writing a disk cataloging program as well, but have caught up on >a snag lately. How do I detect write protection on a disk without hurting >it? As far as I know, the only reliable way of detecting write protection is to try to write to the disk and catch the failure with a critical error handler (or int 26). I can think of one trick which might work, but I _strongly_ recommend against using it: read the disk to find out how many tracks it has, then try to format one track beyond the last. Usually a drive will let you write a few extra tracks. But, hardware or software may prevent you from doing this, and possibly clobber the last valid track instead.