Saturday, November 21, 2009

Folder Lock Without Any Software

Here is a cool hack by which you can lock and unlock any files and folders on windows without installing any software.

Copy the code provided below exactly (including ** line) and paste it into notepad (start-> run-> Notepad.exe). Save as protect.bat (file->save as) and exit notepad. Double click on protect.bat and you will see a new folder on your desktop called “Locker”. Copy all the files you need to be hidden there. Double click on protect.bat again, and it will ask you if you want to hide the folders, type in y and press Enter. To unhide, double click protect.bat, type in your password and press enter…

That’s it!

Following is the code you’ll need to this stuff,



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 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.
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 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
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End




Important Note- In the above code, edit the line-

if NOT %pass%== type your password here goto FAIL

as

if NOT %pass%== thisIsMyPassword goto FAIL

Update - Check out the following video tutorial that illustrates this trick,


Important Security Note – This is not a good method to secure sensitive data. If you want to keep the data away from the reach of your kid sister, then this can be a good method but it does not provide any security against people with good knowledge of programming. So if you actually want to be sure that no one can ever access the data that you lock, then please use some good software for the purpose. See the softwares section for reviews of some good folder lock softwares.

1 comment:

  1. Hi !
    Its the nice issue !
    Its very much informative ..
    According to my experience i used this site http://www.theunlockspot.com/unlock-your-phone/rs10wp2/ for unlocking the mobile & got superb solution ..
    Its very much safety & secure & i can able to carry it anywhere according to the network i reside ..

    ReplyDelete