Monday, November 10, 2014

How to create a Password Protected Folder in Windows 7

There are a lot of methods that you can use to create a password protected folder.

One of the simplest method is by using a batch script.

1. First choose or create a new folder that will house your password protected folder.



2. Open the folder and create a new Text document.


3. Open the text file and copy/paste the following text:

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%== ENTER_YOUR_PASSWORD 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
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End

4. In the above code, replace the key ENTER_YOUR_PASSWORD with the password of your choice.
    For example if you want the password to be 123456.

5. Now go ahead and save the file as password.bat.
    Make sure to change the Save as type: to All Files (*.*).


6. Once the file is saved as a batch file, you can delete the original text file.

7. Now double left click on the password.bat file in the folder and this will create a folder named Private.
    This is where you can store all data you want to protect.


8. Once you are finished copying/pasting your data into the Private double left click the password.bat file.
    Now you will be prompted with: “Are you sure you want to lock the folder


9. Press the “Y” key and hit enter to lock your folder.
    You will see that your Private folder quickly disappears.

10.  If you run the script yet again, you will prompted with "Enter password to unlock folder"


       Enter your correct password you set up in step #4. Private folder will reappear for you to access.  
    

No comments:

Post a Comment