Sometimes when we are working on a shared computer or we have some confidential data that we want to protect it from accessing the other users. A lot of softwares are available for this purpose. But do you know that you can simply create a locked folder in your computer without any software and you will have a key that will be required to unlock that folder. There are two of methods discussed here, to exercise the first one simply follow these steps:
1. First create a folder in any drive, let’s do as F:/Mouse (It will be better to create a folder with name similar to the name of folders in Control Panel as on clicking the locked folder, it will redirect to the control panel).

2. Create a notepad (or any other text editor) file and write the following code in it
ren Mouse Mouse.{21EC2020-3AEA-1069-A2DD-08002B30309D}
Name the file as “loc.bat” and save it in the same drive.
3. Now to create another batch file, open a text file and put the following code:
ren Mouse.{21EC2020-3AEA-1069-A2DD-08002B30309D} Mouse
Name the file as “key.bat” and place in the same directory.

Part II
4. Now to lock the folder ‘Mouse’ click on the loc.bat file. As soon you do it the folder changes its icon and works as control panel shortcut. To unlock the folder you need to click on the key.bat file.

So to keep the folder safe of others you should place your key.bat file to any other place like any folder, pen drive or CD. So whenever you need to access this folder simply put the key file in the folder and click on it.
But the problem with this trick is that anyone can delete your folder and also create a key.bat file if he/she knows the trick. Here is another technique that is quite better than it.
To create a lock folder in windows you simply need to create a batch file (wherever you want to place the locked folder but prefer to put in a drive instead of a folder as someone can delete the folder) with the name “locker.bat” and put this code in it:
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%==mypassword 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
@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%==mypassword 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
Here mypassword is the password for that folder; replace it with your password (without the space).
Part III
Now clicking on the batch file will create a folder named Locker if it does not exists.

Put all your confidential data in this folder and click on the batch file again to lock the folder. As you choose Y, the folder will be hidden and inaccessible by other users.

To unlock it again you simply need to click on the locker.bat file and type the password for it and the folder will be unlocked.

Filed Under: How to
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.