Latest web development tutorials

ASP DriveExists method

FileSystemObject Object Reference Complete FileSystemObject Object Reference

DriveExists method returns indicating the existence of a specified drive Boolean value. If the drive exists returns True, otherwise False.

grammar

FileSystemObject.DriveExists(drive)

参数 描述
drive 必需的。驱动器字母或者完整的路径规定。

Examples

<%
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 Object Reference Complete FileSystemObject Object Reference