How to Password Protect a Folder in Windows 10

More often than not, you will have files and folders that require security. The content of the file is either sensitive or personal. If you share your computer with others, there is always a chance that someone will accidentally open a file. Or worse, someone might unwittingly delete your necessary files. The only way to protect your essential file is to store them in a secured folder. Ideally, it should be password protected.

Here are a few things that you can try to password protect a folder in Windows 10:

Password Protect a Folder without using a Third-Party Software

It is essential to take note of your Windows 10 version first. For Windows 10 Pro, the steps are pretty straightforward. The operating system has a built-in encryption tool called Encrypted File Service (EFS). Those with Windows 10 Home will need a couple of steps to accomplish the same security.

It is important to note that access to the encrypted folder only using the login credentials of the account you encrypted the file. Other user accounts will not have access to it. Take note of the password or write it down somewhere. Or else your data will remain inaccessible forever.

Windows 10 Pro

First, create a folder where your files will go. Right-click on the folder and choose Properties.

How to Password Protect a Folder

Go to the General tab. Click the Advanced button.

Advanced Option to Protect a Folder with Password

Under Compress and encrypt attributes section, check Encrypt content to secure data.

Encrypt - Password Protect a Folder

Click OK, then close the Properties window. Apply the changes to the folder, subfolder, and files when you see a prompt.


Backup Your Encryption Key

Create a backup of your encryption key for added security. Windows will ask you, to backup your encryption key right after you encrypt the folder.


Click Back up your encryption key pop up when you see the prompt. Choose Back up now.

Back up Now - Password Protect a Folder

Just follow the steps from the wizard. Enter your password when asked.

Enter Password

Choose a place where you'll save your certificate. Give it a name and save it somewhere safe. Better yet, save it to a thumb drive or another device.

Save Certificate - How to Password Protect a Folder in Windows 10

Click Next then Finish.

Windows 10 Home

Windows 10 Home users will need to create a particular command to encrypt a file. Follow the steps below:


Open Notepad. Paste the following text:

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%==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 :FAIL echo Invalid password goto end :MDLOCKER md Locker echo Locker created successfully goto End :End

Find "Your-Password-Here". Replace it with your actual password.

Replace password - How to Set Password to a Folder

On the notepad, go to File > Save As > select All Files. Add the name of your document and add the file extension .bat. Save this in a folder you want to hide.

Save bat File - Password Protect a Folder

Go to the folder where you saved your .bat file. Open it. The command prompt will flash quickly which is normal. It will create a folder where you will store your important documents.

File Locker Folder - Password Protect a Folder in Windows 10

Lock the folder by running the .bat file again. You will get a message "Are you sure you want to lock this folder? (Y/N)". Type Y and press Enter. The folder will disappear.

Lock Folder Command Prompt

Once you need your files again, run the .bat file. Enter the password at the command prompt. Hit Enter and the folder will appear again.

Password Protect a Folder using Third-Party Tools

The steps above may be too difficult for some users. At times, native solutions are just not enough to protect your sensitive files. You can use third-party tools to password protect your folder. Here are our picks:

My Lockbox

My Lockbox to protect a Folder with password

My Lockbox is a small tool that enables you to hide, lock, and password protects almost any folder on your computer. It is a simple tool which protects your private files easily. My Lockbox has both a free edition and professional edition. The free edition protects one folder with an unlimited number of subfolders. On the other hand, professional edition protects an unlimited number of folders. Both versions have no limits on the size of the files in the folders. The installation is easy and lets you set your password right away. It also works even in Windows safe mode. Even users with a bit of technical knowledge may find it difficult to access your files.

Anvi Folder Locker Free

Anvi Folder Locker

Anvi Folder Locker Free is a new and free security tool which allows you to protect your files. You can password protect several folders without any limitations. Additionally, you can add permissions to your files to stop anyone from modifying them. It can Hide, Lock, Read Only, Hide and Lock, or Password-Protect any folders or files that you add. The user interface is straightforward and easy to use. You can easily see which folders or files are added and protected by Anvi Folder Locker Free. Anvisoft also offers technical support through their website.

Folder Guard

Folder Guard

Folder Guard is an excellent tool if you need to protect your computer more than password-protecting some of your folders. It is a paid solution which offers various security services. It hides your folders and files and makes them invisible to Windows applications, Office, and even MS-DOS programs. Moreover, the tool can restrict access according to file types. You can also set your files to Read-Only to protect against any modification or deletion. Folder Guard also disables your Control Panel and other Windows configuration tool from being accessed by other users. This protects your overall system configuration. Folder Guard starts at $39.95 with a 30-day money back guarantee.

Final Thoughts

It is important to keep in mind the password that you are using whichever solution you choose. Losing your password may mean having no way to access your files forever. Additionally, make sure that you are not uploading any of your private files to the cloud. The solutions above becomes useless when anyone can hack into your cloud storage and download the file from there.

6 thoughts on “How to Password Protect a Folder in Windows 10”

Leave a Comment