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:

Value

Description

Constant

0

Normal file

ATTR_NORMAL

1

Read-only

ATTR_READONLY

2

Hidden

ATTR_HIDDEN

4

System

ATTR_SYSTEM

32

Changed since last back-up

ATTR_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