驱动器是否已就绪?

代码:

<!DOCTYPE html>

<html>

<body>

 

<%

dim fs,d,n

set fs=Server.CreateObject("Scripting.FileSystemObject")

set d=fs.GetDrive("c:")

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

%>

 

</body>

</html>

结果:

The C drive is ready.

相关文章