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.
Windows command line, Windows 7, Windows 8, XP, Server 2003, 2008, Vista
We can clear read-only attribute of a file from command line using attrib command.
Example:
The above command will remove read-only attribute for the file example.doc.
Previous post: Add user to group from command line (CMD)
Next post: How to remove system file attribute
{ 5 comments… read them below or add one }
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.
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
See the below for more info.
Not resetting hidden file
Not resetting system file
attrib /?
attrib -R +H +S filename use this command