🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2726

Re: Number of drives on system, how do you find out the ...

#2726
From: Marshall Sutherland
Date: Fri, 19 Oct 1990 17:49
24 lines
2038 bytes
In article <1085@duteca4.UUCP>, kooijman@duteca (Richard Kooijman) writes...
>How do you find out what the actual number of drives is on a MS-DOS computer?

The best way I have found so far is to use setdisk() and then use getdisk()
to see if it was successful (if you try to go to drive D, but find you are
still on drive C, then there isnt a drive D).

However, this still has problems.  My most common problem with it is
getting the infamous Abort, Retry, Ignore when i had an external floppy
D drive with no disk in it (although, I'm sure there is a way to suppress
that).  Other possible problems (which had never occured to me until
writing this) are how to treat SUBSTed drives.  Since I would start at
C and go until it failed, I assume that if you had SUBSTed drives
which were labeled to follow immediately after your real drives, they
would get counted, while those that arent contiguous would not.  Whether
you want to count these as drives or not depends on your application.

Well, having nearly totally undermined my method, I too, would be
interested in seeing a better method, :)

-----
Marshall Sutherland, Partner/Consultant, Digital Magic Computer Consulting
dwatney@pine.circa.ufl.edu, dwatney@ufpine.bitnet
Sysop, Farthinghale Arms BBS, (904) 378-4861
Technical Details
Message-ID: <25000@uflorida.cis.ufl.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!julius.cs.uiuc.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!pine.circa.ufl.edu!dwatney
References: <1085@duteca4.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!julius.cs.uiuc.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!pine.circa.ufl.edu!dwatney
From: dwatney@pine.circa.ufl.edu (Marshall Sutherland)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Number of drives on system, how do you find out the ...
Summary: How do you get the exact number of drives on a system with partition
Keywords: MS-DOS, drives
Message-ID: <25000@uflorida.cis.ufl.EDU>
Date: 19 Oct 90 17:49:34 GMT
References: <1085@duteca4.UUCP>
Sender: news@uflorida.cis.ufl.EDU
Reply-To: dwatney@pine.circa.ufl.edu
Distribution: usa
Organization: University of Florida - pine.circa.ufl.edu
Lines: 24
News-Software: VAX/VMS VNEWS 1.3-4