Sunday, 24 July 2016

How to Password Protect your folder in Windows


Many of us want to hide or password-protect a file or folder due to some private and confidential file which we don't want  to share with anyone.

So this tutorial or you can say the trick is for all those who don't know how to password-protect a file or folder in windows.


Protecting a folder with password in windows:

In this trick, I will show you how to password-protect a folder in windows.

Follow my steps:


1. First of all, create a new folder of any name which you want.



2. Open the folder and create a new text document in it.


3. Open the text document by double clicking on it and paste the following code:

cls
@ECHO OFF
title Folder Private
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Are you sure you want to lock the 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 folder
set/p "pass=>"
if NOT %pass%== PASSWORD_GOES_HERE goto 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

4. In the above-given code, Replace PASSWORD_GOES_HERE with the password you want.
For example- 1234



5. Save the document file by clicking on save as. And then save your file with the name " locker.bat ",
and make sure to change Save as type: to All files (*.*)


6. After saving this file, a locker.bat file will appear, click on the locker file. A folder will appear named Private.


7. Then again click on locker.bat file. A command prompt will appear and ask you for wheater you want to lock the folder Y/N. To lock the folder type the letter y and hit enter. The private file will disappear.


8. To open the folder, click on the locker.bat, a popup window will appear asking for your Password you've previously typed replacing PASSWORD_GOES_HERE in the text document.


9. And That's it. You have password protect your folder.




If you like this trick, then subscribe me and follow me.
Thnxx.



Share this

0 Comment to "How to Password Protect your folder in Windows"

Post a Comment