[Windows] Change file/folder attribute with command prompt

attribIn Windows, there’re three file attributes. These are arvhive, hidden, and system. Here, I’m not going to tell you these attributes mean (you can find it on internet), but i will tell you how to change file/folders attributes. Here we go :

  1. Open Command Prompt (Start > Run > Type “cmd”) or from Start Menu
  2. To give attribute to the file, type :

attrib +a <file_path> for archive attibute

attrib +h <file_path> for hidden attibute

attrib +s <file_path> for system attibute

  1. You can also give multiple attributes in one command, for example :

attrib +s +h <file_path>

  1. To give attribute to the folder (and all files/folder inside), add /s /d after <folder_path>, for example :

attrib +s +h <folder_path> /s /d

If you give attribute to the folder without /s /d, the files/folder insisde won’t take effect.


That’s it. Hope it helps 🙂





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 )

Connecting to %s