The folder is protected with password for several reasons. 1. Research, 2. Spying, 3. Private work of Office, 4. Child Lock, 5. Confidential Information for Journalists etc. For these types of many reasons, the folder is protected with a password.
How to Password Protect a Folder in Windows?
Process 1: Safe folder with a password to scripting batch file:
You want to lock your any folder where has confidential work. See in the screenshot below, here is your private folder’s name as an example > PHDResource.
Now copy and paste bottom’s code in Accessories > WordPad of Windows.
title Folder name
if EXIST "HTG Locker" goto UNLOCK
if NOT EXIST name goto MDLOCKER
echo Are you sure you want to lock the folder(Y/N)
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
ren name "HTG Locker"
attrib +h +s "HTG Locker"
echo Folder locked
echo Enter password to unlock folder
if NOT %pass%== phd123 goto FAIL
attrib -h -s "HTG Locker"
ren "HTG Locker" name
echo Folder Unlocked successfully
echo Invalid password
echo name created successfully
Now in the script which is given above, replacing name words, give your folder name. Here is example PHDResources, because here there is a folder named PHDResources, which has been shown above. See in the screenshot below.
After replacing, paste all code in Accessories > notepad of Windows. Now in the place of GIVE_PASSWORD_HERE give your own password. Here example has been given as PHD333. See in the screenshot below.
Now save notepad file with a .bat extension, selecting all files (*.*) see that in the screenshot below. Here LockDir.bat name has been given, but here you can another name also.
Now click double on LockDir.bat file to activate script. When it will ask you that, are you sure to lock the folder or not then press y.
When you gave y and press enter then your folder will become invisible and will be locked. If you want to see that folder again, then click double on LockDir.bat file. See in the screenshot below.
When you click, double in bat file, then a screen will come like which has been shown below. Now give your password PHD333 which you had set before.
After giving the password, your locked folder will be unlocked again and it will look like the screenshot below.
- There will be no spaces in the folder name. If there is space, then bat file will not work.
- Most of users will not understand that your folder has to script file. Yet try to keep with bat file’s name win.bat or system.bat, because men don’t want to search these files.
- If you forget password, then click right on a script file. Now clicking on edit of the menu and see your password.
Process 2: Safe folder in password with a real free software:
You will get many free softwares on the web but that are not free in reality. There are some softwares which are free trial version, you will get some less benefit related version, and there are all benefits in the pro version of that, which we have to buy. But I’m giving you real free software through which you will get all benefits and which is user friendly also. Download software from here.
After downloading, you will get a file named lockdir.exe, if you click double on that you will see the bottom’s screen. Here you have to click in protect button with master password.
Now, after setting master password, click double on that lockdir.exe file and when screen will come like below, giving previous set password and then press OK.
Now note screenshot of the bottom’s dialogue box.
For bringing your confidential folder, click on to add rule button like screen which has been given above. Now see the effect on the screen below.
- You have to bring folder by clicking in Browse button.
- You have to give tick in the box beside Lock Folder.
- Giving tick in the box beside Unlock folder on access with password, press Ok by giving Password ও Confirm Password. Now note screenshot below.
Here shown folder has been locked now. After unlocking with password, if you don’t work with that folder, then within two minutes that will be locked again. Or if you set that in this dialogue box for two minutes and you can give that in another time also if you want. Now see in the screenshot below that what it shows to open your folder.
When someone will try to open this folder, then a dialogue box will come which is given above, in which you have to press OK with a password within 20 seconds.
If you don’t work in this unlocked folder within two minutes, then this will be locked again within two minutes, because you had set before by giving two minutes on it.
After working with unlocked folder, it will be unlocked permanently and anyone can open this. If you want to lock this folder again, then follow the previous steps again or you can lock by clicking on the folder path status.
Thank you for reading this article. I hope all of you have understood. If there is any problem to understand, then comment to us on The Mental Club. Don’t forget to share it with your friends.