When you have any file or folder you want to keep away from prying eyes, use this guide to hide them using File Explorer or Command Prompt.

No matter what kind of content you keep on your computer, you'll always find reasons to hide certain files and folders. Perhaps you have important documents and videos that you want to keep under wraps, or you simply want to prevent users from accidentally deleting certain files if you're sharing your PC with other people.

For whatever the reason it might be, on Windows 10, you can quickly hide a file or folder in two different ways, including using File Explorer or using the attrib command using Command Prompt.

In this Windows 10 guide, we'll walk you through the easy steps to hide a file and folder on your computer. In addition, you'll learn the steps to access those hidden items as needed.

How to hide files and folders using File Explorer

The easiest way to keep content hidden is using File Explorer.

  1. Open File Explorer.
  2. Navigate to the file or folder you want to hide.
  3. Right-click the item and click on Properties.

  4. On the General tab, under Attributes, check the Hidden option.
  5. Click Apply.

  6. If you're hiding a folder with files and subfolders, make sure to select the Apply changes to this folder, subfolders, and files option.
  7. Click OK.

  8. Click OK again to complete the task.

Once you've completed the steps, the hidden items will not be visible anymore, because by default Windows 10 doesn't show hidden files.

If you want to access your hidden items you'll have to type the complete path to the hidden folder or file you want to open and press Enter. For example: C:\Users\admin\Desktop\Files\Secret Files\Great Secret.txt.

Or you can open File Explorer, click on the View tab and make sure to check the Hidden items option. Then you can browse your hidden items as you would normally do with other content.

At any time, you can make the files and folders visible again by using the same steps mentioned above, but this time on step 4 make sure to clear the Hidden option.

How to hide files and folders using Command Prompt

Alternatively, you can also use Command Prompt to hide files and folders on your computer.

  1. Open Start.
  2. Do a search for Command Prompt and click the result.
  3. Type the following command to navigate to the items you want to hide and press Enter:

    cd C:\Users\admin\Desktop\Files

    In the command replace the path after cd with the path to your file or folder.

  4. Type the following command to hide a folder or file and press Enter:

    attrib +h "Secret Files"

    In the command replace "Secret Files" with the name of your folder or file. Quotation marks are only necessary when there are spaces in the name.

If you're trying to hide a folder with files and subfolders, which you also want to keep hidden, then you'll need to use these steps as well.

  1. While in Command Prompt type the following command to navigate inside the hidden folder and press Enter:

    cd "Secret Files"

    In the command replace "Secret Files" with the name of your hidden folder.

  2. Type the following command to hide all files and folders inside the hidden folder and press Enter:

    attrib +h /s /d

After completing the steps, the items with the hidden attribute will no longer be visible.

Making hidden files and folders visible again

If you change your mind, you can use the following steps to remove the hidden attribute for files and folders.

  1. Open Start.
  2. Do a search for Command Prompt and click the result.
  3. Type the following command to navigate to the hidden items location and press Enter:

    cd C:\Users\admin\Desktop\Files

    In the command replace the path after cd with the path to your file or folder.

  4. Type the following command to make the items visible again and press Enter:

    attrib -h "Secret Files"

    In the command replace "Secret Files" with the name of your folder or file. Quotation marks are only necessary when there are spaces in the name.

In the case you also set the hidden attribute for files and subfolders inside of a folder, then do the following to remove the attribute.

  1. While in Command Prompt type the following command to navigate inside the hidden folder and press Enter:

    cd "Secret Files"

    In the command replace "Secret Files" with the name of your hidden folder.

  2. Type the following command to remove the hidden attribute from all files and folders inside the folder and press Enter:

    attrib -h /s /d

Which method do you prefer to hide files and folders on Windows 10? Tell us in the comments below.

More Windows 10 resources

For more help articles, coverage, and answers on Windows 10, you can visit the following resources: