Skip to content
10/11/2008 / dimarzionist

howto: Set up file read-only attribute from command line

Here is the small quote from Microsoft KB that could help you when you will try to apply file attributes from command line? powershell scripts etc.


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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: