Skip to content

GetDskInfo

Purpose

To return the status of a specific drive.

Syntax

GetDskInfo {drive} {status}

Argument Explanation

  • iDrive: The drive for which status is sought. 0 is the current drive. Drive A is 1, Drive B is 2, and so on.
  • iStatus: A variable to receive the Integer value identifying the status of iDrive:
  • DRIVE_NOT_AVAILABLE
  • DRIVE_REMOVABLE
  • DRIVE_FIXED
  • DRIVE_REMOTE

What It Does

GetDskInfo returns the type of the logical disk drive named in the statement. iDrive is identified with integers starting with 0 for the current drive, 1 for the first drive (typically A:), and so on.

  • DRIVE_NOT_AVAILABLE is returned when iDrive is a value greater than the number of drives defined.
  • Diskette, tape, and other removable-media drives return DRIVE_REMOVABLE.
  • Local hard disks return DRIVE_FIXED.
  • Network (bridged, etc.) drives return DRIVE_REMOTE when the user is connected and DRIVE_NOT_AVAILABLE when not.

Example

Integer iDiskType
GetDskInfo 3 iDiskType
If (iDiskType < DRIVE_REMOVABLE) 
    Send Stop_Box "Not Removable Drive" "Exit Now"
Else 
    Send Stop_Box "Removable Drive" "Exit Now"