Saturday, July 7, 2012

LoCk your FOldeR!

        LOCKING YOUR FOLDER WITH A PASSWORD!

If you are a victim of your sibling peeking into your folders without your permission & Wanna protect your data or files from others?Wanna set a password for your folder? Don't worry guys.. there is a solution to all these! You just need to put your hands on keyboard and type some lines of code.Here's the code:

cls
@ECHO OFF
TITLE FOLDER PRIVATE
IF EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
IF NOT EXIST PRIVATE goto MDLOCKER
:CONFIRM
ECHO ARE YOU SURE 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 PRIVATE "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%==your-password goto FAIL
attrib -h-s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" PRIVATE
ECHO FOLDER UNLOCKED SUCCESSFULLY
goto END
:FAIL
ECHO INVALID PASSWORD
goto END
:MDLOCKER
MD PRIVATE
ECHO PRIVATE CREATED SUCCESSFULLY
goto END
:END 

Write this code on notepad and save as .bat file.A file gets created.Then double-click on the bat file a folder named PRIVATE will be created where save those data and stuffs which you wanna lock and then again double-click the fat file, comand prompt screen is displayed as shown below:
 
Type Y or N..if its Y then the folder is locked.The next time when you click the folder it asks for a password.
Type the set password and your folder gets unlocked!
This method can be used for Windows XP,Windows 7 and Vista...so try this and have fun! 
 

No comments:

Post a Comment