iSumsoft » Resources »computer » How Do You Lock a Folder with a Password

How Do You Lock a Folder with a Password

For data security, we usually set password to lock a sensitive Word/Excel/PDF document. Occasionally you may wonder if it’s possible to lock a folder containing sensitive data. However, Windows doesn’t come with support for adding passwords to protect folders. Even so, there are still multiple ways that you can lock a folder with a password.


Way 1: Lock a folder by archive

Actually, it’s the most commonly used way to compress a folder to archive, as long as you’ve installed the archive software like RAR or ZIP on your Windows, and set password for the archive to lock the folder.

Step 1: Right click on the folder and select the Add to archive.

Step 2: Select RAR or ZIP format. Then click on Set password button. Then enter your password and click OK so that you can encrypt the archive.

Encrypt archive to lock the folder

Then anyone who wants to unlock the folder needs to enter the correct password to extract the archive.

Way 2: Lock a folder with password by using Batch script file

You may know little about Batch script. But never mind. The Batch script code was wrote by professional.

Step 1: Create a new blank folder in any one location. Then open the folder and create a new blank Text document.
Step 2: Copy the following code and paste it into the contents of the Text document.
Step 3: Save the Text as locker.bat file.

Save as locker.bat file

Step 4: Double click on the locker.bat file to run it. You can see it immediately create a folder called Private.

Step 5: Put your files/documents/folders you hope to lock, into this Private folder. Then double click on the locker.bat file to run it again. This time it will pop up a dialog asking if you’re sure you want to lock the folder. Press Y key and hit Enter to make sure.

Press Y to lock the folder with a password

Then you will see the Private folder quickly disappear leaving only the locker.bat file. Hence, you successfully lock the folder with a password. And the folder is hidden. If you want to see it again, just need to double click on the locker.bat file and type the correct password to unlock it.

Way 3: Encrypt hard drive with password to lock a folder

The above way might not be the most failsafe, because others might also know the Batch script files, and there is some free way that people can easily bypass ZIP password or unlock encrypted RAR files. In this case, you can encrypt the whole hard drive where your folders are. Or, you can put the folder into a USB removable device. Then encrypt the USB flash drive with password to better lock your folders.

Way 4: By using some third-party software

The above three ways help you password protect a folder without third-party software. Of course, it's not a bad choice to use some specialized third-party folder encryption software to lock a folder with password.