You can hide files if you share a computer and don't want them to be seen, or you can hide files simply to prevent yourself from deleting them. This wikiHow will teach you how to hide files on your PC using the Windows Command Prompt.

Steps

  1. 1
    Press Win. Your Start menu will open.
  2. 2
    Type "Command Prompt." When you open the Start menu and begin typing, you'll automatically perform a search for your keywords.
    Advertisement
  3. 3
    Click the Command Prompt search result. This is listed as an application that you can run.
  4. 4
    Navigate to the files you want to hide. Use cd C:\Users\admin\Desktop\Files as a template and continue the file path until you're in the same folder as the files you want to hide.
    • You can find the file's location by finding it in your File Explorer, right-clicking it, then clicking Properties > Location. Refer to How to Find a File's Path on Windows for more information.
  5. 5
    Enter the following code and press Enter: attrib +h "Secret Files". Replace "Secret Files" with the name of the file you want to hide; you only need quotation marks if you have a space in the file name.
    • If you want to hide the folder and everything with the file, use attrib +h /s /d.
    • To make the files visible again, type attrib -h "Secret Files". Again, change the words "Secret Files" to your files' name. To unhide the entire folders' contents, type attrib -h /s /d[1]
  6. Advertisement

About This Article

Darlene Antonelli, MA
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Darlene Antonelli, MA. Darlene Antonelli is a Technology Writer and Editor for wikiHow. Darlene has experience teaching college courses, writing technology-related articles, and working hands-on in the technology field. She earned an MA in Writing from Rowan University in 2012 and wrote her thesis on online communities and the personalities curated in such communities. This article has been viewed 44,345 times.
How helpful is this?
Co-authors: 3
Updated: August 25, 2022
Views: 44,345
Categories: Command Prompt
Article SummaryX

1. Press the Windows key.
2. Type Command Prompt and click the Command Prompt search result.
3. Navigate to the files you want to hide.
4. Enter attrib +h "Secret Files".

Did this summary help you?
Advertisement