ASP DriveExists Method

Definition and Usage

The DriveExists method returns a Boolean value indicating whether the specified drive exists. If the drive exists, it returns True; otherwise, it returns False.

Syntax:

FileSystemObject.DriveExists(drive)
parameter description
drive mandatory. The drive letter or the full path is specified.

instance

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