Windows 7 Forums


Windows 7: Read-only File and Folder Attribute


Read-only File and Folder Attribute

How to Set and Unset Read-only Attribute of a File or Folder in Windows
Published 14 Feb 2010
Published by

Featured Tutorial

Chrome GPU Hardware Acceleration - Turn On or Off
Chrome GPU Hardware Acceleration - Turn On or Off

How to Turn GPU "Hardware Acceleration" On or Off in Chrome

Microsoft Account Primary Alias Email Address - Change
Microsoft Account Primary Alias Email Address - Change

How to Change your Microsoft Account Primary Alias Email Address

Clean Reinstall - Factory OEM Windows 7
Clean Reinstall - Factory OEM Windows 7

How to Clean Reinstall a Factory OEM Windows 7

Microsoft Accounts - Link
Microsoft Accounts - Link

How to Link your Microsoft Accounts

Portable OS - Carry your OS on an External Drive
Portable OS - Carry your OS on an External Drive

How to Create a Portable OS on an External Drive

Search - Find More with Filters and Operators
Search - Find More with Filters and Operators

How to Use Windows Search Filters and Operators to get better Search Results in Windows 7
How to Set and Unset Read-only Attribute of a File or Folder in Windows

information   Information
This tutorial will show you how to set or unset files or all files in folders to be read-only or not in Vista, Windows 7, and Windows 8.

In Windows, folders cannot be set as read-only. Only the files in the folders can be.

If You cannot view or change the Read-only or the System attributes of folders in Windows Server 2003, in Windows XP, in Windows Vista or in Windows 7


Note   Note
  • Name:  dot.jpg
Views: 3059
Size:  864 Bytes Read-only box = (Windows 8) Default neutral setting for a folder that is always displayed.
  • Name:  blue_Neutral.jpg
Views: 1195
Size:  869 Bytes Read-only box = (Vista and Windows 7) Default neutral setting that is always displayed. File is not read-only. For a folder, it means all files in the folder not to be set as read-only.
  • Name:  checked.jpg
Views: 3014
Size:  879 Bytes Read-only box = File is read-only. For a folder, it means all files in the folder are set to be read-only when applied. Only displays temporarily while setting it.
  • Name:  empty.jpg
Views: 3014
Size:  878 Bytes Read-only box = File is not read-only, or to set file as not read-only when applied. For a folder, it means all files in the folder are set to be not read-only when applied. Only displays temporarily while setting it.



METHOD ONE
Through the File or Folder Properties Page



OPTION ONE
For a File

NOTE: This option is if you want to select one file to set or unset as read-only.
1. Select one or more files, right click on the file(s), and click/tap on Properties.

2. To Set the File as Read-only
A) In the General tab, click on the Read-only box until checked, and click/tap on OK. (see screenshot below)
Read-only File and Folder Attribute-file2.jpg
3. To Set the File as Not Read-only
A) In the General tab, click on the Read-only box until unchecked, and click/tap on OK. (see screenshot below)
Read-only File and Folder Attribute-file1.jpg



OPTION TWO
For a Folder

NOTE: This option is if you want to have all files in a folder set or unset as read-only.
1. Select one or more folders, then right click on the folder(s), and click/tap on Properties.

2. Click/tap on the General tab. (see screenshot below)
NOTE: When the Read-only box is blue, this is the default undetermined state. It does not mean read-only or not read-only.
Read-only File and Folder Attribute-step1.jpg
3. To Set All Files in a Folder as Read-only
A) Click on the Read-only box until checked, and click on OK. (see screenshot below)
Read-only File and Folder Attribute-step3.jpg
B) Select the option you want, and click/tap on OK. (see screenshot below)
NOTE: You will only be able to select the top option if you selected more than one folder.
Read-only File and Folder Attribute-step3b.jpg
4. To Set All Files in a Folder as Not Read-only
A) Click on the Read-only box until it's empty, and click/tap on OK. (see screenshot below)
Read-only File and Folder Attribute-step2.jpg
B) Select the option you want, and click/tap on OK. (see screenshot below)
NOTE: You will only be able to select the top option if you selected more than one folder.
Read-only File and Folder Attribute-step2b.jpg



