How to hide files and folders on Windows 10

Windows 10 hide folders
Windows 10 hide folders (Image credit: Future)

It doesn't matter the kind of content you keep on your computer, you'll always have reasons to hide certain files and folders. Perhaps you have important documents and videos that you want to keep under wraps or prevent users from accidentally deleting certain files if you share your PC with others.

For whatever reason, on Windows 10, you can quickly hide a file or folder in two different ways, including using File Explorer or the "attrib" command-line tool with  Command Prompt.

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

How to hide files and folders from File Explorer

To hide files and folders through File Explorer on Windows 10, use these steps:

  1. Open File Explorer.
  2. Browse to the file or folder to hide on Windows 10.
  3. Right-click the item and select the Properties option.

(Image credit: Future)
  1. Click the General tab, 
  2. Under the "Attributes" section, check the Hidden option.
  3. Click the Apply button.

(Image credit: Future)
  1. Select the "Apply changes to this folder, subfolders, and files" option if hiding a folder with files and subfolders.
  2. Click the OK button.

Apply changes to this folder, subfolders and files

(Image credit: Future)
  1. Click the OK button.

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

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 check the "Hidden items" option. Then you can browse your hidden items as you normally do with other content.

(Image credit: Future)

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 from Command Prompt

Alternatively, you can also use Command Prompt to hide files and folders on Windows 10.

To hide files and folders with commands on Windows 10, use these steps:

  1. Open Start.
  2. Search for Command Prompt and click the top result to open the app.
  3. Type the following command to navigate to the items you want to hide and press Enter: cd c:/SECRET-FILES-LOCATION

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

  1. 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.

(Image credit: Future)

After you complete the steps, only the folder will be hidden, but the files and subfolders inside the folder will still be visible to anyone who know the path.

Hide subfolders

If you want to hide a folder with files and subfolders, which you also want to keep hidden, then you'll need to use these steps:

  1. Open Start.
  2. Search for Command Prompt and click the top result to open the app.
  3. Type the following command to navigate inside the hidden folder and press Enter: cd "SECRET-FILES-LOCATION"

In the command, replace "SECRET-FILES-LOCATION" with the name of your hidden folder.

  1. Type the following command to hide all files and folders inside the hidden folder and press Enter: attrib +h /s /d

(Image credit: Future)

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

Unhide files and folders

To make files and folders visible again with Command Prompt, use these steps:

  1. Open Start.
  2. Search for Command Prompt and click the top result to open the app.
  3. Type the following command to navigate to the hidden items location and press Enter: cd "SECRET-FILES-LOCATION"

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

  1. 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.

(Image credit: Future)

Once you complete the steps, the folder will become visible again on Windows 10.

Remove hidden attribute

To remove the hidden attribute for files and subfolders inside of a folder, use these steps:

  1. Open Start.
  2. Search for Command Prompt and click the top result to open the app.
  3. 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.

  1. Type the following command to remove the hidden attribute from all files and folders inside the folder and press Enter: attrib -h /s /d

(Image credit: Future)

Once you complete the steps, the hidden attribute will be removed from any file or subfolder within the location.

More resources

For more helpful articles, coverage, and answers to common questions about Windows 10 or Windows 11, visit the following resources:

Mauro Huculak

Mauro Huculak has been a Windows How-To Expert contributor for WindowsCentral.com for nearly a decade and has over 15 years of experience writing comprehensive guides. He also has an IT background and has achieved different professional certifications from Microsoft, Cisco, VMware, and CompTIA. He has been recognized as a Microsoft MVP for many years.