How to Hide Files or Folders on PC Using Command Prompt


We all have private files or folders on our computer that we don’t want any other party to have access to. Most users try to right click on files or folders and then change their properties by checking on hidden attribute but the disadvantage of this is that the file or folder can still be access through search and another user can also unhide it. Though some people uses software that hide their files but today, I want to share a simple and easy way to hide the files on your computer using Command Prompt.

With this simple trick, no one will be able to find the file(s) or folder(s) you hide unless they know the folder name. So with this method your files or folders are safe. Make sure you save the name of the folder or file in a private place.

How to Add Files on Your Computer without Using Any Software

First go to your computer C drive and create a new folder with the name JustNaira. To hide JustNaira folder on your computer, follow the steps below:

How to Hide JustNaira Folder on Your Computer

1. Launch your run command by pressing WIN+R on your keyboard.


2. Type cmd and click Ok or press enter on your keyboard.


3. A command prompt will appear, now type attrib +s +h C:\JustNaira the press enter. Note that if the folder or file name as a space in between e.g. Just Naira Folder, then you will write the code as attrib +s +h C:\”Just Naira Folder”


Now check C drive on your computer and you will no longer see JustNaira folder.

How to Un-Hide JustNaira Folder on Your Computer

1. Press WIN+R for the run command box
2. Type cmd and press enter for the command prompt window.
3. Now type “attrib -s -h C:\JustNaira” and press enter.


You will notice the only different between hiding any file(s) or folder(s) is the plus+ and Minus- sign.

If the file or folder you want to hide is in another drive such as D, E, ……., just change the C in the code to the drive letter.

Now create another folder in your computer with your name to try this trick again. Use the comment box below to share your result. You can also share this post with friends to keep their private data safe.

I love sharing my knowledge with others. Feel free to contact me with any questions you may have. Please subscribe to the newsfeed and get updates through email, share this article with friends, or leave a comment below. New users can read about me HERE

Share this on:Share on Facebook0Tweet about this on TwitterShare on Google+1Pin on Pinterest0Share on StumbleUpon0Digg this


  1. kambiaso kelvin says:

    brother your the best

  2. @Whacky Resq, thanks for the awareness.

  3. Whacky Resq says:

    You can use that way with a word with a space in eg “my place” “Jast Naira Cool” etc.
    Just put a ” sign before the first word and another ” behind the last word
    Attrib +s +h “Just Naira Cool”
    Will hide folder with name
    Just Naira Cool
    To unhide it do this
    Attrib -s -h “Just Naira Cool”
    Thhis will unhide it

    Only downfall is if the person know where the folder is they can still see what folders are hiden like that by typing this command
    Dir/w/ah *.*

Tell us what you're thinking...

All comments are moderated.

* Denotes required field.