attrib
Syntax
attrib[+a|-a][+s|-s][+h|-h][+r|-r][file...][directory...]
Description
Displays, sets, or changes the attributes of files or directories.
Options
[+a|-a]
Sets or clears the
archive
attribute.[+s|-s]
Sets or clears the
system
attribute.[+h|-h]
Sets or clears the
hidden
attribute.[+r|-r]
Sets or clears the
read-only
attribute.file...
Specifies the file name. Wildcards are permitted.
directory...
Specifies the directory name. Wildcards are permitted.
Usage
The following four attribute types are supported in the UEFI file system:
Archive—
A
System—
S
Hidden—
H
Read only—
R
If a file is a directory, it is also shown to have the attribute
D
.
If any file in the file list that is specified in the command line does not exist,
attrib
continues processing the remaining files while reporting the error.
If no file or directory is specified, all of the files in the current directory are displayed.
If no attribute is specified, the attributes of the files are displayed.
Examples
To display the attributes of a directory:
fs0:\> attrib fs0:\
attrib: D fs0:\
To display the attributes of all files and subdirectories in the current directory:
fs0:\> attrib *
\attrib: AS fs0:\serial.efi
attrib: DA fs0:\test1
attrib: A HR fs0:\bios.inf
attrib: A fs0:\VerboseHelp.txt
attrib: AS fs0:\IsaBus.efi
To add the
system
attribute to all files with extension
.efi
:
fs0:\> attrib +s *.efi
To remove the
read-only
attribute from all files with extension
.inf
:
fs0:\> attrib -r *.inf
\attrib: A H fs0:\bios.inf