Everyone has secrets!
And that is why Windows gives us the option to make some files ‘Hidden.’ But they are visible when we select the ‘view hidden files‘ option. So we go for third-party software like ‘Folder Lock,’ and then crack it and put a password on it.
In this post, we will learn about an old technique which is unknown to many of us. We won’t protect our folder with a password, neither will we a program, nor will we use any software.
We will use Command Prompt and with writing a single command which will hide all our files 😉
What we are going to do is, make out folder a ‘System file.’ Windows by default hide all its System files, and even when you select the ‘View hidden files’ option, you won’t see it. Windows does this to protect them because some people do delete files for fun 😀
Anyways to make a folder/file we need to write a simple command in command prompt.
‘ attrib +r +h +s ‘location of file/folder and name’ ‘
Here attrib stands Attribute and ‘-r’ is to make it a read-only file, ‘-h’ is to make it a hidden file and ‘-s’ is to make it System file.
This means we are adding Read Only, Hidden and System File attribute to that folder or file.
Let’s try this out.
- Check your ‘Folder Options’.
XP and Windows 7: Tools –> Folder Options –> View.
Windows 8: View –> Options –> View.
- Untick the option ‘Hide Protected Operating System Files.’
It will show you a message block, Read it and click Ok! - DO NOT TOUCH THE SYSTEM FILES, ONCE THEY ARE VISIBLE.
- Open cmd and write ‘attrib +r +h +s ‘file/folder location and name’
If your folder consists a space in its name, write it in “.
– Suppose you want to hide ‘New Folder 2‘ present in ‘Movies‘ directory of ‘D‘ drive,
attrib +r +h +s “D://Movies/New Folder 2” will be your command.
– Filenames or folder names without spaces should be written as it is, like a folder named ‘Hello.’
attrib +r +h +s Hello.
- To unhide replace ‘+’ with ‘-‘
Note: If you don’t want others to see this, tick ‘Hide Protected Operating System Files‘ and click apply.
But if someone searches for a file, if keywords are matching to the ones in your System Folder, chances are they might show up. To avoid this Untick ‘Include System Directories’ in ‘Search’ tab.