Tuesday, March 13

Password Protect Your Folder Using Notepad

It is very easy to Lock any folder using notepad. To lock any folder just follow following Steps as written in this post below -

 
Copy the Following Code to Notepad

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%==pwd123 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 Lockerecho Locker created successfully
goto End
:End


You can edit this batch file to change the folder name and the password. To change the name of the folder that is created, change the 'Locker'(in bold in the above code) to any another name you choose. Likewise change the ‘pwd123′ (in red in the code) to anything else.
  • Now, save the above file in Note Pad as "Locker.bat" in your computer
  • Now, whenever you will run this it will create a Folder named Locker in which you can store desired files in it and then by again running Locker.bat, you'll be able to Lock the contents.
  • To unlock open Locker.bat again and it will be done!
  • Enjoy!!

No comments:

Post a Comment

Enter your Comment...