Attrib

Displays or changes file attributes.

This command displays, sets, or removes the read-only, archive, system, and hidden attributes assigned to files or directories.

attrib [+r|-r] [+a|-a] [+s|-s] [+h|-h] [[drive:][path] filename] [/s[/d]]


Parameters

+r

Sets the read-only file attribute.

-r

Clears the read-only file attribute.

+a

Sets the archive file attribute.

-a

Clears the archive file attribute.

+s

Sets the file as a system file.

-s

Clears the system file attribute.

+h

Sets the file as a hidden file.

-h

Clears the hidden file attribute.

[[drive:][path] filename]

Specifies the location and name of the directory, file, or set of files you want to process. You can use wildcard characters (? and *) in the filename parameter to display or change the attributes for a group of files.

/s

Processes matching files in the current directory and all of its subdirectories.

/d

Processes directories.

Windows 2000 Command Reference Main Page

Dir

Copy

Xcopy

Attrib Notes

Attrib Examples

Using wildcard characters