Monday 9 April 2018

How to Password Protect Any Folder Without Any Third Party Software.

How to Password Protect Any Folder Without Any Third Party Software

in our daily work, we usually need to encrypt various files. It’s easy to set password for Office/PDF/archive files. But, some types of files don’t support password encryption. In this case, a good idea is putting the files into one folder and then password protecting the entire folder. Now the problem is how to put password to folder. You might think you couldn’t do without some third party software. Actually, it’s not. You can password protect a folder without any software in Windows.

How to password protect a folder without any software

Some third-party folder encryption software may carry virus and may steal your data. That’s why we’d rather not use any software. Now what we need to do is protecting a folder with a simple Batch script file.

Step 1: Create a new Folder on your Windows desktop or in some other locations.
Step 2: Open the new folder and create a new Text Document.
Step 3: Open the new blank Text document. Copy and paste the following code into the document’s contents.
Notepad: Code to password protect

cls
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u 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 Locker "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%==theinternetwired goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End
Step 4: Click on File -> Save As. Name it locker.bat and select All Files type. Then click on Save to save it as a locker.bat file.
Save as bat file
Step 5: Double click on the locker.bat file to run it. It will immediately create a folder called Private.
Step 6: Put your folders/files you need to password protect into the Private folder. Then double click on the locker.bat file to run it again. This time it will ask if you’re sure you want to lock the folder. Press Y and hit Enter to make sure.
Then you will see that Private folder quickly disappear leaving only the locker.bat file. Now you’ve successfully password protected the folder.

How can you see the password protected folder again?

Now, anyone who wants to open the folder will need to run the locker.bat file and enter the correct password.
Enter password to unlock the folder

What to do if you forget the password

If you forgot your password unable to open the protected folder, take it easy. Just need to right click on the locker.bat file and select Edit. Then you can see the password you set.
Edit