How to HIDE / SHOW files and folders by cmd command on Win 10/8/7

The file manager (File Explorer) on Windows 7/8 / 10 allows you to hide files and folders very easily, and Admin has a very detailed tutorial for You guys, you can review here: How to make hidden files in USB on Win XP, 7,8,10 caused by Virus

Well, hiding files or folders helps you to protect some important documents, in case outsiders use the machine, they will not worry about being lost, or exposed. However, this method only works for those who are less computer savvy, but for those who know a little about the computer, you can still view these hidden files normally.

Return to main content in today's article. In the usual way, to hide a file or any folder, you just need to right-click on the File / Folder => select Properties=> and tick the option Hidden=> and click Apply is done. The items you hide will not be visible at this point until this option is removed.

Picture 1 of How to HIDE / SHOW files and folders by cmd command on Win 10/8/7

And in addition to the above method, you can also use Command Promptto help hide folders, use this way to hide the folder when you cannot open Folder/ File Optionit. Okey, let's find out right away in this article!

1. Hide / show files or folders by command in cmd

+ Step 1: In this article you can use the default Windows Command Prompt, you can quickly open it by pressing the Windows + R=> key combination and enter the keyword cmd=>  and press OK.

Picture 3 of How to HIDE / SHOW files and folders by cmd command on Win 10/8/7

As for me, I will try a Terminalnew version that Microsoft has just released a beta version, MS introduces many new features such as: can enable multiple tabs at the same time, support EMOJI if any, support even Windows Subsytem For Linuxmore.

If you want to experience the same test as me, you can download it Windows Terminal Prevewon the Windows Store using this link. The program will have flat icons like Office 365 icons and interface as shown below.

Picture 5 of How to HIDE / SHOW files and folders by cmd command on Win 10/8/7

+ Step 2: Return to the main problem that is hiding any folder or file.

Then first you need to locate the path of the files and folders you want to hide. View by accessing that folder => and then click on the address bar File Exploreras shown in the picture, if it is a file (File), copy the directory path + the full name of the file:

Picture 7 of How to HIDE / SHOW files and folders by cmd command on Win 10/8/7

+ Step 3: Once you have the path of the folder you need to hide => now you open the window Command Prompt(Step 1) or Windows Terminal Previewlike her on => and right-click the terminal window to Pastethe command Click here (just right click and you can do it)

attrib + h D: b

In the above command, remember to replace D: b with the path of the folder or File that you want to hide it from => and press Enter to execute the command.

Note: You do not need to run the Command Prompt with Administrator rights, because in fact hiding files on Windows is a very small feature, which is also possible for ordinary users.

Picture 9 of How to HIDE / SHOW files and folders by cmd command on Win 10/8/7

+ Step 4: Done, now go back to the folder or partition containing the folder or file that you have just hidden to check again.

Usually we won't see that file anymore, but I'm turning on Windows hidden file display so I will still see that folder, but it will be dimmed a bit.

Picture 11 of How to HIDE / SHOW files and folders by cmd command on Win 10/8/7

2. How to show hidden files / folders with cmd command

Hide File / Folder now, now you want to show hidden files and files, then what?

You can still show that file by the traditional way that is to right click on the hidden file / folder (of course before that you have to turn on the hidden file mode) => select Properties=> then uncheck it. Oh, Hidden filethat's fine.

Or you can follow the way to show hidden files with this command in CMD, enter the following command in the window CMD=> and press Enter.

attrib -s -h D: b

Note: Remember to replace D: b with the path to the file or folder that needs to be restored.

Now check again in File Explorer, you can see bthat the folder you just hidden will appear normally again.

Good luck.

cmd command cmd

ncG1vNJzZmismaXArq3KnmWcp51ktbDDjK2mZqCZmbJuv8eormaemaGytHnAp5tmnp%2Bhsaa%2B0maZsmWTorFur86mpJqmlGK8r3nWoqVmaWBthA%3D%3D