Hide Your Secrets: How to Password-Lock a Folder in Windows 7 with No Additional Software
Today's guide is on creating a password protected folder on Windows 7 without any additional software. Yes, you heard that right. No extra software at all! This guide is intended for beginners. But please note, this method should not be used to store financial or otherwise highly confidential material. It might be a good place to hide a planning document for a family member's birthday party or similar occasion where you need to keep something secret temporarily.
The first thing you should do is go into "Documents" and create a new folder. Name it whatever you like.
When you have done that, double-click on the folder and create a text document. This can be achieved by going into the contextual menu (right-click anywhere inside the folder -> New -> Text Document). Double-click on the text document and paste the following code into it:
title Folder Private
if EXIST "HTG Locker" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
echo Are you sure you want to lock the folder(Y/N)
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
ren Private "HTG Locker"
attrib +h +s "HTG Locker"
echo Folder locked
echo Enter password to unlock folder
if NOT %pass%== PASSWORD_GOES_HERE goto FAIL
attrib -h -s "HTG Locker"
ren "HTG Locker" Private
echo Folder Unlocked successfully
echo Invalid password
echo Private created successfully
The next step is to change the PASSWORD_GOES_HERE text to whatever you'd like your password to be. Don't use an easy-to-guess password.
Now we need to save the text document.
NOTE: The text file must use the .bat extension. Therefore, I have named it locker.bat and saved it as a batch file.
When you have saved your batch file, you will need to delete the text document (.txt).
When you have deleted it, you may now double-click on your batch file. The first time you run the program, it will add a folder titled "Private". This is where you can store your documents to keep away from praying eyes. Go ahead and put some stuff in it now.
Above is a picture of the "Private" folder and "locker.bat".
When you have finished adding your documents to the Private folder, double-click on locker.bat. You will now be prompted whether you wish to lock the document or not. Select "Y" to lock it. When you do this, you will notice that the Private folder quickly disappears.
When you double-click locker again, it will ask you to enter the password.
- This is NOT the place to store confidential information, such as medical records, financial information or passwords. This is not the best place to hide things from an IT professional, but it should work against newbies or people with intermediate computer skills.
Go into Folder Options -> View -> and uncheck "Hide protected operating system files".
However, when they attempt to un-check, it they will get this warning which may make them think twice before disabling it.
Credit: We found this script on many different websites going back years and years and have no idea who made it. If you have proof that you originally wrote the script, please get in contact with us and we will amend the article accordingly.