Open In App

ASP DriveExists Method

Last Updated : 23 Feb, 2021
Comments
Improve
Suggest changes
Like Article
Like
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


Next Article

Similar Reads