OPTION THREE
For Multiple Files and Folders

NOTE: This option is if you want to select multiple files and folders at once to have the files and all files in the folders set or unset as read-only.
1. Select one or more files and/or folders, right click on the file(s), and click/tap on Properties.

2. To Set as Read-only
A) In the General tab, click on the Read-only box until checked, and click/tap on OK. (see screenshot below)
Read-only File and Folder Attribute-file-folder2.jpg
B) Select the option you want, and click/tap on OK. (see screenshot below)
Read-only File and Folder Attribute-file-folder2b.jpg
3. To Set as Not Read-only
A) In the General tab, click on the Read-only box until unchecked, and click/tap on OK. (see screenshot below)
Read-only File and Folder Attribute-file-folder1.jpg
B) Select the option you want, and click/tap on OK. (see screenshot below)
Read-only File and Folder Attribute-file-folder1b.jpg



METHOD TWO
Through a Command Prompt with the ATTRIB Command

NOTE: While you can do this with a non-elevated command prompt or a elevated command prompt, you may get better results using a elevated command prompt if you are logged in as an administrator.



OPTION ONE
For a File

NOTE: This options is if you want to set or unset a file as read-only.
1. Open a non-elevated command prompt or a elevated command prompt.

2. To Set a File as Read-only
A) In the command prompt, type the command below, and press Enter. (see screenshot below)
NOTE: Substitute "Full path of file with file extension" for the actual full path of the file.

Code:
attrib +r "Full path of file with file extension"
FOR EXAMPLE: I would type this command exactly as below for a file named file.txt in a folder on my desktop.

Code:
attrib +r "C:\Users\UserName\Desktop\Folder\File.txt"
Read-only File and Folder Attribute-file-set_read-only_command.jpg
3. To Set a File as Not Read-only
A) In the command prompt, type the command below, and press Enter. (see screenshot below)
NOTE: Substitute "Full path of file with file extension" for the actual full path of the file.

Code:
attrib -r "Full path of file with file extension"
FOR EXAMPLE: I would type this command exactly as below for a file named file.txt in a folder on my desktop.

Code:
attrib -r "C:\Users\UserName\Desktop\Folder\File.txt"
Read-only File and Folder Attribute-file-unset_read-only_command.jpg



OPTION TWO
For a Folder

NOTE: This option is if you want to set or unset all files in a folder and it's subfolders as read-only.
1. Open a non-elevated command prompt or an elevated command prompt.

2. To Set All Files in a Folder and subfolders as Read-only
A) In the command prompt, type the command below, and press Enter. (see screenshot below)
NOTE: Substitute Full path of folder for the actual full path of the folder.

Code:
attrib +r "Full path of folder\*.*" /S /D
FOR EXAMPLE: I would type this command exactly as below for a folder on my desktop.

Code:
attrib +r "C:\Users\UserName\Desktop\Folder\*.*" /S /D
Read-only File and Folder Attribute-folder-set_read-only_command.jpg
3. To Set All Files in Folder and subfolders as Not Read-only
A) In the command prompt, type the command below, and press Enter. (see screenshot below)
NOTE: Substitute Full path of folder for the actual full path of the folder.

Code:
attrib -r "Full path of folder\*.*" /S /D
FOR EXAMPLE: I would type this command exactly as below for a folder on my desktop.

Code:
attrib -r "C:\Users\UserName\Desktop\Folder\*.*" /S /D
Read-only File and Folder Attribute-folder-unset_read-only_command.jpg
That's it,
Shawn





Need more help? Try searching our extensive help and support site.
Loading
Comment

 Read-only File and Folder Attribute problems?



Tutorial Tools



Similar help and support threads for: Read-only File and Folder Attribute
Windows 7 Tutorial Category
File and Folder Read only attribute wont disable System Security
Read only attribute stuck on Software
Can't remove 'read-only' attribute from a folder General Discussion
"Read-Only" File Attribute General Discussion
How do I unset the Program folder read-only attribute? General Discussion


All times are GMT -5. The time now is 08:30 PM.


Seven Forums Android App Seven Forums IOS App Follow us on Facebook

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
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32