In File Explorer, when I set a file's attributes to Read-Only, it says "R". But when do this to a folder, it just says "D", no difference. Is this normal? Can it be changed so that the attributes of the folder are shown?
1 Answer
Windows is inconsistent in the setting and display of directory (folder) attributes. As shown below in Windows 10 v. 1803 (OS Build 17134.112):
- The Read-only attribute of a folder can be set using the command-line option
+r. - The Read-only attribute of a folder is displayed in the CMD prompt as
Rmeaning Read-only. - In Windows Explorer,
Attributesare displayed asRD, meaning Read-only and Directory. - Right-clicking on the folder and selecting Properties displays only the
Read-onlyattributes of the folder's contents. - Changing the
Read-onlyattribute in the Properties dialog affects only the folder's contents.
That said, marking the folder Read-only has little utility in Windows. Any files created in the folder have their own attributes rather than that of the parent folder. By changing the Read-only attribute of a folder in the Properties dialog, though, you can choose to make all contained files Read-only.
Also note that Windows seems to blithely ignore the Read-only attribute of a folder, in that any attempt to insert, delete or modify files in that folder is processed without warning.