There are many security tools out there that to protect files and folders. There are programs that can put your files in a hidden vault or even password protect them. But doing any of these requires you to install some third party software!!

So let's look at a simple trick that will allow you to completely protect a file by making it un-readable, un-deletable and un-renamable.

Make a file un-readable, un-deletable and un-renamable.

Let's say you have a file "D:\personal.txt" which you want to protect. Here's what you do - open up a command prompt, go to the folder D: and run the following commands-

copy personal.txt \\.\D:\con.txt
del personal.txt

We have actually renamed our file to "con.txt". Now try deleting, renaming or opening "con.txt" using the file browser. Windows will just throw you a "Could not find this item" or "File not found" message. The file is simply UN-touchable :)

And whenever you want the original file back, just do -

ren \\.\D:\con.txt personal.txt

And you have your "personal.txt" back in-tact as it was earlier. Puzzled? Here's an explanation of this little trick -

Windows and it's sacred keys!

You might know that windows doesn't allow certain characters when naming files. To be specific -

<, >, :, ", \, /, |, ?, and *

And apart from this, there are some sacred names as well which are not allowed. They are -

CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9

Just try renaming any file or directory to any of these names (plus any extension) from the file explorer and you will find windows throwing you a "Not possible" message. These names are reserved for OS internal files and hence windows limits operations like editing, viewing or deleting of files having these names.

But it does allow making files with these names using special commands from the command prompt solely for developers and debugging. We just used this loophole to rename our file to a sacred name making it indestructible at a user level.

The trick applies equally to directories as well. But if you rename a directory the files inside will still be readable, renameable and deletable. Only the directory itself would have all the protections!