please dont rip this site

ATTRIB [+/-parms] Modifies the attributes


Parms Function

----- -------------------------------------------------------------------

+R Set READ ONLY attribute for file

-R Set READ/WRITE attribute for file (Normal file) (Default state)

+A Set archive attribute bit for file. This means that the file needs to be

backed up

-A Cancel archive attribute bit for file

/S Process the files in the specified directory and all its subdirectories.

ATTRIB + Specifying the Read-only and Archive Attributes

Allows you to specify a file as read-only or archived, or to

display whether a file has either of these attributes.


PC-DOS 3.0+ (revised in 3.3)

MS-DOS equivalent: ATTRIB (3.0+)




[d:][path] ATTRIB [+R][--R][+A][--A]

[cd:][cpath]cfilename /S


[d:][path] Specifies the drive letter and

path that contain the ATTRIB


+R Sets file to read-only.

--R Removes read-only status.

+A Sets the archive bit for the


--A Turns off the archive bit for

the file.

[cd:][cpath]cfilename Specifies the file whose

attribute you are changing.

/S Instructs DOS to set

attributes for all files in

the subdirectories of the


ATTRIB is used in networks in which multiple users need to

be able to access certain files but not alter them.



BEFORE: Allows read or write access.

AFTER: Sets the file DATA.TXT to read-only.

To view the status of that file (to see whether it has been

marked read-only), enter


DOS returns the line


indicating by the R that the file has been marked read-only.


Invalid path or file name

You specified a name that does not exist. Check the path name and

try again.


To remove the restricted access, enter the command as in


Use the command

ATTRIB --A C:*.* /S

to reset (turn off) the archive bit for all files in all

subdirectories on drive C.


The file name may contain a path and extension, and

wildcards may be used. If you want to use the files with the

BACKUP, RESTORE, and XCOPY commands with the /M option, or the

XCOPY command with the /A option, use the +A option if necessary

to set the archive bit. If the archive bit is not set, files will

not be copied when these commands are used. In PC-DOS version

3.3, you can modify attributes for selected files in a directory

or subdirectory.


[For related topics, press R]


BACKUP Command

COPY Command

DEL (DELETE) and ERASE Commands

DIR Command

PRINT Command

RENAME EN) Command



SHARE Command

TYPE Command

VERIFY Command

XCOPY Command

file: /Techref/dos/command/attrib.htm, 3KB, , updated: 1999/2/20 11:24, local time: 2024/4/13 17:52,

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF=""> dos command attrib</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.

Welcome to!