当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP DriveExists 方法
The DriveExists method returns a Boolean value that indicates whether a specified drive exists. It returns True if the drive exists and False if not.
DriveExists返回的是一个逻辑值(Boolean),用它来确定指定的驱动器是否存在。如是True真,则表示存在;如是:False假,则表示不存在。
FileSystemObject.DriveExists(drive) |
| Parameter参数 | Description描述 |
|---|---|
| drive | Required. A drive letter or a complete path specification 必要组件。设定驱动的字母或一个绝对路径 |
<%
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
%> |
评论 (0) All