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!
完整的Drive對象參考手冊