DriveExists Method |
Description
Returns True if the specified drive exists; False if it does not.
PowerBASIC Syntax
Arguments
Return Value
Boolean. VARIANT_TRUE or VARIANT_FALSE.
Remarks
For drives with removable media, the DriveExists method returns true even if there are no media present. Use the IsReady property of the IDrive interface to determine if a drive is ready.
Example [PowerBASIC]
#INCLUDE "windows.inc" #INCLUDE "scrrun.inc"
DIM fso AS IFileSystem DIM iExists AS INTEGER
' Create an instance of the FileSystemObject fso = NEWCOM "Scripting.FileSystemObject" ' Check if the drive exists iExists = fso.DriveExists(UCODE$("C:"))
|