SpartaDOS X Reference Manual |
The Command Processor — Commands |
ATR (Attributes) Command |
Purpose | Sets/clears file attributes in the directory. Replaces the Protect and Unprotect functions from older SpartaDOS versions. |
|||||||||||||
Syntax | ATR [+A|H|P] [-A|H|P] [d:][path]fname[.ext] |
|||||||||||||
Alias | ATTRIB |
|||||||||||||
Type | Internal |
|||||||||||||
Related | DIR |
|||||||||||||
Remarks | SpartaDOS X adds two new attributes to the standard SpartaDOS directory entry
— these are the hidden and archived bits. The old commands PROTECT and
UNPROTECT were used to set or clear the protection bit. With SpartaDOS X, the ATR command replaces the old commands and works with the new attributes.
Although many other commands allow the usage of the "S" (subdirectory) attribute, it is illegal to attempt to change this status bit as it would corrupt the subdirectory integrity. Therefore, ATR does not affect this. Note that although the syntax of the ATR command looks similar to that of the DIRectory or TYPE commands, the attributes here are not the scan mode, but describe the set(+)/clear(-) attributes operation to be performed on the directory entry that matches the given filespec. This means that the scope of the ATR command is all files matching the filespec (including those files which are hidden). The directory entry attributes are as follows:
For example, to set the archived status and clear the protection bit of all ".COM" files, type the command ATR +A -P *.COM For further information about which status bits in the directory entry are affected by these new attributes, refer to the "Technical Information" chapter. |
Previous page |