Saturday 24 March 2012

HOW TO LOCK A FOLDER WITHOUT A SOFTWARE

Want to lock a folder so as to prevent others using your computer from viewing its contents ? Normally we use third party software to achieve this . I found a good way to lock a folder in Windows XP without using any third party software .


Open Notepad in your PC by typing " Notepad " in run prompt .
Copy the following Code and paste it in notepad.

cls
@ECHO OFF
title Folder Technade
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Technade 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 Technade "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%==technade123 HERE goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Technade
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Technade
echo Technade created successfully
goto End
:End

Save the notepad and change the extension of the file from ".txt" to ".bat" .

Now you have created a batch file . You can even customise the batch file by following the below two points.

Replace Technade which is in bold letter with the name of the locked folder you want to create ( Optional ) .

You can change the password also by replacing " technade123 " in the above code with your new password ( Optional ).
Now place the batch file in the location where you want to create your password protected folder .
Run the batch file by double clicking on it. This will create a folder named "technade" in the same location as the batch file.
You can now open the folder and place the files inside .
After placing the files , run the batch file again . It will ask you whether you want to lock the folder . Press' y' and hit enter .
The folder will become invisible . To reopen the folder , run the batch file again . You will be asked for a password .
Enter the password and hit Enter . You can view the contents of your locked folder .
Note : After locking the folder , don't keep it in the same location as anyone can open the batch file and see your password . Keep it in someother location , and whenever you want to open it , Place it back in the location of locked password and run it .
PLEASE SHARE IT

HAVE A NICE DAY

No comments:

Post a Comment