ASP IsReady property
IsReady property returns the specified drive is ready. Ready is true, is not ready to false.
Note: For removable media drives, and CD-ROM drive, only when inserting the corresponding media access and prepared to accept when, IsReady returns True.
grammar
DriveObject.IsReady
Examples
<%
dim fs,d,n
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("a:")
n = "The " & d.DriveLetter
if d.IsReady=true then
n=n & " drive is ready!"
else
n=n & " drive is not ready!"
end if
Response.Write(n)
set d=nothing
set fs=nothing
%>
输出:
The A drive is not ready!
dim fs,d,n
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("a:")
n = "The " & d.DriveLetter
if d.IsReady=true then
n=n & " drive is ready!"
else
n=n & " drive is not ready!"
end if
Response.Write(n)
set d=nothing
set fs=nothing
%>
输出:
The A drive is not ready!
Complete Drive Object Reference