Change File or Folder Attributes via Command Line

Change File or Folder Attributes via Command Line

Due to virus activity or corrupted system file windows can change 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.

change file attrib
If Run is not listed in the Start menu you can use ‘windows key + R’ to open the Run dialog box.

    How to use the attrib command:
Remove read only attribute
attrib -r drive:<path><foldername>

Adding read only attribute
attrib +r drive:<path><foldername>

Remove system only attribute
attrib -s drive:<path><foldername>

Adding system only attribute
attrib +s drive:<path><foldername>

Remove hidden only attribute
attrib -h drive:<path><foldername>

Adding hidden only attribute
attrib +h drive:<path><foldername>

If you cannot change the hidden or read-only attributes of a file it could be a system file so you will first need to change the system attribute for that file.

Warning : If you change the attributes of system files you risk your system from getting corrupted.

Related Posts:

  • No Related Posts

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.