Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: All folders are read-only

22 Feb 2015   #11
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Quote   Quote: Originally Posted by NoelDP View Post
Folders CANNOT be read-only
Careful what you say there. Folders can have the read-only attribute set, though it is impossible for a user to set the read-only attribute on a folder through Windows Explorer.


Higgins, a read-only attribute on a folder does virtually nothing to the folder anyway. Nothing you need to concern yourself with.

From my observations, this blue blob in the properties of a folder is always blue; it has no meaning whatsoever.


The following batch file lists all folders (starting from C:\Users\%username%) that have the read-only attribute set.
Code:
@echo off
setlocal EnableDelayedExpansion
pushd "C:\Users\%USERNAME%"
for /f "delims=" %%I in (' dir /s /b /a:d ') do (
	for /f "delims=" %%G in (' attrib "%%~I" ') do (
		set _=%%G
		echo "!_:~0,13!" | find "R" >NUL && echo %%I
	)
)
popd
pause



My System SpecsSystem Spec
.
22 Feb 2015   #12
NoelDP

Microsoft Community Contributor Award Recipient

Win 7 x64 Home Premium (and x86 VirtualBox VM)/Win10
 
 

Folders DO NOT HAVE a read-only attribute - so it cannot be set.
The only way to deny write access to folders is to specifically exclude write permissions.
My System SpecsSystem Spec
22 Feb 2015   #13
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Folders CAN HAVE a read-only attribute - but it cannot be set through Explorer.
My System SpecsSystem Spec
.

22 Feb 2015   #14
NoelDP

Microsoft Community Contributor Award Recipient

Win 7 x64 Home Premium (and x86 VirtualBox VM)/Win10
 
 

...and it can't be set by command-line either because Windows folders do not have the capability. The flag may be present, but has no effect on the file contents of the folder or the folder itself..
My System SpecsSystem Spec
22 Feb 2015   #15
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Quote   Quote: Originally Posted by NoelDP View Post
...and it can't be set by command-line either because Windows folders do not have the capability.
The command line can indeed set the read-only attribute onto a folder.

Code:
C:\Users\Username\Desktop>md NewFold

C:\Users\Username\Desktop>attrib NewFold
             C:\Users\Username\Desktop\NewFold

C:\Users\Username\Desktop>attrib NewFold +r

C:\Users\Username\Desktop>attrib NewFold
     R       C:\Users\Username\Desktop\NewFold

C:\Users\Username\Desktop>rd NewFold
Access is denied.

C:\Users\Username\Desktop>attrib NewFold -r

C:\Users\Username\Desktop>rd NewFold

C:\Users\Username\Desktop>

Quote   Quote: Originally Posted by NoelDP View Post
The flag may be present, but has no effect on the file contents of the folder or the folder itself.
Yes. The read-only attribute on a folder is generally ignored by Windows. The read-only flag on folders is used for other things.
My System SpecsSystem Spec
22 Feb 2015   #16
logicearth

Windows 10 Pro (x64)
 
 

For folders the read-only attribute is used to give Windows Explorer a hint that a "desktop.ini" file is within the directory and that it should use it. Removing the read-only attribute from a folder like "My Documents" effectively turns off the "desktop.ini" file customization for that folder. Concerning the read-only checkbox in folder properties. If one bothered to read it, it clearly states: "(Only applies to files in folder)" and no matter what you do, the checkbox will always have a solid indicator.
My System SpecsSystem Spec
22 Feb 2015   #17
lehnerus2000

W7 Ultimate SP1, LM18 MATE, W10IP VM, W10 Home, #All 64 bit
 
 

Quote   Quote: Originally Posted by Pyprohly View Post
Quote   Quote: Originally Posted by NoelDP View Post
...and it can't be set by command-line either because Windows folders do not have the capability.
The command line can indeed set the read-only attribute onto a folder.

Code:
C:\Users\Username\Desktop>md NewFold

C:\Users\Username\Desktop>attrib NewFold
             C:\Users\Username\Desktop\NewFold

C:\Users\Username\Desktop>attrib NewFold +r

C:\Users\Username\Desktop>attrib NewFold
     R       C:\Users\Username\Desktop\NewFold

C:\Users\Username\Desktop>rd NewFold
Access is denied.

C:\Users\Username\Desktop>attrib NewFold -r

C:\Users\Username\Desktop>rd NewFold

C:\Users\Username\Desktop>
Agreed.

Once you have set "Read-only" on a folder using the Command Prompt, Windows Explorer will indicate that it is "Read-only" in the Attributes column in Details view.
All folders are read-only-we-showing-folder-read-only.png


My System SpecsSystem Spec
22 Feb 2015   #18
NoelDP

Microsoft Community Contributor Award Recipient

Win 7 x64 Home Premium (and x86 VirtualBox VM)/Win10
 
 

..but if you actually test id, the folder is NOT read-only, and it's posdible read and write it without restriction.
My System SpecsSystem Spec
22 Feb 2015   #19
lehnerus2000

W7 Ultimate SP1, LM18 MATE, W10IP VM, W10 Home, #All 64 bit
 
 

Quote   Quote: Originally Posted by NoelDP View Post
..but if you actually test id, the folder is NOT read-only, and it's posdible read and write it without restriction.
That's true for Windows Explorer (which is why I wrote "indicate").
I haven't checked to see if it is true in the Command Prompt.

Pyprohly's code suggests that the Command Prompt behaves differently.

The way Windows 7 handles "Read-only" is one of my biggest gripes.
My System SpecsSystem Spec
22 Feb 2015   #20
Layback Bear

Windows 7 Pro. 64/SP-1
 
 

Is anybody having a problem with a read only folder?
If so can you open the folder and have your way with the files in the folder?

I'm trying to understand what problem is needing fixed and why.
My System SpecsSystem Spec
Reply

 All folders are read-only




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
cannot uncheck folders' read-only attribute
Hi all. I have troubles with the read-only attribute of folders. I create folders and they are read-only by default. When I uncheck the read-only attribute it appears to obay my command but further inspection aftewards reveals that nothing has really happened. I am the owner, I give to...
General Discussion
Read only attribute for folders in properties
I recently tried to attach some photos to an email I was sending, only to discover that when I went through the browse option there was apparently nothing in the folder (which there was when I checked the folder in question) Having dug around I discovered that every folder appears to have read...
Music, Pictures & Video
How come I can't remove read only from folders?
I noticed that under properties of my user name that read only is checked, I am the admin and the only one on my pc. I've unchecked it twice and it applies changes but when I go back in it is checked again? I've tries restarting thr computer but still no luck?
General Discussion
Default folders read only
:DI reset all my default file folders and found them in read only as I did it. Is that normal? I also found Dr Web instead of Saved Games in the name menu start up. . Ever grateful
General Discussion
Folders stuck being Read-Only
My dad recently bought a new computer with Win 7 on it. We took one of the hard drives from the previous computer and installed it on the new computer. However, now all of the documents and folders on the transferred drive are read-only. We uncheck the read-only box and go through all of the...
Software
Folders Resetting to Read Only
Ok, this has been annoying me for a few days now. I have my music which is usually on D inside a folder on E called D. This folder is set to read only, which is shouldn't be. I am the owner of the folder and have removed and added myself a few times and it's gone through the permissions changer on...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 17:13.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App