DriveType Property |
Description
Returns a value indicating the type of a specified drive.
PowerBASIC Syntax
Return Value
LONG. The type of the specified drive.
Example [PowerBASIC]
#INCLUDE "windows.inc" #INCLUDE "scrrun.inc"
DIM fso AS IFileSystem DIM pDrive AS IDrive DIM t AS STRING
' Create an instance of the FileSystemObject fso = NEWCOM "Scripting.FileSystemObject" ' Get a reference to the IDrive interface pDrive = fso.GetDrive(UCODE$("C:")) ' Get and display the drive type SELECT CASE pDrive.DriveType CASE 0 : t = "Unknown" CASE 1 : t = "Removable" CASE 2 : t = "Fixed" CASE 3 : t = "Network" CASE 4 : t = "CD-ROM" CASE 5 : t = "RAM Disk" END TYPE
|