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

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

Attributes 屬性

設(shè)置或返回文件或文件夾的屬性。根據(jù)不同屬性為讀/寫或只讀。

object.Attributes [= newattributes] 

參數(shù)

object
必選項(xiàng)。應(yīng)為 FileFolder 對(duì)象的名稱。
newattributes
可選項(xiàng)。如果提供了這個(gè)部分,那么 newattributes 將成為指定的 object 的新屬性值。

設(shè)置

newattributes 參數(shù)可以是下列各值或者這些值的任意邏輯組合:

常數(shù) 描述
Normal 0 普通文件。不設(shè)置屬性。
ReadOnly 1 只讀文件。屬性為讀/寫。
Hidden 2 隱藏文件。屬性為讀/寫。
System 4 系統(tǒng)文件。屬性為讀/寫。
Volume 8 磁盤驅(qū)動(dòng)器卷標(biāo)。屬性為只讀。
Directory 16 文件夾或目錄。屬性為只讀。
Archive 32 文件在上次備份后已經(jīng)修改。屬性為讀/寫。
Alias 64 鏈接或者快捷方式。屬性為只讀。
Compressed 128 壓縮文件。屬性為只讀。

說明

下面的代碼通過一個(gè)文件說明了 Attributes 屬性的用法:

[JScript]
function ToggleArchiveBit(filespec)
{
   var fso, f, r, s;
   fso = new ActiveXObject("Scripting.FileSystemObject");
   f = fso.GetFile(filespec)
   if (f.attributes && 32)
   {
      f.attributes = f.attributes - 32;
      s = "Archive bit is cleared.";
   }
   else
   {
      f.attributes = f.attributes + 32;
      s =   "Archive bit is set.";
   }
   return(s);
}
[VBScript]
Function ToggleArchiveBit(filespec)
   Dim fso, f
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.GetFile(filespec)
   If f.attributes and 32 Then
      f.attributes = f.attributes - 32
      ToggleArchiveBit = "Archive bit is cleared."
   Else
      f.attributes = f.attributes + 32
      ToggleArchiveBit = "Archive bit is set."
   End If
End Function

請(qǐng)參閱

DateCreated 屬性 | DateLastAccessed 屬性 | DateLastModified 屬性 | Drive 屬性 | Files 屬性 | IsRootFolder 屬性 | Name 屬性 | ParentFolder 屬性 | Path 屬性 | ShortName 屬性 | ShortPath 屬性 | Size 屬性 | SubFolders 屬性 | Type 屬性

應(yīng)用于:File 對(duì)象 | Folder 對(duì)象