Password Protect a Folder Without Downloading Any Software


In this post, we look at a way to password-protect folders without downloading any software. All you need to password-protect folders is Notepad.

password protect folders

The steps below allows you to create a .bat file, which, upon execution, pops up command prompt which requests you to enter the password to lock/unlock the folder that contains your important files.


Step 1 : Open a new text document

Step 2 : Paste the code below and save it with the extension “.bat” (eg : threat.bat)

title Folder Locker
if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
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.
ren Locker “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
attrib +h +s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
echo Folder locked
goto End
echo Enter password to Unlock folder
set/p “pass=>”
if NOT %pass%==computer 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
echo Invalid password
goto end
md Locker
echo Locker created successfully
goto End

Step 3 : Double click on the .bat file just created (threat.bat) . The Command prompt opens and prompts to Enter Password to unlock folder.
Type in “computer” as the password and hit enter. The folder is unlocked successfully.

Now you can see a new folder named “Locker” created. This is the folder where you can put in your important files.

Step 4 : After you are done putting your files in “Locker” go back to command prompt and type “Y” and hit enter to lock the folder.

Note: You change the password in line 24 by editing the .bat file. Just replace “computer” with the password you like.


1 Comment

  1. Pingback: How to Configure WiFi Hotspot in Windows 7 Using Command Prompt | Durofy

Leave A Reply