It's not just a file explorer that can set the properties of your files. The same job can do both Command Prompt for both files and folders.
File Explorer in Windows 10 lets you 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 / envelope it will not appear in the Explorer folder as long as the “Do not show hidden files, folders or drives” option is enabled disk” in the folder options.
In addition to File Explorer, you can also hide files and folders through it Command Prompt. You can use the command line in case the folder options do not open or you want to hide files and folders without restarting in Windows 10. Let's see how:
Note: When you hide a file or folder using either the command prompt or the File Explorer command, the file / folder will be hidden if "Do not show hidden files, folders or drives” in Folder Options. Whoever has access on your computer can change this setting to show hidden files and folders. Therefore, if you want to hide or protect critical files or folders, we recommend using third-party folder hiding software, or if you don't care about them knowing their existence, you can encrypt them.
To hide a file or folder
Step 1: Open the command prompt. You do not need to open it as an administrator. If you do not know how, press Win + X at the same time and select "Command Prompt"
Step 2: In the Command Prompt window, type the following command:
atribut + h “File_or_Folder”
In the above command, replace File_or_Folder with the actual path to the file or folder.
For example, if the path to the file / folder is D: \ Test, then you must type:
attrib +h D:\Test
Press the Enter key to execute the command.
Advice: To copy the path to a file or folder, open File Explorer and navigate to the location of the file or folder that you want to hide. Hold down Shift, right-click on the file / folder, and then click Copy as Path to copy the file / folder path to the clipboard.
To show a hidden file or folder
Step 1: In the Command prompt window, run the following command:
attrib -s -h File_or_Folder
If you want to see how you write the attrib command in the Command Prompt, type the following: attrib /?