Command Reference

Set File Attributes

Set the attributes of a file on the user's system.

Action ID: 56
Action Category: File Operations

Settings

File name

File name:

The path and filename of the file whose attributes you want to set.

Attributes:

This section allows you to specify the attributes of the file on the user’s system.

Read-only

-

If selected, the file will have the read-only file attribute set.

System

-

If selected, the file will have the system file attribute set.

Hidden

-

If selected, the file will have the hidden file attribute set.

Archive

-

If selected, the file will have the archive file attribute set.

Return Values

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0

OK

 

1

Failed to set file attributes.

File not found.
<<File name>>

2

Failed to set file attributes.

Failed to set file attributes. [<<System Error Code>>]
<<Font Description>>

Example

In this example, we will set the hidden attribute for our "MyDataFile.dat" data file that was installed on the user's system.

Note: %AppDir% is a built-in variable.

Filename: %AppDir%\MyDataFile.dat
Attributes: Hidden - Checked

 

See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab