Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!mrsvr!roth From: roth@mrsvr.UUCP (The Unknown Programmer) Newsgroups: comp.sys.ibm.pc Subject: Re: Disk inserted??? Summary: Need a special program Message-ID: <502@mrsvr.UUCP> Date: 14 Oct 88 21:52:40 GMT References: <55969UH2@PSUVM> <3278@nicmad.UUCP> <955@psuhcx.psu.edu> Distribution: na Organization: GE Medical, MR Center, Milwaukee Lines: 35 In article <955@psuhcx.psu.edu>, wcf@psuhcx.psu.edu (Bill Fenner) writes: > In article <3278@nicmad.UUCP> brown@nicmad.UUCP (Mr. Video) writes: > |In article <55969UH2@PSUVM> UH2@PSUVM.BITNET (Lee Sailer) writes: > | | | > |With 360K diskette drives, it can't be done. I don't know how to do it > > Actually, it's rather simple. At least, it is on other machines, I'm not > sure if the IBM floppy controller can do this (I would hope it would.) Mr. Video is right - the status of a diskette drive cannot be determined using BAT language. A special program that sets an exit code the BAT program interprets is required. What one needs is a function that traps DOS critical errors to avoid "abort, retry, ...". I have a version of access() for MS C (written using MASM 5.1) that performs the needed function (no pun intended 8-). You would need to write a very simple program that a BAT program would call. The program would use exit(0) if the drive is OK, else exit(1) (or anything other than zero). For a free copy of my access() function, mail a note to: {uwvax, rutgers} uwmcsd1!lakesys!deanr YOU MUST USE THE ADDRESS GIVEN ABOVE, not the address from which this message was sent. =================opinion by: Dean A. Roth====================== {rutgers, uwvax} uwmcsd1!lakesys!deanr -or- deanr@lakesys.UUCP P.O. Box 11095 Milwaukee, WI 53211 =================representing Dean A. Roth=====================