Skip to content

dos_attrib

Dale Fugier edited this page Jul 1, 2026 · 1 revision

Returns file attributes, or sets file attributes to the value described by bits.

Syntax

(dos_attrib [filespec [bits]])

Parameters

filespec

The desired file or files. filespec can contain wildcard characters ("*" and "?"). If filespec is not supplied, it is assumed to be ..

bits

A bit-coded integer identifying the desired file attributes to set. Specify more than one file attribute by adding the following bit values:

Value Description
0 (bit 0) Normal
1 (bit 1) Read-only
2 (bit 2) Hidden
4 (bit 3) System
8 (bit 4) Archive

Returns

An association list containing the filenames and the attribute bits if successful.

nil on error.

Example

Command: (dos_attrib "C:\\Program Files\\AutoCAD 2006\\acad.exe")
(("acad.exe" . 8))

Command: (dos_attrib "C:\\Program Files\\AutoCAD 2006\\acad.exe" 1)
(("acad.exe" . 1))

Clone this wiki locally