Windows Vista Forums

Read-only File and Folder Attribute

  1. #1
    <!-- google_ad_section_start -->Read-only File and Folder Attribute<!-- google_ad_section_end -->

    Read-only File and Folder Attribute
    How to Set and Unset the Read-only File and Folder Attribute in Vista
    Published by Brink is online now
    20 Nov 2007
    Read-only File and Folder Attribute

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

    information   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   Note
    Read-only files cannot be modified. They can only be copied, moved, renamed, or deleted.
    • Read-only box blue = File or folder is not read-only. Default setting.
    • Read-only box checked = File or folder is set as read-only.
    • Read-only box empty = File or folder is currently being set as not read-only.

    warning   Warning





    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)
    Read-only File and Folder Attribute-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
    Read-only File and Folder Attribute-folder_properties2.jpg
    B) Click on OK to confirm changes. (See screenshot below)
    Read-only File and Folder Attribute-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.
    Read-only File and Folder Attribute-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.
    Read-only File and Folder Attribute-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.
    Read-only File and Folder Attribute-file_properties1.jpgRead-only File and Folder Attribute-file_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 Command Prompt with the ATTRIB Command




    OPTION ONE

    For a File

    NOTE: This options is if you want to set or unset a file as read-only.
    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.
    Read-only File and Folder Attribute-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"
    Read-only File and Folder Attribute-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.



    OPTION TWO

    For a Folder

    NOTE: This option is if you want to set or unset all files in a folder as read-only.
    1. Open a elevated command prompt.

    2. To Set All Files in a Folder 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
    3. To Unset All Files in Folder 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
    That's it,
    Shawn




    Published by


    Brink's Avatar
    Administrator

    Join Date: Apr 2007
    Location: Texas, USA
    Posts: 31,243
    Array

    Tutorial Tools


    Applies to

    All Vista Versions
    64 Bit & 32 Bit


  2.   


  3. #1
    sooner1938's Avatar

    Skilled
    Join Date : Nov 2007
    Posts : 75
    Vista Home Premium 32bit
    Local Time: 08:13 AM

    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

  4.   


  5. #2
    Brink's Avatar

    Administrator


    Join Date : Apr 2007
    Texas, USA
    Posts : 31,243
    64-bit Windows 8.1 Enterprise (RTM)
    Local Time: 09:13 AM
    usa us texas

      Thread Starter

    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

  6. #3
    sooner1938's Avatar

    Skilled
    Join Date : Nov 2007
    Posts : 75
    Vista Home Premium 32bit
    Local Time: 08:13 AM


     

    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

  7. #4
    Brink's Avatar

    Administrator


    Join Date : Apr 2007
    Texas, USA
    Posts : 31,243
    64-bit Windows 8.1 Enterprise (RTM)
    Local Time: 09:13 AM
    usa us texas

      Thread Starter

    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

  8. #5
    Ninja's Avatar

    Junior Member
    Join Date : Dec 2007
    Tuzla, Bosnia and Herzegovina
    Posts : 23
    Vista Business x64
    Local Time: 03:13 PM
    bosnia herzegovina

     

    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

  9. #6
    Brink's Avatar

    Administrator


    Join Date : Apr 2007
    Texas, USA
    Posts : 31,243
    64-bit Windows 8.1 Enterprise (RTM)
    Local Time: 09:13 AM
    usa us texas

      Thread Starter

    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

  10. #7



    Newbie
    Join Date : Jan 2008
    Posts : 1
    Windows Vista Home Premium 32bit
    Local Time: 08:13 AM


     

    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

  11. #8
    Brink's Avatar

    Administrator


    Join Date : Apr 2007
    Texas, USA
    Posts : 31,243
    64-bit Windows 8.1 Enterprise (RTM)
    Local Time: 09:13 AM
    usa us texas

      Thread Starter

    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

  12. #9
    Brink's Avatar

    Administrator


    Join Date : Apr 2007
    Texas, USA
    Posts : 31,243
    64-bit Windows 8.1 Enterprise (RTM)
    Local Time: 09:13 AM
    usa us texas

      Thread Starter

    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

Page 1 of 2 12 LastLast

Read-only File and Folder Attribute
Similar Threads
Tutorial Category
Solved Change Read Only attribute General Discussion
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