欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

腳本運(yùn)行時(shí)庫  

DriveExists 方法

如果指定的驅(qū)動器存在則返回 True ;如果不存在則返回 False。

object.DriveExists(drivespec) 

參數(shù)

object
必選項(xiàng)。應(yīng)為 FileSystemObject 的名稱。
drivespec
必選項(xiàng)。驅(qū)動器號或完整的路徑說明。

說明

對于可移動媒體的驅(qū)動器, 即使沒有媒體 DriveExists 方法也返回 true?梢允褂 Drive 對象的 IsReady 屬性來決定驅(qū)動器是否就緒。

下面的例子說明了 DriveExists 方法的用法。

[JScript]
function ReportDriveStatus(drv)
{
   var fso, s = "";
   fso = new ActiveXObject("Scripting.FileSystemObject");
   if (fso.DriveExists(drv))
      s += "Drive " + drv + " exists.";
   else 
      s += "Drive " + drv + " doesn't exist.";
   return(s);
}
[VBScript]
Function ReportDriveStatus(drv)
   Dim fso, msg
   Set fso = CreateObject("Scripting.FileSystemObject")
   If fso.DriveExists(drv) Then
      msg = ("Drive " & UCase(drv) & " exists.")
   Else
      msg = ("Drive " & UCase(drv) & " doesn't exist.")
   End If
   ReportDriveStatus = msg
End Function

請參閱

Drive Object | Drives Collection | FileExists 方法 | FolderExists 方法 | GetDrive 方法 | GetDriveName 方法 | IsReady 屬性
應(yīng)用于:FileSystemObject 對象