Compatible with windows 7,Vista,XP,98

There are so many software’s available in markets for encrypting your personal data. In windows we can create a locker without using any locking software’s. Here is the trick

Step 1: Copy the code given below to a text editor (e.g. notepad )

title XTRABITS locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST lockername goto MAKELOCKER
echo Are you sure u want to Lock the folder(Y/N)
set/p "ch=>"
if %ch%==Y goto LOCK
if %ch%==y goto LOCK
if %ch%==n goto END
if %ch%==N goto END
echo Invalid choice.
set/p "j=>"
ren lockername "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
st/p "m=>"
goto End
echo Enter password to Unlock folder
set/p "pass=>"
if NOT %pass%==mypassword goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" lockername
echo Folder Unlocked successfully
set/p "j=>"
goto End
echo Invalid password
set/p "k=>"
goto end
md lockername
echo Locker created successfully
set/p "n=>"
goto End

Step 2 : Replace  lockername in the code with name of the folder you want to create

Step 3 : Replace mypassword  in the code with password you want to put to the locker(use passwords without space or special characters)

Step 4: Save the file as key.bat into the location where you want to create the locker (save directly to a drive and avoid saving inside other folders)


  • Clicking on the file key will create a folder with your locker name if it does not exist.
  • Put your personal data inside the folder and click on the file key to lock it. Now your locker will be hidden and inaccessible to other users
  • To unlock your locker again click on the file key and enter your password

This is a simple locker and does not provide security against people with good knowledge in programming

If you enjoyed this post spend few seconds to like this page. If you have problems with this code leave us a comment

Post a Comment Blogger

  1. Anonymous5.1.12

    good post

  2. its nt working properly ....:(

  3. cmd was executing but the created folder z not protected ,..its opening even protecting with a password