remove read only attribute from several hundred directory folders (not files) in windows 10

Anonymous
2019-05-16T17:31:53+00:00

I want to remove the read only attribute for several hundred Directory Folders (not files) in my folder "Y:- MY MUSIC- ALL MY MUSIC"

There are several thousand individual files in that folder all of which I have no problem changing the read only attribute, but nothing I have tried removes any of the Directory Folder's read only attribute.

None of the following removed the read only attribute from the Directories using administrative command prompt...

attrib -r "Y:- MY MUSIC- ALL MY MUSIC\*" /s /d            removes read only from files but not directories

attrib -r "Y:- MY MUSIC- ALL MY MUSIC" /s /d

Right clicking "Y:- MY MUSIC- ALL MY MUSIC" and selecting Properties then unchecking read-only then clicking Apply then selecting Apply changes to this folder, subfolders and files only Changes the individual Files not their Directory Folders (subfolders)

Thank you for any help on this.

Windows for home | Windows 10 | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

7 answers

Sort by: Most helpful
  1. Anonymous
    2019-05-16T17:47:23+00:00

    Hi JWINFL

    My name is Andre Da Costa; an Independent Consultant, Windows Insider MVP and Windows & Devices for IT MVP. I'm here to help you with your problem.

    What I would do is navigate to the directory

    Open Start, type: CMD

    Right click CMD

    Click Run as administrator

    Navigate to the directory containing all the folders.

    Example, type: CD Y:- MY MUSIC- ALL MY MUSIC\

    Hit Enter

    At the prompt type: attrib *.* -h -s /s /d

    Hit Enter

    Exit then restart

    You can also take ownership of the folder.

    takeown /F Y:- MY MUSIC- ALL MY MUSIC\* /R /A

    and hit Enter.

    Next, in the command prompt, type

    cacls Y:- MY MUSIC- ALL MY MUSIC\*.* /T /grant administrators:F

    Hit Enter.

    0 comments No comments
  2. Anonymous
    2019-05-16T17:57:17+00:00

    Have you considered using PowerShell for this?

    Here is a link, to a similar question, using PowerShell (I don't think this link answers your question, but it might point you in the right direction).

    https://stackoverflow.com/questions/47159963/how-to-remove-read-only-attribute-of-a-folder-by-powershell

    Also, if you do decide to use PowerShell for a possible solution to your question, there are several PowerShell web forums out there, where you might be able to redirect your question.

    Here is a link that might help, if you want to go that direction:

    https://docs.microsoft.com/en-us/powershell/#pivot=main&panel=community

    0 comments No comments
  3. Anonymous
    2019-05-17T01:02:19+00:00

    How are you determining that the read-only attribute is set on the directory? If you're worried about the gray sqare in the Properties dialog, you're wasting your time --- it's not a status indicator:

    Also, the read-only attribute on a directory doesn't interfere with file operations, it tells Windows to process the desktop.ini file.

    Add the 'Attributes' column to a Details view to see if a folder has its read-only attribute set:

    If you need to, execute this PowerShell from the top-level folder:

    gci -directory -recurse | %{ $_.Attributes -= 'ReadOnly' }

    Keith

    0 comments No comments
  4. Anonymous
    2019-05-17T11:10:03+00:00

    Hi JWINFL

    My name is Andre Da Costa; an Independent Consultant, Windows Insider MVP and Windows & Devices for IT MVP. I'm here to help you with your problem.

    What I would do is navigate to the directory

    Open Start, type: CMD

    Right click CMD

    Click Run as administrator

    Navigate to the directory containing all the folders.

    Example, type: CD Y:- MY MUSIC- ALL MY MUSIC\

    Hit Enter

    At the prompt type: attrib *.* -h -s /s /d

    Hit Enter

    Exit then restart

    You can also take ownership of the folder.

    takeown /F Y:- MY MUSIC- ALL MY MUSIC\* /R /A

    and hit Enter.

    Next, in the command prompt, type

    cacls Y:- MY MUSIC- ALL MY MUSIC\*.* /T /grant administrators:F

    Hit Enter.

    Thank you for your reply.

    Your Example, type: CD Y:- MY MUSIC- ALL MY MUSIC\ 

    THE ABOVE DOES NOT WORK

    I had to change partitions by typing    Y:    at the command prompt first then pressing enter then  typing     CD - MY MUSIC- ALL MY MUSIC     then pressing enter.

    FYI,   attrib *.* -h -s /s /d     did NOT change the folder's Properties Read-only check box, but since I can delete the folder it is obviously not read-only, yet another Microsoft unfixed bug that has been around for years!

    Thanks to Keith A. Miller's post for pointing this out.  I had forgotten about this bug as I ran into this exact same problem many years ago.

    0 comments No comments
  5. Anonymous
    2019-05-17T11:16:44+00:00

    How are you determining that the read-only attribute is set on the directory? If you're worried about the gray sqare in the Properties dialog, you're wasting your time --- it's not a status indicator:

    Also, the read-only attribute on a directory doesn't interfere with file operations, it tells Windows to process the desktop.ini file.

    Add the 'Attributes' column to a Details view to see if a folder has its read-only attribute set:

    If you need to, execute this PowerShell from the top-level folder:

    gci -directory -recurse | %{ $_.Attributes -= 'ReadOnly' }

    Keith

    Thank you for your reply.

    I had forgotten about the read only box staying checked, this bug should be fixed, as I ran into this exact same problem many years ago.

    Since I can delete the read-only folders they are obviously not read-only.

    Thanks again.

    0 comments No comments