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



Attributes 屬性

設(shè)置或返回文件或文件夾的屬性?勺x寫或只讀(與屬性有關(guān))。

object.Attributes [=newattributes]

參數(shù)

object

必選項(xiàng)。應(yīng)為 FileFolder 對象的名稱。

newattributes

可選項(xiàng)。如果指定此參數(shù),則 newattributes 為指定的 object 的屬性的新值。

設(shè)置

newattributes 參數(shù)可為下列設(shè)置之一或下列設(shè)置的合理組合:
常數(shù)描述
Normal0普通文件。沒有設(shè)置任何屬性。
ReadOnly1只讀文件。可讀寫。
Hidden2隱藏文件?勺x寫。
System4系統(tǒng)文件?勺x寫。
Directory16文件夾或目錄。只讀。
Archive32上次備份后已更改的文件。可讀寫。
Alias1024鏈接或快捷方式。只讀。
Compressed2048壓縮文件。只讀。

說明

忽略對只讀屬性(別名,壓縮或目錄)所作的改變.

當(dāng)設(shè)置屬性時(shí),應(yīng)首先閱讀當(dāng)前屬性,然后按要求改變個(gè)別屬性,最后反寫屬性.

以下代碼舉例說明如何使用 Attributes 屬性:

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 ="清空歸檔位。"
 Else f.attributes =f.attributes + 32 ToggleArchiveBit ="設(shè)置歸檔位。" End IfEnd Function

請參閱

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

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

返回首頁