How to hide any folder by CMD in windows

We all need some privacy in our life. Computer is among one of our private gadget, generally we do not tolerate anyone who interrogate with our computer. But sometimes there was no way to keep your computer private,there you have to keep your private files safe from others. Windows has a default option to hide any files or folder, but that is a common way everybody well known about that.

Here is another way to keep your files safe. If someone also well known about this process after that he could not also see your files. Let learn the trick below –

Steps to follow:

  1. First open cmd (Command Prompt):
    1. You can open it from windows Menu > All program > Accessories > cmd (Only Windows 7 or lower)
    2. Press    + R   Button to open run. Then type cmd and hit enter to open cmd.


  1. Check file location:

After that check the file location you want to hide for that you have to go to the file and check your files address bar for exact location.


  1. Commands:

Come back to cmd and type the following commands.

  1. At first you have to go to the home directory in cmd for that type cd..\.. and hit Enter.
  2. Then type the exact command as below and hit Enter.

C:\>attrib file-destination +s +h

Example: Just Imagine there is folder called ‘Myfiles’ in ‘F’ directory for that you have to type below command and hit Enter.

C:\>attrib F:\Myfiles +s +h


  1. Opposite Comand:

When you want your file again then just type the below command and hit Enter.

C:\>attrib file-destination -s -h

Just change the sign ‘+’ to ’-‘, that’s it.

Note: Always remember your folder name with destination. If you forgot your folder name it will be lost forever there is no other option to get it back. So be confident while doing this.

Not only folder you can also hide any particular file with this method for that you have to provide the file extension along with the file name. See the example below

Example: suppose there is a file called ‘enrique.mp3’ in ‘F’ directory. If you want to hide this file there you have to type the following command.

C:\>attrib F:\enrique.mp3 +s +h


If your concept is not clear yet, See the below video for better result.

10 thoughts on “How to hide any folder by CMD in windows

Leave a Reply

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