Chinmay

Folder Lock without any Software!!!

Many people have wished to lock folders without the use of any alternative software. So, here you go.

Lets Create a Batch file to do the Folder Lock and Unlock.

Open Notepad and copy the below code and save as locker.bat .
Don’t forget to change your password in the code it’s shown the place where to
Type your Password.

Now double click on locker .bat to run(execute) the file.
 
First time start it will create folder with Locker automatically for you.

Place the contents that you want to lock inside the Locker Folder.

Lock the folder:

Run locker.bat .

Are You Sure You Want To Lock The Folder(Y/N)
> Y

Press the enter

Your Folder is Locked Successfully.

After this the folder will be in hidden mode. and you can’t see this folder even if you set Show hidden files and folders at the  Tools -> Folder options.

Unlock the folder:
 
Run the
locker.bat again and give the password

It will show the Locker Folder.
 


Source Code
:

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 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 Password. Please Try Again
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%==Type your Password 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
:End

Security Tips:

  • Don’t open the locker.bat file or Type the Password to open the folder in front of any one.
  • Put it in the C:/ drive  and rename it.


This entry was posted in Technology, Tutorials and tagged , . Bookmark the permalink.