# FileSetAttribute()

For the given path, sets the file attributes.

```
FileSetAttribute( file=any, attribute=string );
```

**Returns:** void

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| file | any | Yes | file path *Alias: filePath, source, path* |  |
| attribute | string | Yes | One of the following: - readOnly - normal On Windows, the following additional attributes are supported (ignored on unix) - system - hidden - archive Set the attribute to normal to make a file not read-only and not hidden. |  |

# Usage Notes

Prior to Lucee 6.2, this function didn't always work as expected

# Examples

```cfml
filesetattribute("example.txt","readonly")
```







# Categories

[File handling](../../categories/files.md)