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

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

FileExists 方法

如果指定文件存在返回 True ;否則返回 False。

object.FileExists(filespec) 

參數(shù)

object
必選項(xiàng)。應(yīng)為 FileSystemObject 的名稱。
filespec
必選項(xiàng)。需要判定是否存在的文件的名稱. 如果文件可能不在當(dāng)前文件夾中,那么必須提供完整的路徑說(shuō)明(可以是絕對(duì)的或相對(duì)的)。

下面的例子說(shuō)明了 FileExists 方法的用法。

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

請(qǐng)參閱

DriveExists 方法 | FolderExists 方法 | GetFile 方法 | GetFileName 方法
應(yīng)用于:FileSystemObject 對(duì)象