ASP DriveExists 方法
DriveExists 方法返回指示指定的驅動器是否存在的布爾值。 如果驅動器存在則返回True ,否則返回False。
語法
FileSystemObject.DriveExists(drive)
参数 | 描述 |
---|---|
drive | 必需的。驱动器字母或者完整的路径规定。 |
實例
<%
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
%>
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對象參考手冊