ASP DriveExists 方法

Filesystem 对象参考手册

定义和用法

DriveExists 方法返回指示指定的驱动器是否存在的布尔值。如果驱动器存在则返回 True ,否则,返回 False。

语法:

FileSystemObject.DriveExists(drive)
参数 描述
drive 必需的。驱动器字母或者完整的路径规定。
本在线速查手册由www.w◙◦☼3◙◦☼x◙◦☼u◙◦☼e.com提供,请勿盗用!

实例

<%
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
%>

Filesystem 对象参考手册