How to hide files and folders on Windows 10
When you have a file or folder you want to keep away from prying eyes, use this guide to hide them on Windows 10.
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:
- Open File Explorer.
- Browse to the file or folder to hide on Windows 10.
- Right-click the item and select the Properties option.
- Click the General tab,
- Under the "Attributes" section, check the Hidden option.
- Click the Apply button.
- Select the "Apply changes to this folder, subfolders, and files" option if hiding a folder with files and subfolders.
- Click the OK button.
- 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.
Get the Windows Central Newsletter
All the latest news, reviews, and guides for Windows and Xbox diehards.
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:
- Open Start.
- Search for Command Prompt and click the top result to open the app.
- 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.
- 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.
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:
- Open Start.
- Search for Command Prompt and click the top result to open the app.
- 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.
- 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.
Unhide files and folders
To make files and folders visible again with Command Prompt, use these steps:
- Open Start.
- Search for Command Prompt and click the top result to open the app.
- 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.
- 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.
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:
- Open Start.
- Search for Command Prompt and click the top result to open the app.
- 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.
- Type the following command to remove the hidden attribute from all files and folders inside the folder and press Enter: attrib -h /s /d
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 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.