Explore Now!

How To Lock Your Private Folder (Windows 7) : Simple Guide

Step # 1-Create a new text document

First of all,

⇒ Create a new folder and name it whatever you would like.

⇒ Open the folder and create a text document.

Step # 2–Paste the code in the file

⇒ Once the text document is created,

⇒  Open the text file you just created by double-clicking it and copy/paste in the following text:

Code :-

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)
set/p “cho=(more than)”
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
goto End
echo Enter password to unlock folder
set/p “pass=(more than)”
attrib -h -s “HTG Locker”
ren “HTG Locker” Private
echo Folder Unlocked successfully
goto End
echo Invalid password
goto end
md Private
echo Private created successfully
goto End

Step # 3 –Rename the text document

⇒ In the above code, replace the key PASSWORD_GOES_HERE with the password you want to use to unlock the folder. For example if you want the password to be 123456, the line should look like:

if NOT %pass%== 123456 goto FAIL

⇒ After you set the password to folder in Windows 7 save the file and close it. Rename the document to “locker.bat“. Make sure it does not include “.txt”.

⇒ So now your Complete File Name will be locker.bat. To do this, make sure to change the Save as type: to All Files (*.*).

⇒ Double click the locker.bat file and there will now be a new folder named Private where you can Put your Content

Step # 4 –Enter password

⇒ This time you will be asked if you want to lock the folder, press the “y” key and then hit “enter”.

⇒ The private folder will disappear and if you try to run the batch file again, the password protected folder will ask you for the password.

⇒ To check whether it works, enter an incorrect password and see that it will not open the file. Once the correct password is entered the “private” folder will be accessible.

Checkout The Video Below For Demo


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at

Up ↑

%d bloggers like this: