Jun 26, 2010

Lock a Folder With Password Without Any Software

Today i will show u how to lock a folder with password without the help of any software:

1. Write the following code in notepad and 'Save' it as batch file (with extension '.bat')( Any name will do):--

if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
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.
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
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
echo Invalid password
goto end
md Locker
echo Locker created successfully
goto End

2. Then you will see a batch file. Double click on this batch file to create a folder named "locker". New folder named 'Locker' would be formed at the same location.

3. Now bring all the files you want to hide in the 'Locker' folder.

4. Double click on the batch file to lock the folder named 'Locker'. Type Y to lock.

5. If you want to unlock your files,double click the batch file again and you would be prompted for password. Type Y to access the folder again.

6. To have a different password, change 'y' to 'new password' in the code
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
and save it again.

No comments:

Post a Comment