VBScript » FileSystemObject » DriveExists

Version: 2.0

Syntax:
object.DriveExists(drive)

This method lets us check if a specified drive exists. It returns True if the drive does exist and False if it doesn't.

Note that with removable media drives the DriveExists method always returns a True value. When accessing this type of drive, use the IsReady method to determine the drive's status.

Examples

Code:
<%
dim filesys
Set filesys = CreateObject("Scripting.FileSystemObject")
If filesys.DriveExists(drive) Then 
   Response.Write("The specified drive does exist.")
End If
%>
Output:
"The specified drive does exist"

See Also: