Property: Attributes for Folder
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Properties > Property: Attributes for Folder
Property: Attributes for Folder
Checks the attributes of a folder.
Object.Attributes
| Object | Folder Object with this property | |||||||||||||||||||||||||||
| Object.Attributes | Enumeration with read and write access and the following selection terms:
|
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