Remove read only attribute of a file from command line

Saturday, September 26, 2009 Leave a Comment

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.

3 comments »

  • Anonymous said:  

    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.

  • Techblogger said:  

    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

  • Leave your response!