ATTRIB

RECENT NEWS

12/18/2015 - Hello! We're excited to announce that Mental Works Computing Software will soon be featuring

12/11/2015 - We're going to announce Dr.Batcher 3.0 Alpha with batch files debugger support soon. If you want to start...

News history...

TESTIMONIALS

Rob van der Woude:
"Mental Works Computing Software has created a nice tool for...

Andrew Jaritsyn:
“I used to write batch files with the help of Notepad, but...

Steve H.:
“This tool helped me to write some batch files in a couple...

More...

ATTRIB

Displays or changes attributes of files and folders.

Syntax:

ATTRIB [+|-attribute] [File(s)] [/s [/d] [/l]]

+Attribute – sets the attribute for specified file or folder.

-Attribute – clears the attribute for specified file or folder.

The list of the available attributes looks the following way:

File(s) – file(s) or folder(s) for which you want to change the attributes. Wildcards (?, *) are supported.

/s – applies attributes to all files in subdirectories.

/d – applies attributes to directories.

/l – applies attributes to the symbolic link instead of its target.

Usage:

Without any attributes specified shows the current attributes of the given file or folder.

For system and hidden files you should first clear this attribute to change any other attributes.

Archive attribute is used by XCOPY and some other commands to find files that have changed recently (for example, since last backup).

Examples:

Clear system and hidden attributes for all files in the folder and subfolders:

ATTRIB -h -s c:\SomeFolder\*.* /s

 

Subscribe batch files programming newsletter (no spam):

Subscribe

Unsubscribe