There could be important files on your computer that you might want to protect from other users of the same computer. There are many ways to hide a file or a folder on a pc and It is not a new thing and neither a difficult one.
So here's how to do it
You now have successfully hidden your file or a folder.
As you can see above there are problems with this technique.
Here is what you should do to make it totally invisible even when the option to display Hidden Items is checked.
Shift
key pressed. Right click in the blank areaOpen Command Window Here
attrib filename +h +s
Note: Your files are still accessible if you type the location in the address bar and programs can still acces it
After hiding your item with the
attrib filename +h +s
command. You can now use another command to prevent access to this file. Here's the command
cacls /e /c /d everyone
What it does basically is that it denies 'everyone' from accessing the file, you can either use your user name instead. That will disallow the current user from accessing the item or its contents.
If you want to restore the permissions back use this one.
cacls /e /c /g everyone:f
When you use the first two methods above to hide your files. They will still be accessible to programs or users who know the path to the file. The third and the last method makes sure your files are inaccessible to programs or other users.
Well, the above mentioned ways are just simple tricks to hide your files properly so that no one can see it or access it. It does not guarantee security in any way. If you want to protect your files consider using an encryption program.
I am a Full stack developer and love to build stuffs with code. Metabust is my personal space I created to share my knowledge and experience on a wide range of things and connect with you people, If you're a developer you'll find it useful.