Sunday, March 29, 2015

How To Lock A Folder Through Notepad...?

Having a shared Windows computer and want to lock a folder that contains some stuff that you do not want others to see? You do not need any software or application for this.



Just follow the following simple tutorial to lock a folder, what you just need is Notepad which is already installed in your Microsoft Windows OS no matter what version of it you are using:

1) Open Notepad.



2) Copy the following code and paste it in the Notepad:

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

3) Now save this notepad file with any name but make sure that what ever name you choose you must end it with .bat extension, e.g, thewebsaga.bat, locker.bat.



4) Now double-click the file that you just saved.


5)  You'll see a command prompt window blink for a second and after that a folder named Private will be automatically created.




6) Now double-click the .bat folder-locking file you made, again. Now it'll show something like this:



All you have to do now is to type Y and hit the Enter key. As soon as you do so, the folder that was automatically created a few seconds ago will automatically disappear. You are done!!!
That folder is now hidden and none can open it but you.

7) For opening that folder, all you have to do is to double-click the .bat file again. This time it'll show:



Now just enter the set password and hit Enter and the folder will be visible to you again, the default password is thewebsaga 
You can select your own password by replacing thewebsaga in the code we provided you above with any phrase you like to be set as your password!

For hiding the folder again, you'll have to open the .bat file again and go through the same procedure. :)


About the Author

MaulviNextDoor

Author & Editor

Hi there! I am a 16 years old boy living in Pakistan. My favorite passtimes include blogging, tweeting, and gobbling down my favorite dishes. Besides this, I also love to play table tennis. Want to ask me a question? You can do so by clicking here.

1 comments:

 
The Web Saga © 2013-2015 Designed by Haroon Rasheed