≡ Menu

Remove read only attribute of a file from command line

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… add one
  • Anonymous

    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

    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

  • Techblogger
  • contrau8

    attrib /?

  • haneef

    attrib -R +H +S filename use this command

Leave a Comment