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.
For example, to remove the Read-only attribute and to set the System attribute for the C:\Test folder, use the following command:
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: