Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Forums > Tutorials

Vista - Read-only File and Folder Attribute

Comment
 

Read-only File and Folder Attribute

How to Set and Unset the Read-only File and Folder Attribute in Vista
Published by Brink
11-20-2007

How to Set and Unset the Read-only File and Folder Attribute in Vista


Information
  By default in Vista, folders do not have a read-only attribute. Only files have a read-only attribute. Any changes to the folder's read-only box will only affect the files inside the folder, then the read-only box will default back to blue when you check it again.

This will show you how to set and unset the read-only attribute of a file or folder in Vista.
NOTE
  Read-only files cannot be modified. They can only be copied, moved, renamed, or deleted.
WARNING
 
  • If you copy a read-only file, the copy will not be read-only.
  • It is possible that changing a read-only file can cause a program that relies on the file to stop working properly, so be sure that it's okay to change a read-only file before you proceed.
RELATED LINKS:


METHOD ONE:
Through the File or Folder Properties Page
OPTION ONE:
Through a Folder Properties Page
1. Right click on a folder that you want to make the files inside of it read-only, and click on Properties.
NOTE: The read-only box will always default back to being filled in with blue. A undetermined state of not being read-only. This is not read-only.

2. Click the General tab. (See screenshot below)
folder_properties1.jpg
3. To Set Files in Folder as Read-only -
A) Check the Read-only box and click OK. (See screenshot below)
NOTE: This will only set the read-only attribute for all of the files in this folder and it's subfolders. It does not affect the folder itself. See: Microsoft Help and Support: KB326549
folder_properties2.jpg
B) Click on OK to confirm changes. (See screenshot below)
confirm_set_changes.jpg
4. To Unset Files in the Folder as Read-only -
NOTE: If the folder is a system folder, then you may need to use METHOD TWO below to remove the read-only attribute of the files in the folder instead.
A) Click on the Read-only box until it is blank without the blue square. (See screenshot below)
NOTE: This will unset the read-only attribute for all of the files in this folder and it's subfolders. It does not affect the folder itself.
unset_folder_properties.jpg
B) Click on OK. (See screenshot above)

C) Click on OK to confirm changes. (See screenshot below)
NOTE: If this is a system folder, then you will have to approve the other pop-ups as well.
confirm_unset_changes.jpg
OPTION TWO:
Through a File Properties Page
1. Right click on the file you want to make read-only, and click on Properties.

2. Click on the General tab. (See screenshots below)

3. To Set a File as Read-only -
A) Check the Read-only box. (See right screenshot below step 4)

B) Go to step 5.
4. To Unset a File as Read-only -
NOTE: If this was a system file, then you may need to use METHOD TWO below to remove the read-only attribute instead.
A) Uncheck the Read-only box. (See left screenshot below)
NOTE: To unset read-only for all files in a folder, see step 4 in the above section.
file_properties1.jpgfile_properties2.jpg
5. Click on OK to apply. (See screenshots above)
NOTE: If this is a system file, then you will have to approve the other pop-ups as well.


METHOD TWO:
Through a Elevated Command Prompt
1. Open a elevated command prompt.

2. To Set a File as Read-only -
A) In the command prompt, type attrib +r "Full path of file" and press Enter. (See screenshot below)
NOTE: Substitute "Full path of file" for the actual full path of the file.
For example, attrib +r "C:\Users\Moderator\Desktop\Test.txt"

B) Go to step 4.
cmd-1-copy.jpg
3. To Unset a File as Read-only -
A) In the command prompt, type attrib -r "Full path of file" and press Enter. (See screenshot below)
NOTE: Substitute "Full path of file" for the actual full path of the file.
For example, attrib -r "C:\Users\Moderator\Desktop\Test.txt"
cmd-2-copy.jpg
4. Close the elevated command prompt.

5. You can verify the read-only status of the file using METHOD ONE (Option Two) above.
That's it,
Shawn

Published by
Brink's Avatar
Administrator

Join Date: Apr 2007
Location: Texas, USA
Posts: 25,919
Rep Power: 150
Brink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond repute

Tutorial Tools

Applies to
All Vista Versions
64 Bit & 32 Bit

Old 12-16-2007  
sooner1938


Vista Home Premium 32bit
 
 

Re: Read-only File and Folder Attribute

Got a question, Shawn.

I've wondered and wondered how I can save and print a list of the songs I have in my "Music" folder. Can I do that by designating them as "Read-Only Files" and if I do so, will it adversely affect the music files themselves?

And can I then change the file extension from txt to mp3 or wav?

My System SpecsSystem Spec
Old 12-16-2007  
Brink


Vista x64 Ultimate SP2, Windows 7 Ultimate x64
 
 

Re: Read-only File and Folder Attribute

Hi Sooner1938,

I do not see how setting it to Read-only would affect how you can print, but you will not be able to change the music file with it set as this.

I have changed WMA to WAV with success. I'm not sure about the success with the other formats. TXT would not be a music file, and would not work wen changed to MP3 or WAV.


This will show you how to make a TXT file with a list of your Music file directory in the command prompt. You can then print the TXT in Notepad or Wordpad. See:

How to Save and Print a File and Folder Directory List in Vista

Shawn
My System SpecsSystem Spec
Old 12-16-2007  
sooner1938


Vista Home Premium 32bit
 
 

Re: Read-only File and Folder Attribute

Thanks for the suggestions, Shawn.

I think I'll do it the second way you suggested, since I'm still not comfortable trying anything that involves the directory.
My System SpecsSystem Spec
Old 12-16-2007  
Brink


Vista x64 Ultimate SP2, Windows 7 Ultimate x64
 
 

Re: Read-only File and Folder Attribute

Your welcome Sooner1938,

Ok, that would most likely be the easiet way. I hope it gets you what you wanted.

Shawn
My System SpecsSystem Spec
Old 12-19-2007  
Ninja


Vista Business x64
 
 

Re: Read-only File and Folder Attribute

You can set file and folder attributes more effectively ucing Command Prompt. Type in attrib /? for more help.
My System SpecsSystem Spec
Old 12-19-2007  
Brink


Vista x64 Ultimate SP2, Windows 7 Ultimate x64
 
 

Re: Read-only File and Folder Attribute

Hi Ninja,

I agree. I just wanted to keep it simple for everyone.

This discusses using the attrib command for people that are interested:

PROBLEM: You Cannot View or Change the Read-Only or System Attribute of Folders
See: Microsoft Help and Support: KB326549

Thank you,
Shawn
My System SpecsSystem Spec
Old 01-06-2008  
jku00v


Windows Vista Home Premium 32bit
 
 

Re: Read-only File and Folder Attribute

I have a similar problem: I run Vista home premium 32bit. All new folders I created have read-only blue box and I can't rename them or delete them. Are there any way I can set the default to 'NO BLUE BOX' on ready-only when a new folder is created? In other word, make the default new folder attribute to be r/w/delete/rename/all whatever. After all, it's the folder I created, I want to be able to do any way I want without going thru reseting the attributes. At times, I had to reset many levels of the folder above before a folder can be renamed or deleted. Oh, yes. After the Property==> unccheck the read-only==>Apply changes to folder subfolders files etc.==> Apply==> OK, I had to close the folder one level above of it and re-open to make the the attribute change to take effect. It's annoying to say the least.

Jku00v.
My System SpecsSystem Spec
Old 01-10-2008  
Brink


Vista x64 Ultimate SP2, Windows 7 Ultimate x64
 
 

Re: Read-only File and Folder Attribute

Hi jku00v,

The blue box in the read-only for a folder does not mean it is read-only. A folder in Vista cannot be set as read-only. It will always default back to the blue box. Checking read-only on a folder will only make every file in it read only, not the folder.

Where is the folder located? You may need to temporarily move the folder to the desktop or in a user folder to rename it.

If that does not help, then you can try taking ownership of the folder.

How to Take Ownership of a Item in Vista

Shawn
My System SpecsSystem Spec
Old 02-10-2008  
Brink


Vista x64 Ultimate SP2, Windows 7 Ultimate x64
 
 

Re: Read-only File and Folder Attribute

Updated 2-10-2008 to include METHOD TWO for the ATTRIB command option.

Shawn
My System SpecsSystem Spec
Comment

Tutorial Tools


Similar Threads
Tutorial Category
Change Read-Only Attribute Vista General
i cant change the Read-only attribute of a non-system folder Vista General
Change Picture folder read only attribute Vista General
Re: Can't clear read-only attribute on Temp folder Vista file management
Re: Can't clear read-only attribute on Temp folder Vista file management


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
Tutorial powered by GARS 2.1.8m ©2005-2006

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 33 34 35 36 37 38 39 40 41 42 43 44 45 46