Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!elroy.jpl.nasa.gov!lll-winken!uunet!mcsun!hp4nl!dutrun!duteca4!kooijman From: kooijman@duteca (Richard Kooijman) Newsgroups: comp.os.msdos.programmer Subject: 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: <1085@duteca4.UUCP> Date: 19 Oct 90 12:06:24 GMT Organization: Delft University of Technology, Netherlands Lines: 19 How do you find out what the actual number of drives is on a MS-DOS computer? I have programmed a utility like NCD. It searches all disks on the computer to build a database of directories. Later this database can be used to switch quickly to another directory. The problem is that I haven't found a descent way to search all drives. I program in Turbo C and I have used setdisk(drive) which returns the number of logical drives. On my system (40Mb harddisk with 2 partitions C: & D: and NO ramdisk) it returns 5, so it includes a drive E:. I know I can set LASTDRIVE=D: in my CONFIG.SYS, but I don't want to do that. Later I tried the function biosequip(), but it returns the number of physical drives, in my case 3 (A: B: C: or \x00, \x01, \x80 actually). I have the utility working by just trying to get the current directory of the drives, and when this fails it stops, starting at drive C: of course. Who knows a better way, thanks in advance. Richard.