Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP DriveExists Method

ASP DriveExists Method


FileSystemObject Reference Complete FileSystemObject object reference manual


The DriveExists method returns a Boolean value indicating whether the specified drive exists. It returns True if the drive exists, otherwise False.

Syntax

FileSystemObject.DriveExists(drive)

Parameters Description
drive Required. The drive letter or a full path specification.

Example

<%

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

%>


FileSystemObject Reference Complete FileSystemObject object reference manual