Friday, August 26, 2011

How to lock a folder without any software (Batch Programming)

Hi in my last post i guide you to create a batch programming to create a locker. This is very cool. You don't need to download any locker softwares. You are going to enjoy this hack.

 In my older post i explain you how to lock folder using command prompt. But in that no password option. But this is going to very cool using password.

Locker 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 Enter password to lock folder or for cancel press N
 set/p "cho=>"
 if %cho%==XXXX 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%==XXXX 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

  • Copy this Code into notepad and replace the XXXX with your password.
  • Save it with .bat extension(for eg: lock.bat).
  • Copy the Batch file to any folder.
  • Now double click the Batch file, It will ask you to enter the Password. Enter the password.
  • Now you can see the Lock folder is created.
  • Place your files into lock folder which you want to protect.
  • Again double click the Batch file, it will ask you enter the password. Enter the password.
  • Now the folder will be Locked.
  • To unlock again double click the Batch file,enter the password.
  • You can see the Lock folder.

 It is very cool to use.

0 comments: