How to Create A Password Protected File Folder without Third-party Tools

Posted by Britt Duncan - September 30, 2014

There are some users wonder whether they can find a way to protect their files without using any tools from third-party. The answer is, YES! But, this won’t keep your files from malicious hackers. With some tweaks and settings, you can easily set a password to protect some file folders or even hide them from your kids if you are on the shared machine. But, make sure you avoid making any mistakes during this stage.

file-folder

 

1. Open up the file folder to which you attempt to set password and click a new Text document

new-txt-2

2. Open the document. Copy and paste the following code into the newly-built document:

cls
@ECHO OFF
title Protected
if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST Protected 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 Protected “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 the 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}” Protected
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Protected
echo Protected created successfully
goto End
:End

copy-paste-3

3. Search and locate PASSWORD_GOES_HERE in the text above. Change that part into the password you want to set. After that, save the file and rename it as locker.bat.

save-file-4

4. You then will notice a new file is generated. Then, move on and delete the original text file.

bat-file-5

5. Next, double clicking on the bat file to run it. It will create a folder called Protected. Then, you can put all stuff you try to protect into it. When you have finished, run locker.bat again.

6.Thus, a Command Prompt window pops up and asks if you want to lock the folder, press the “Y” key and hit enter to lock your folder.

make-sure-6

Once you enter Y to proceed, you will see that your Private folder quickly disappears.

What if you want to see the things you have put away? Just run the bat file again and put in the password you set up early before.

enter-password-8

If you enter the same password as you set before, the Protected folder will reappear if you enter the incorrect password the script will just Terminate.

If you forget what password you have set up in the first place, right click on the locker.bat file and choose Edit. You will see the text file opens up again as well as the password!

edit-10

show-files-11

That’s why it’s essential to keep this file in a safe place. Otherwise, anyone can open it and access the password in that way. It’s suggested that you set the .bat file as hidden state and then go to Internet Options to change the settings to hide all protected files.

dont-show-13




The Previous:
The Next:

Comments are closed.




Awards

TESTED:  26 Jun