Remove read only attribute of a file from command line

by admin on May 26, 2009

We can clear read-only attribute of a file from command line using attrib command.

attrib -R 

Example:

attrib -R example.doc

The above command will remove read-only attribute for the file example.doc.

{ 5 comments… read them below or add one }

Anonymous November 10, 2009 at 9:31 am

and to see full reference of the command type
attrib /?

frustratingly it won't remove read only from hidden files, and it won't remove hidden from system files OR remove system from hidden files.

so basically if any files have 2 of any attribute, they are stuck lol.

Reply

Techblogger June 26, 2010 at 9:13 am

you can do it the following way

to remove read only from hidden files:

attrib -R +H filename

to remove readonly from system files
attrib -R +S filename

Reply

Techblogger June 26, 2010 at 9:18 am
contrau8 October 27, 2010 at 12:46 am

attrib /?

Reply

haneef August 24, 2012 at 12:40 pm

attrib -R +H +S filename use this command

Reply

Leave a Comment

HTML tags are not allowed.

Previous post:

Next post: