Skip to main content

Folder Lock With Notepad

It is easy to lock a folder without software using Notepad with simple code. With this you can copy all important files to this folder and give a password to it. To do this first open a Notepad in a new folder.
And paste the below code in the Notepad

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%==type your password here 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 2: Now enter a password in the above code as shown below

Step 3: save the file as Locker.bat as shown below

Step 4 : Now you can see the locker file in your folder as below

Double click the locker file and it will automatically create a locker folder for you. Here you can copy files to newly created Locker folder. After copying the files to folder again double click the locker file and it will ask you to lock the folder or not? press y for yes and press enter button. Your locker folder will disappear from the folder. 

To Unlock your folder double click the locker file and it will ask you to enter the password. Enter the password as "Lock" and click enter. 

That's it you can lock the folder at any time using above steps.