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("드라이브 c: 존재합니다!")
else
  response.write("드라이브 c: 존재하지 않음.")
If 끝
fs=nothing 설정
%>