Saturday, October 13, 2007

Lock Folders without any Software


Here the trick how to lock your folders without any software:

  • Open Notepad and copy the below code
  • Change your password in the code it's shown the place where to type your password.
  • Save file as locker.bat
  • Now double click on locker.bat
  • It will create folder with Locker automatically for u. After creation of the Locker folder, place the contents u want to lock inside the Locker Folder and run locker.bat again.


Locker.bat


cls
@echo off
color 9f
title Folder Locker
:option
echo 1.Create folder 2.Lock folder 3.Unlock folder 4.Set password
set/p "option=Please choose option 1-4>"
if %option%==1 goto create
if %option%==2 goto lock
if %option%==3 goto unlock
if %option%==4 goto set
echo Invalid choice
goto option
:create
if exist "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" (echo You already have a locked folder & goto option)
if not exist "Locker" (md Locker & echo Locker created successfully ) Else (echo Locker folder already exist)
if defined mypass (goto option)
echo This is the first time you run this program please enter a
echo password and log off this user and logon again for the
echo password to take effect.
set /p "long=Set your password>"
reg add "hklm\system\currentcontrolset\control\session manager\environment" /v mypass /d %long% /f
cls
echo Password set successfully
goto option
:lock
if exist "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" (echo Folder already locked & goto option)
if not exist "Locker" (echo You need to create a folder first & goto Option)
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder Locked Successfully
goto option
:unlock
set x=1
set /a y=y + x
if %y% GTR 3 goto wait
if exist "Locker" (echo No file to unlock & goto option)
if not exist "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" (echo No file to unlock & goto option)
if not defined mypass (echo You need to set a password & goto option)
set/p "pass=Enter password to unlock folder>"
if not %pass%==%mypass% (echo Invalid password & goto unlock)
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder unlocked successfully
goto option
:set
echo 1.Change password 2.Remove password
set /p "short=Please choose option 1-2>"
if %short%==1 goto reset
if %short%==2 goto remove
:reset
echo You have select to change your password if you do not wish
echo to continue please close the command prompt else enter the
echo old password to continue.
set /p "longer=Enter old password>"
if not %longer%==%mypass% (echo Invalid password & goto set)
set /p "longest=Enter new password>"
reg add "hklm\system\currentcontrolset\control\session manager\environment" /v mypass /d %longest% /f
cls
echo Please log off and login again for password to take effect
goto option
:remove
if exist "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" (echo Please unlock folder before proceed to remove password & goto option)
echo You have select to remove your password if you do not wish
echo to continue please close the command prompt else enter the
echo old password.
set /p "longer=Enter old password>"
if not %longer%==%mypass% (echo Invalid password & goto remove)
reg delete "hklm\system\currentcontrolset\control\session manager\environment" /v mypass /f
cls
echo Password remove successfully
echo Please log off and login again for password to fully erased from memory
goto option
:wait
cls
echo You have enter an invalid password 3 times in a row please
echo try again.
goto option



5 comments:

BHARAT said...

i tried this but installed xp anothertime but this is not working and my folder is missing , i tried that again but no use my folder is missing did u know how to remove this pls tell me

Anonymous said...

i donno if these comments get checked anymore but its worht a try i did this exact thing for xp along time ago but the menu wasnt as fancy this is really good but is it just for xp casue i have vista now and i cant seem to get it work for vista its runs it creats the folder and it will hide it but it wont bring it back... can you email me a jordangies@gmail.com so i can find out what im doing wrong

Anonymous said...

Heyy !! I was looking for such folder locks !! This code is good however faces the problem of bringing the "Locker" Folder Back !!

I tried this too however on a sample or empty folder !! And found out that no matter what option i choose between "1-4" I couldn't get my "Locker" Folder Back !!

So with trial and error methods and editing the original code, I found out this:

Edit that code and under the "unlock Section", there would be such few lines under it:

###########if not defined mypass (echo You need to set a password & goto option)

set/p "pass=Enter password to unlock folder>"
if not %pass%==%mypass% (echo Invalid password & goto unlock)##########

Remove these lines from there, save and close.. And then click on the "Locker.bat" file again !!

Your work would be done !! :)

Anonymous said...

Thanks ! works great,

http://computer-free-help.co.cc/

Unknown said...

i already edit but didnt work also