How to Encrypt or Password-Protect a Folder in Windows 10

Everyone has digital files that are private; files that we don't want anyone else to see. But how do we go about protecting individual folders so that the files inside are encrypted? When the computer secuity being cracked, the invader is still unable to touch the files in a folder being protected by password. In this article, we'll show you how to encrypt any folder on Windows 10 PC without the help of additional tools. Using only what's available in Windows, you can secure a folder from prying eyes. You can set your own password and have exclusive access to it.

Encrypting a Folder on Windows 10

Although this looks like an advanced method of protecting folders in Windows, it's not that complicated. The only thing you need is a short script that will run to protect and unprotect the folder. This FolderLocker script can be created as a text file. Once saved in the right format, it can do three things: it can set up a secret folder for your files, it can lock the folder and make it invisible, and it can unlock the folder and make it visible again.

The best part is that the text file won't be required once the FolderLocker file has been set up. It's only required when setting up a lock for the first time in that folder. The script can be taken from the section below, and even if you don't have any experience with this type of task, following the instructions below should be able to get you through the process.

How to Set Up FolderLocker in Windows 10 to Put Password on Folder

Step 1: Open File Explorer and navigate to the folder you want to encrypt.

Step 2: Once inside the folder, right-click on a blank space and select New?? and Text Document. Press Enter.

Step 3: Now open New Text Document (if you haven't named it) by double-clicking the name. Paste the script shown below into the text file:



title Folder Locker

if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK



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.



ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

echo Folder locked

goto End


echo Enter password to Unlock folder

set/p "pass=>"

if NOT %pass%==Your-Password-Here 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


echo Invalid password

goto end


md Locker

echo Locker created successfully

goto End


Note: In the script above, find "Your-Password-Here" and replace it with the password you want to set for your locked folder.

Step 4: Click File > Save As?? and change Save As Type to All Files (*.*), then rename the file to FolderLocker.bat and save it.

Encrypt a Folder in Windows 10

Step 5: When you double-click FolderLocker, it will create a Locker folder. Move all the items in the main folder to this one.

Step 6: Now double-click the FolderLocker file again, and you will be asked whether you want to lock the folder. Type in Y and hit Enter. When you do that, the Locker folder will disappear.

Step 7: To unlock and display the Locker folder, where your hidden items are, double-click the FolderLocker file again. This time, enter the password you originally set. The Locker folder will become visible and accessible.

This same process can be repeated to protect multiple folders, and you can use the same script on any folder, as long as you remember to set a unique password for each one. It's also a good idea to record every password in case you forget it. Even though there are several password recovery tools available for Windows 10, not all of them are reliable enough to retrieve your password.

Other Ways to Password Protect a Folder on Windows 10

You can also use EFS, or Encrypting File System, to encrypt folders in Windows 10, but it is not recommended if your data is sensitive. The reason is that if you need to do a factory reset on that computer, anything protected by EFS will be lost.

Another method is to use BitLocker, but the problem with this is flexibility. You can't easily pick and choose files and folders to protect unless you use another tool like VHD to create an encrypted file container.

Bitlocker Windows Protection

The final option is to use free third-party software like Veracrypt to protect folders and other items in Windows 10. It's a paid option but will keep your data secure with advanced encryption algorithms and offers state-of-the-art user interfaces.

VeraCrypt Password Protect a Folder

In closing, the most important thing you can do is to make sure your passwords are long, unique and rememberable. This is the single most crucial element in any form of cybersecurity, and it rests in the hands of you, the user.