ASP IsReady 屬性

IsReady 屬性返回指定驅動器是否就緒。就緒為 true,未就緒為 false。
注意:對於可移動媒體驅動器和 CD-ROM 驅動器,僅當插入相應的媒體並準備接受訪問時,IsReady 返回 True。
語法
DriveObject.IsReady
實例
<%
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!
