ASP IsReady Property

Definition and Usage

The IsReady property returns whether the specified drive is ready. Ready is true, not ready is false.

Note:For removable media drives and CD-ROM drives, IsReady returns True only when the corresponding media is inserted and ready to accept access.

Syntax:

DriveObject.IsReady

instance

<%
dim fs,d,n
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("a:")
n = "The " & d.DriveLetter
if d.IsReadythen = true
  n=n & " drive is ready!"
else
  n=n & " drive is not ready!"
end if
Response.Write(n)
set d=nothing
set fs=nothing
%>

Output:

The A drive is not ready!