Windows 10: Some FOLDER objects, eg Documents, have the ReadOnly Attribute set

Discus and support Some FOLDER objects, eg Documents, have the ReadOnly Attribute set in Microsoft Office and 365 to solve the problem; Can anyone shed light on the "ReadOnly" attribute when applied to a FOLDER object? and also Can anyone enumerate all the possible values of the... Discussion in 'Microsoft Office and 365' started by spilly, Nov 17, 2018.

  1. spilly Win User

    Some FOLDER objects, eg Documents, have the ReadOnly Attribute set


    Can anyone shed light on the "ReadOnly" attribute when applied to a FOLDER object? and also
    Can anyone enumerate all the possible values of the Folder.Type property?

    From the code & results below you can see interesting correlations – or absences of same
    e.g. Docs, Pics, Vids etc are Type "System Folder" with a "ReadOnly" bit set
    and Favorites and Dropbox are only Type "File Folder", but also have a "ReadOnly" attribute.

    My Purpose:
    I’m writing some VBA code for occasional use, usually on other peoples' systems, finding lists of folders of interest, starting from some Folder Picker start point and walking the tree. By no means fast, but I’m most at home in Excel.
    I have just studied Brink’s "Search in File Explorer" tutorial, and it may meet (nearly all of) my needs.
    But for the moment, I’d like to understand these Folder properties better
    Thanks



    Code: Sub Show_Folder_Attribs() Dim FSO As FileSystemObject Dim Fldr As Folder, SF As Folder Dim v, i Set FSO = CreateObject("Scripting.FileSystemObject") v = Array("C:\Users", "C:\Users\spill", "D:\Users", "D:\Users\spill") For i = LBound(v) To UBound(v) If i = LBound(v) Then Debug.Print "Tree "; "Attrs", "Type", "Path" Else Debug.Print End If Set Fldr = FSO.GetFolder(v(i)) For Each SF In Fldr.SubFolders If SF.Attributes Mod 2 <> 0 Then _ Debug.Print "Child "; Hex(SF.Attributes), SF.Type, SF.Path Next Next End Sub[/quote] Debug results (only folders w ReadOnly)
    Code: Tree Attrs Type Path Parent 11 File folder C:\Users Child 13 File folder C:\Users\Default Child 11 File folder C:\Users\Public Parent 10 System Folder C:\Users\spill Child 11 File folder C:\Users\spill\3D Objects Child 11 File folder C:\Users\spill\Contacts Child 11 File folder C:\Users\spill\Links Child 11 System Folder C:\Users\spill\Music Child 31 System Folder C:\Users\spill\OneDrive Child 11 File folder C:\Users\spill\Saved Games Child 11 File folder C:\Users\spill\Searches Parent 10 File folder D:\Users Parent 10 File folder D:\Users\Spill Child 11 System Folder D:\Users\Spill\Desktop Child 11 System Folder D:\Users\Spill\Documents Child 11 System Folder D:\Users\Spill\Downloads Child 11 File folder D:\Users\Spill\Dropbox Child 11 File folder D:\Users\Spill\Favorites Child 11 System Folder D:\Users\Spill\Pictures Child 11 System Folder D:\Users\Spill\Videos[/quote]

    :)
     
    spilly, Nov 17, 2018
    #1

  2. Downloads folder is the Documents folder

    Hi Chris,

    Thank you for posting your query on Microsoft Community.

    I suggest you to Restore to Default the folders and document settings and see if it helps.

    Step 1:

    Please follow below steps and check if it helps.

    • Go to Download folder.
    • Right click on the Download Folder and go to Properties.
    • In Properties go to Location tab.
    • In location Tab Click on Restore Default.


    Step 2:

    Please follow below steps and check if it helps.

    • Go to Documents folder.
    • Right click on the Document folder and go to Properties.
    • In Properties go to Location tab.
    • In location Tab Click on Restore Default.
    After performing above steps change the settings as you required and check if it helps.

    Hope these information helps, please get back to us for future support, we’ll be glad to assist you further.

    Thank you.
     
    Prabhavathi Patil, Nov 17, 2018
    #2
  3. Files are now readonly after updating Win7 to 10

    I finally got Win10 update (no notification though - had to use windows update and search manually)

    Updated Window 7 Home Premium to Windows 10 Home - didn't take too long and no errors.

    Then, when I tried to open a file it says it's readonly. I can't modify and save it. I looked at Documents and the whole folder is marked as readonly. I tried changing the attribute to all sub folders/files, but this didn't work.

    What use is upgrading Windows when it marks your files as readonly???
     
    antmck2011, Nov 17, 2018
    #3
  4. Gordie Z Win User

    Some FOLDER objects, eg Documents, have the ReadOnly Attribute set

    What are the default attributes for the Windows 10 "Documents" folder?

    Jessen and Ramesh,

    Thank you for the comments. It sounds like I do need to at least switch to +R. But i'm wondering how we know ONLY "R" is set by default? Is it documented somewhere? Did you run
    attrib "%userprofile%\documents" to see what attributes it reported for "Documents"?

    attrib -S -H +R "%userprofile%\documents" will result in ATTRIB "%userprofile%\documents" returning "R I." Is the "Documents" folder not content indexed by default?

    Jessen, Ramesh, or other Win10 Users,

    Please indulge me and run attrib "%userprofile%\documents" on Win 10 (assuming you haven't modified your "Documents" folder) or provide a link defining the default attributes (including the extended attribute "I") for the "Documents" folder.
    Thank you for working with me on this.

    Gordie_Z
     
    Gordie Z, Nov 17, 2018
    #4
Thema:

Some FOLDER objects, eg Documents, have the ReadOnly Attribute set

Loading...
  1. Some FOLDER objects, eg Documents, have the ReadOnly Attribute set - Similar Threads - FOLDER objects Documents

  2. I cant clear readonly attributes on my nvme

    in Windows 10 Drivers and Hardware
    I cant clear readonly attributes on my nvme: Hi, my nvme stopped working suddenly. After reboot it no longer apeared in boot selection. Then i instaled my old sata ssd, and ive tried to format the nvme. i couldent, ive noticed in the disk administrator that the unit was "read only", so ive tried to clear readonly...
  3. System File Folders Messed Up eg documents, music, video

    in Windows 10 Network and Sharing
    System File Folders Messed Up eg documents, music, video: I recently installed a new SSD on my old computer, and to save space I wanted to move my library/system files over to the old hardrive. I had some success in that I right clicked, went into properties and then was able to move them onto my E drive. I did this for my document...
  4. Readonly Attribute in windows 10 is not getting removed.

    in Windows 10 Network and Sharing
    Readonly Attribute in windows 10 is not getting removed.: Hi, I tried earlier steps discussed by you, Right-click the folder, then select Properties. Go to Security tab, then click Advanced. Click Change to the right of Owner. Enter Users into the box, then click OK. Enable the checkbox Replace owner on sub containers and...
  5. The Persistence of Folder Attributes

    in Windows 10 Customization
    The Persistence of Folder Attributes: [img] I know how to change folder attributes so that's no biggie. I change stupid attributes like #, Title, and Contributing Artists, etc. to more useful ones like Size and Length. [img] [img] However after I've changed all the attribute columns to the ones I want...
  6. "Object reference not set to an instance of an object".

    in Windows 10 Customization
    "Object reference not set to an instance of an object".: Hello, The problem appears in Visual Studio, that when I try to create a new Project, it always drops the message "Object reference not set to an instance of an object". I have uninstalled and installed Visual Studio, multiple times, but the problem appears always. Also, I...
  7. Folder Attribution

    in Windows 10 Network and Sharing
    Folder Attribution: How shall I remove the "Read Only' attribution from a folder / file in Win 10 ? https://answers.microsoft.com/en-us/windows/forum/all/folder-attribution/fa83146a-1157-47ea-9f3e-71fd42f9446c"
  8. 3 objects in Users folder have no location tab

    in Windows 10 Support
    3 objects in Users folder have no location tab: I've created folders on an H: partition (on another HDD) and "moved" where most of my User data will reside, but 3 remain. 3D Objects is still in Users on C: but has no location tab, so I can't point it anywhere. Favorites folder has no location tab and after attempting to...
  9. Documents folder is set to readonly attrib -r returns permission denied

    in Windows 10 Network and Sharing
    Documents folder is set to readonly attrib -r returns permission denied: My C:\Users\Name\Documents folder is set to readonly. I tried attrib -r in an admin command prompt but it always returns permission denied. Any ideas?...
  10. "object reference not set to an instance of an object"

    in Windows 10 Software and Apps
    "object reference not set to an instance of an object": Hi guys, I'm trying to download some you tube songs...I updated to the new version (4.1.509) & I get this message. I did the same with win7 & it worked fine. Can some body please advise? 51766