Skip to main content

How to hide files and folders on Windows 10

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.

  1. On the General tab, under Attributes, check the Hidden option.
  2. Click Apply.

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

  1. 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\FilesIn 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\FilesIn 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:

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.

17 Comments
  • Just reminding: this is not a safe way to store/protect files. This is only for cosmetic purposes, like hiding system/temporary files, so that common users don't get lost or start deleting/messing with stuff that they shouldn't.
  • It's also very easy to just change the file explorer options to show all hidden files and folders, so not really a good way to hide stuff from someone who wants to find it
  • Until Microsoft undo everything with a new update and leave you out to dry.
  • lol sounds you've been burned by the Frequent Folders / Recent Files
  • Lol something like that
  • There is even better. You can make it a system file/folder and it will be hidden, even if the "view hidden files" will be checked. The only way where someone will be able to view your hidden system file is if they check the box to view system files, in which a warning will pop up. Most people will freak out and not check it, or won't be able to find those files. Now for the fun part: how to do it:
    attrib +h +s "C:\YourFolderDirectory\YourFile.txt"
  • Agreed this is a great way, especially since the first thing I do in the file explorer is enable hidden files and file name extentions. I tend to take it a step further and encrypt the folder. And its so easy to enable viewing hidden files, its a bit more difficult to enable the viewing of system files (few extra clicks:/ lol)
  • The main purpose of reading this article to unhide the files(behind file) via Cmd Prompt. Anyways, good article ...
  • Make separate non-admin user accounts, one for family/friends, one for "private time". If you use NTFS your private files are not easily accessible and you don't leave any traces in browser history etc.
  • Both methods are cumbersome and not secure...How do you lock a file or folder say with a password in Windows 10? If there is no such thing, Microsoft needs to code it to The OS. MS Excel has that feature, though not enhanced....
  • Locking a folder with a password probably isnt what you want, you most likely would like to encrypt that folder. Veracrypt is an easy solution for that
  • While the command prompt method is top notch, its risky as well. You need to maintain a log of what files and folders you have kept hidden and ofcourse the path. Otherwise, you may lose the files.
  • Not really, its easy to just run a command in PowerShell and find all hidden folders/files. Same thing with System Folders/Files. While having the log would be convienent, unless you hid that too everyone would be able to just go and see all your files anyway. So that is why you probably want encryption on top of this method, since hiding something is essentially security through obscurity, which isn't really that secure at all.  If you wanted the PowerShell commands:  Hidden Files: Get-ChildItem C:\ -force| Where-Object {$_.mode -match "h"} System Files: Get-ChildItem C:\ -force| Where-Object {$_.mode -match "s"}
  • This article needs to link to the one from a few months back about how to remove certain folders from the index
  • You'd be better off having a usb drive plugged in with bitlocker enabled.   Does anyone remember Microsoft Private Folder? xD
  • Or even better: Make a virtual hard drive (e.g. VHD) and BitLock it!
  • I camouflage the name of the file to something that looks like a system file and put it in a directory a sytem file would be in. Then change the file extension to something meaningless. Example winsys11.xlsx changed to winsys11.wtf. The .wtf file can't be opened and only I know its really an excel file. To open, I move it to a commonly used directory rename the file and rename back to .xlsx then open. When done with it, rename back to original, change the extension back to .wtf and move back to the obscure directory. The directory move is to prevent any one seeing where it really is if they look at my excel recent files. File rename is to prevent it being found in system search.