# File_SetTreeAttributes

> Sets attributes on a directory.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/file-functions/file-settreeattributes/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

Sets attributes on a directory

### Syntax

File_SetTreeAttributes(sDir, iAttribute) As Boolean

### Parameters

#### sDir (String)

Directory name

#### iAttribute (Integer)

Attribute to remove

### Example

**VBScript**

```vb
If bStatus Then bStatus = File_SetTreeAttributes("C:\CapaInstaller", FILE_READONLY)
```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[File_RemoveFileAttributes](/capainstaller/vb-scripting-library/file-functions/file-removefileattributes/) [File_SetFileAttributes](/capainstaller/vb-scripting-library/file-functions/file-setfileattributes/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
