DIAdem Help

Property: Attributes for Folder

  • Updated2024-09-12
  • 1 minute(s) read

Property: Attributes for Folder

Checks the attributes of a folder.

Object.Attributes
ObjectFolder
Object with this property
Object.AttributesEnumeration with read and write access and the following selection terms:
0NormalFolder without attributes.
1ReadOnlyWrite-protected file. Attribute with read and write access.
2HiddenHidden folder. Attribute with read and write access.
4SystemSystem folder Attribute with read and write access.
8VolumeHard disk name. Attribute with read access.
16Directoryfolder. This attribute is read-only.
32ArchiveChanges were made to the file after the last backup.
Attribute with read and write access.
1024AliasOperator. Attribute with read access.
2048CompressedCompressed file. Attribute with read access.

The following example removes the write-protection of a folder:

Sub MakeWritable(sFolder)
  Dim fso, oMyFolder
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set oMyFolder = fso.GetFolder(sFolder)
  If oMyFolder.Attributes and 1 Then
    oMyFolder.Attributes = oMyFolder.Attributes - 1
  End If
End Sub

Log in to get a better experience