Lock and Unlock Folder(s) : How to Lock and Unlock one or more Folder(s) Using Notepad?

Sometimes you need to apply restriction of some folders which are really personal for you. There are many softwares to protect your folders from unauthorized access. Those software really cost much. But there is an alternate solution which also is capable to provide restriction of your private folders. You can do this by using notepad. This page contains information to lock a folder using notepad and to unlock a folder using another notepad.

Steps to Lock and Unlock a Folder Using Notepad

Suppose, you have a personal folder named as MyFolder which has all the private information about you. So, you want to lock that folder. Moreover, you may also able to unlock that folder when you also necessary.

To lock the folder using a notepad follow the following steps:

1. Open notepad and copy the following code segment:

ren MyFolder MyFolder.{21EC2020-3AEA-1069-A2DD-08002B30309D}

2. Save the file as Lock.bat name. The extension of that file must be .bat extension.

3. Double click Lock.bat and the folder MyFolder will be locked.

To unlock the folder using a notepad follow the following steps:

1. Open notepad and copy the following code segment:

ren MyFolder.{21EC2020-3AEA-1069-A2DD-08002B30309D} MyFolder

2. Save the file as UnLockKey.bat name. The extension of that file must be .bat extension.

3. Double click UnLockKey.bat and the folder MyFolder will be unlocked.

Sometimes, you may mistake. That's why I send all files in a zip format to download. Here you will find all the lock and unlock a file and a folder to which you unlock. Open the .bat files in notepad and check whether your codes are OK or not. I think it really helps you.

Download the files for your experiment

You may use these codes any where. The only thing you have to remember, is to change the name of your folders to which you want to lock or unlock. The easiest way is to copy the two bat files and paste there where you want to lock or unlock any particular folder. Now open the two bat files with notepad, and change the folder name as the folder you want to lock or unlock. That's the easiest way to do.

By following the above steps, you can easily lock or unlock the necessary folders easily. Moreover, this technique can also be applied your pen drive locking process also.

© Written by rancidTaste

More by this Author


Comments 12 comments

darkside profile image

darkside 7 years ago from Australia

I tried it. Followed the instructions by the letter. By double clicking the Lock.bat file it renamed the folder. But I could still open the folder. Did I miss something?


rancidTaste profile image

rancidTaste 7 years ago Author

darkside, I think the code is ok. Would you please download the zip files and see the code. I just add the download link. You can download that and follow the instructions. I think it will be working. If you face problem, tell me. I will try to solve. I again give you the code download link: http://www.box.net/shared/svzybozgq0 [please follow the instruction which I mentioned after the steps]


darkside profile image

darkside 7 years ago from Australia

Downloaded it, unzipped it (I have winRAR) and then double clicked the lock.bat, and then tried opening the folder. And it opened.

I'm using a Dell notebook with Windows Vista on it.


rancidTaste profile image

rancidTaste 7 years ago Author

Darkside, I do all the steps in Windows XP and it's totally working under Windows XP. I don't use Vista. Most probably, the Operating system (Vista) does not support that.

[For me, I'm using Toshiba notebook and Windows XP Service Pack 3. The process is totally working.]


darkside profile image

darkside 7 years ago from Australia

Okay, it mustn't work in Vista then. :( Oh well, I had been looking for something like this for... 8 years! :D

At least I know now that it can be done, even if not on the latest Windows product.


rancidTaste profile image

rancidTaste 7 years ago Author

it's fully workable in windows XP... i use it in this way. i think there must be some solution for vista. i will try for that. but the main problem is that i need to install vista. [i don't like vista (i don't know the reason). i only like XP and ubuntu].

Anyway, i will try myself to find such a solution for windows vista.


darkside profile image

darkside 7 years ago from Australia

I did a search for lock unlock notepad folder and the second result could be the Vista solution. And yours came in at number 1 result by the way :D


sensiguard 7 years ago

Thanks for sharing with us ..and the comments are helpful..thanks and keep posting..good luck :D


sensiguard 7 years ago

Thanks for sharing with us ..and the comments are helpful..thanks and keep posting..good luck :D


Nilay 7 years ago

I love u mannnnnnnnnnn

u saved my life................thanku very very very very very very very much............


yukim 6 years ago

ei wazup


ankush 6 years ago

this process of folder hide is not valid for windows7,,,pls check and send me some valid idea of folder hiding using notepad which are applicable for windows 7 also

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article
    working