ASP DriveExistsメソッド


FileSystemObject 对象参考手册FileSystemObject オブジェクトの完全なリファレンス

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


FileSystemObject 对象参考手册FileSystemObject オブジェクトの完全なリファレンス その他の拡張機能