Friday, January 16, 2009

Protect folder with your password via notepad file


Done some changing with code now you will be able to unlock the folder with your own password and the folder will not open with any other password.Copy below code in notepad file and save it as a batch file, with an extension of .bat



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


Just change the aaa111 to anything which u like the red text in above code... a suggestion after this keep ur batch file somewhere secure and when to open bring it to the same directory and double click the batch file and enter ur password to unlock..

Waqas Rafi

2 Comments:

Anonymous said...

cool man password is working now...

Nabeeha Khan said...

Thanx for the repost. But still it is still not very safe as anyone can open the batch file in the notepad and get our secret pass..

Figure out some way that it cannot be opened in the notepad unless the password isn't entered.

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