Change File or Folder Attributes via Command Line

To work around this problem, use the Attrib command at a command prompt (Cmd.exe) to view or to remove the Read-only or the System attributes of folders.
Back to the top
To view or to remove the Read-only or the System attributes of folders in Windows Server 2003 or in Windows XP

1. Click Start, click Run, type cmd, and then press ENTER.
2. To view the syntax for the Attrib command, type attrib \? at the command prompt.

Warning If you remove the Read-only or System attribute from a folder, it may appear as a ordinary folder and some customizations may be lost. For example, Windows customizes the Fonts folder and provides a special folder view that permits you to hide variations, such as bold and italic. It also permits you to change the folder’s view settings in ways that are specific to fonts. If you remove the Read-only and System attributes of the Fonts folder, these customized view settings are not available. For folders that you have customized by using the Customize tab of the folder’s Properties dialog box, the folder icon and other other customizations may be lost when you remove the Read-only attribute.

If a program cannot save files to a folder with the Read-only attribute, such as My Documents, change the Read-only attribute to System by using the Attrib command at a command prompt.

To remove the Read-only attribute and to set the System attribute, use the following command:
attrib -r +s drive:\<path>\<foldername>
For example, to remove the Read-only attribute and to set the System attribute for the C:\Test folder, use the following command:
attrib -r +s c:\test
Be aware that some programs may not operate correctly with folders for which the System attribute and the Read-only attribute are set. Therefore, use the following command to remove these attributes:
attrib -r -s c:\test
Back to the top
To view or to remove the Read-only or the System attributes of folders in Windows Vista

1. Click Start, click Run, type cmd, and then press ENTER..
2. To view the syntax for the Attrib command, type attrib \? at the command prompt.

To remove the Read-only attribute and to set the System attribute, use the following command:
attrib -r +s drive:\<path>\<foldername>
For example, to remove the Read-only attribute and to set the System attribute for the C:\Test folder, use the following command:
attrib -r +s c:\test
Be aware that some programs may not operate correctly with folders for which the System attribute and the Read-only attribute are set. Therefore, use the following command to remove these attributes:
attrib -r -s drive:\<path>\<foldername>
For example, to remove both the Read-only and the System attributes from the C:\Test folder, use the following command:
attrib -r -s c:\test
If the Run command is not listed on the Start menu, do the following:
Click Start, click All Programs, click Accessories, and then click Run.

 

 
This entry was posted in Geek, Microsoft, Windows and tagged , , . Bookmark the permalink.

Leave a Reply