How to password protect folders in windows
Recently, I have been in the mood of sharing old tricks. One of the reasons why is that some of these are so old that some people might not even expect you to use them. Today’s trick is how to password protect your folders in Windows. I learned this trick when I was a teenager and had a lot of stuff to hide (porn included :lol:).
If you have ever had one of those super nosy roommates in college, you can definitely appreciate some privacy on your computer. Whether it be your vacation photos, creative work, porn (again, am not judging) etc privacy is vital.
The most effective way is to hide in plain sight where people will never find it but that takes experience and talent ( a click ,story for another day). The second one is an easy solution that anyone can pull off. All you need is to create a folder, copy your stuff in there and password protect it.
The ritual
How do you do that? Well, the folder creating part is easy. Just navigate to your desired destination, Right-click, choose a new folder and name it whatever you want. For the purposes of this article, we’ll name it Yuki after my imaginary Japanese girlfriend :lol: Create a new text document inside the folder, open the doc and paste the following code:
@ECHO OFF
if EXIST “Control Panel.{21EC2020–3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST Private goto MDPrivate
:CONFIRM
echo Are you sure to lock this folder? (Y/N)
set/p “cho=>”
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Private “Control Panel.{21EC2020–3AEA-1069-A2DD-08002B30309D}”
attrib +h +s “Control Panel.{21EC2020–3AEA-1069-A2DD-08002B30309D}”
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock Your Secure Folder
set/p “pass=>”
if NOT %pass%== chickenmcnuggetsgoto FAIL
attrib -h -s “Control Panel.{21EC2020–3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020–3AEA-1069-A2DD-08002B30309D}” Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDPrivate
md Private
echo Private created successfully
goto End
:End
Edit the Folder’s name and the password (folder name is ‘private and password is ‘chickenmcnuggets’)then save the text document. Your folder is now password protected.
NB: This does not mean that your folder can’t be breached. It is actually super easy to go pastthat password. On the brighter side, your nosy roommate doesn’t know how to do that :-)
Originally published at Decode.