[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DRIVETYPE()
 Determines the drive type
------------------------------------------------------------------------------
 Syntax

     DRIVETYPE([<cDrive>]) --> nDriveType

 Argument

     <cDrive>   Designates the drive (A, B, C, etc.) for which the type
     is determined.  The default is the current drive.

 Returns

     DRIVETYPE() returns a numeric value for the drive type.  The following
     codes apply:

     Table 7-9:  Drive Type Coding
     ------------------------------------------------------------------------
     Code    Definition
     ------------------------------------------------------------------------
     0       RAM Disk
     1       Floppy Disk (disk change cannot be established by system)
     2       Floppy Disk (disk change can be established by system)
     3       Hard Disk
     ------------------------------------------------------------------------

 Description

     Warning!  Only for AT-class computers.

     This function determines if you are dealing with a floppy drive, a hard
     disk, or a RAM disk.

 Note

     .  Although DRIVETYPE() returns a 0 value for logical DOS
        partitions, RAM floppies, and unavailable drives, you must also
        differentiate with DISKTYPE().  Here, each hard disk partition
        returns a 248 value.  A RAM floppy created with VDISK.SYS behaves
        like a single-sided floppy with eight sectors, which returns a 254
        value.  If there is an unavailable drive, the DISTYPE() returns a
        value of 0.

 Example

     Determine if the drive is a RAM floppy:

     IF DRIVETYPE() == 0 .AND. DISKTYPE() == 254
        ? "Drive " + DISKNAME() + ":  is a RAM-disk!"
     ENDIF


See Also: DISKTYPE() DISKNAME()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson