Friday, January 9, 2009

How to lock a folder using notepad file?

To lock the folder copy the below code in notepad file and save it as locker.bat
or any file name which u like, but the folder which will create will bear the name LOCKER every time...


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




1. Double click the batch file and a folder in the same directory will create.
2. Now put files which u like to secure in this folder.
3. Double click the batch file and press Y to secure the folder.
4. To again open the same folder double click the batch file from the same
directory... note it from the same directory and give password LOCKER and the folder will be visible.. so try this notepad guard.

Waqas Rafi

1 Comment:

Nabeeha Khan said...

Well waqas its nice... But not working properly... The password is not working..

You type in anything other than locker and it will open.. So not a very wise choice of security..

Alsocan u tell how to set your own password..

Disclaimer: Independent operated blog, feed backs at kaxxi.khan@gmail.com
© copyright 2011 info-logy.blogspot.com