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.
And in addition to the above method, you can also use Command Prompt
to help hide folders, use this way to hide the folder when you cannot open Folder/ File Option
it. 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
.
As for me, I will try a Terminal
new 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 Linux
more.
If you want to experience the same test as me, you can download it Windows Terminal Prevew
on the Windows Store using this link. The program will have flat icons like Office 365 icons and interface as shown below.
+ 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 Explorer
as shown in the picture, if it is a file (File), copy the directory path + the full name of the file:
+ 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 Preview
like her on => and right-click the terminal window to Paste
the 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.
+ 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.
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 file
that'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 b
that the folder you just hidden will appear normally again.
Good luck.
You should read it
- Ftype command in Windows
- Tail command in Linux
- The Fsutil file in Windows
- How to use Isof command on Linux
- The Cat command in Linux
- How to change the file's attributes using the Attrib command
- Fsutil command in Windows
- Setlocal command in Windows
- Rem command in Windows
- Set command in Windows
- 10 useful commands in Windows you should know
- How to Delete a File Using Command Prompt
Maybe you are interested
9 ways to fix the error of not being able to save files as JPEG or PNG in Photoshop
Download standard and beautiful Word file experience initiative cover template
How to use the file search command on Windows, find saved files
How to split sheet into multiple separate Excel files
How to merge PDF files, merge and join multiple PDF files into a single file
How to clean up iPhone junk, delete junk files to free up iPhone storage