Open In App

ASP IsReady Property

Improve
Improve
Like Article
Like
Save
Share
Report

The ASP IsReady Property is used to return a boolean value that specifies whether the drive is ready or not. It returns true if the specified drive is ready, otherwise, it returns false.

Syntax:

DriveObject.IsReady

Example: The below code demonstrates the ASP Drive.IsReady Property.  

ASP




<%
dim fs,d,n
set fs=Server.CreateObject("Scripting.FileSystemObject")
    
'Get the drive to be checked
set d=fs.GetDrive("c:")
  
n = "Drive " & d.DriveLetter & " is ready: "
  
'Check if the drive is ready
if d.IsReady=true then
  n=n & "true"
else
  n=n & "false"
end if
  
'Write out the response
Response.Write(n)
  
set d=nothing
set fs=nothing
%>


Output:

Drive C is ready: true

Last Updated : 19 Mar, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads