Open In App

ASP DriveExists Method

Last Updated : 23 Feb, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

The ASP DriveExists Method is used for returning the Boolean Value which indicates that whether the particular drive will be exits or not. It returns true means the particular drive exits or returns false if the particular drive not exits. 

Syntax 

FileSystemObject.DriveExists(drive) 

Parameter Values 

  • drive: It is a required attribute. It specifies a drive letter or a complete path specification.

Example: Below example demonstrates the DriveExists Method.

ASP




<%
dim gfg
set gfg=Server.CreateObject("Scripting.FileSystemObject")
if gfg.DriveExists("d:")=true then
 response.write("Drive d: exists!")
else
 response.write("Drive d: does not exist.")
end If
set gfg=nothing
%>


Output:

Drive d: exists

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads