July 2000
Intermediate to advanced
492 pages
14h 53m
English
IsReady (Drive Object) —
drvObj
.IsReady
A Boolean value representing whether the current drive is available for reading or writing. Use this property, for example, to determine whether a floppy disk or CD has been placed in a drive. This is a read-only property.
None
<%
' Dimension local variables.
Dim fsoObject ' FileSystemObject
Dim drvObject ' Drive Object
' Instantiate the FileSystemObject variable.
Set fsoObject = Server.CreateObject(
"Scripting.FileSystemObject")
' Using the GetDrive method of fsoObject, initialize a
' Drive object.
Set drvObject = fsoObject.GetDrive("\\PublicDocs")
' Check to see if the drive is ready.
If drvObject.IsReady Then
' Drive is ready for read/write.
Else
' Drive is not ready.
End If
. . . [additional code]
%>It is a good idea to use the IsReady property before attempting to do any drive access. It can be used to determine the readiness of removable-media drives (floppy and CD-ROM drives) and fixed-media drives.
Read now
Unlock full access