The File Explorer in Windows 10 enables you to hide files and folders. To hide a file or folder, you need to right-click on the file/folder, click Properties and then select the Hidden option. The hidden file/folder won’t show up in the File Explorer as long as the Don’t show hidden files, folders, or drives option is turned on in the Folder Options. In addition to the File Explorer, you can hide files and folders via the Command Prompt as well. You can use the Command Prompt in the event when the Folder Options is not opening or want to hide files and folders without booting into Windows 10. Hide a file via Command Prompt in Windows 10 Here is how to hide files and folders via the Command Prompt in Windows 10. IMPORTANT: When you hide a file or folder using either Command Prompt or File Explorer, the file/folder will be hidden until the Hide hidden files, folders, or drives option is selected in the Folder Options. Anyone who has access to your PC can change this setting to view hidden files and folders. Therefore, if you want to hide or protect crucial files or folders, we advise you to use third-party folder locker software. Complete the given below instructions to hide files and folders via Command Prompt in Windows 10. Step 1: Open the Command Prompt. No need to open it as administrator. Step 2: At the Command Prompt window, type the following command: attrib +h FileOrFolderPath In the above command, replace the FileOrFolderPath with the actual path to the file or folder. For instance, if the path to the file/folder is D:Test, then, you need to type: attrib +h D:Test Press the Enter key to execute the command. Tip: To copy the file or folder path, open up the File Explorer and navigate to the location where the file or folder that you would like to hide is present. Hold down the Shift key, right-click on the file/folder and then click the Copy as path option to copy the file/folder path to the clipboard. To show a hidden file or folder Step 1: At the Command Prompt window, execute the following command: attrib -s -h FileOrFolderPath You might also like to read our how to hide drives using Command Prompt guide.