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.
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.
Procedure:
Step 1 : Open a new text document
Step 2 : Paste the code below and save it with the extension “.bat” (eg : threat.bat)
cls
:End
@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%==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
:FAIL
echo Invalid password
goto end
:MDLOCKER
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
Pingback: How to Configure WiFi Hotspot in Windows 7 Using Command Prompt | Durofy