Skip to main content

SetFileAttr statement (LotusScript Language)

Sets the system attributes of a file.

Syntax

SetFileAttr fileName , attributes

SetAttr is acceptable in place of SetFileAttr.

Elements

fileName

A string expression; you can optionally include a path.

attributes

The attributes to apply to the file, expressed as the sum of any of the following Integer values:

ValueDescriptionConstant
0Normal fileATTR_NORMAL
1Read-onlyATTR_READONLY
2HiddenATTR_HIDDEN
4SystemATTR_SYSTEM
32Changed since last back-upATTR_ARCHIVE

The constants are defined in the file lsconst.lss. Including this file in your script allows you to use constant names instead of the corresponding numeric values**.**

Usage

Do not use SetFileAttr on an open file, unless the file has been opened as read-only.

Example