Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using Windows 7 and want to remove readonly from files, I tried all possible method like unchecking the readonly option from properties... using attrib command in CMD and Right-click on "My computer" > Select "Manage" > Under "System Tools" you'll find "Shared Folders" expand and select "Shares"> in here select the Share Name of your data (where the Read Only access is), and double-click it. > click on the tab "Share Permissions" and verify the correct group (individual) has “full control”.

I am still unable to remove it.... Any suggestion?

share|improve this question
    
What went wrong when you tried those things? –  Cody Gray May 5 '12 at 11:06
    
file still remains read only... the read only tab is still checked –  Mohd Wasi Hirekudi May 5 '12 at 11:09
    
possible duplicate of How to delete a file protected by Windows –  Moab May 5 '12 at 15:22
add comment

migrated from stackoverflow.com May 5 '12 at 11:50

This question came from our site for professional and enthusiast programmers.

1 Answer

Type cmd in the Start Menu or in Run and to...

Remove read-only attribute from a file type:

ATTRIB -R "C:\YourFile.ext"

Remove read-only attributes from a folder type:

ATTRIB -R "C:\YourFolder" /D

Remove read-only attributes from a directory tree (and all the files within) type:

ATTRIB -R "C:\YourFolder" /S /D

Otherwise, it may be an ACL issue and being on Windows 7, you'll want to use ICACLS:

ICACLS "C:\YourFileOrFolder" /grant:r %USERNAME%:F

You might need to specify your computer's name:

ICACLS "C:\YourFileOrFolder" /grant:r %COMPUTERNAME%\%USERNAME%:F

And if you need recursion:

ICACLS "C:\YourFileOrFolder" /grant:r %COMPUTERNAME%\%USERNAME%:F /T
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.