How to lock a folder in Windows 10

How to password protect a folder in Windows
Do you know how to lock a folder in Windows 10 to keep your data safe? If not, keep reading as we’ll be focusing on that matter throughout this article. Locking your private files is the best way to keep them confidential and secure, especially when the same PC is used by other members of the house. There are two common ways of doing this: Encryption and Password Protection. Thankfully, Windows 10 features an in-built encryption capability, which lets you protect your sensitive data without any third-party app. However, for the complete safety of your documents, you might need some better and more reliable alternatives to this technology. Below we have explained three ways to lock a folder in a Windows 10 device.

How to lock a folder in Windows 10

Password Protection vs Encryption – What is the difference?

Since we will be frequently using the terms “Password Protection” and “Encryption” throughout this guide, it’s essential to understand their meaning to use them correctly. Encryption is a process that converts simple, legible text to an unreadable and complex form, making it difficult to understand for an unauthorized entity. That means if a person without authority tries to open the encrypted document, he will only see a bunch of random letters. To view the original document, a key will be needed, which is the user account of the person who created the encrypted folder or encrypted file. Like encryption, the password-protect feature also secures your private data from meddling eyes. However, it requires a special set of characters or a password to acquire access to the password protected folder. Therefore, while using this type of protection, a strong password is highly recommended because simpler ones are easy to crack.

Locking a folder using File Explorer in Windows 10

Windows File Explorer is the most straightforward method to lock folder in your Microsoft Windows PC. The built-in lock feature will do all the work, so you wouldn’t have to install any other folder lock software. Although this method works fine, it is pretty basic. And so, it’s not effective for securing critical documents from unwanted access. Warning: If you have gotten some extremely sensitive data to protect, we recommend you utilize the password-protect or archive method as they offer more security and protection than this one. Here are the eight simple steps that you need to follow to encrypt your data using the Windows lock feature:
  • Open “Windows Explorer” on your computer;
  • Select the folder which contains the sensitive data;
  • Right-click on the folder and then select “Properties” from the menu. You will find it at the bottom of the list;

How to lock a folder in Windows 10

  • In the “General” tab, click on “Advanced Attributes“. A new window will open up;

  • Check the “Encrypt contents to secure data” box under the Compress and Encrypt Attributes heading;
  • Now, tap “Ok” to close the window;

  • Next, click on “Apply” in the main window to save the changes. Once you hit apply, a pop-up will appear on your screen;

  • Check the boxes according to your preference and click “Ok” to begin the encryption process. The process will hardly take 2-4 seconds to encrypt, and a lock will appear on your encrypted folder.

You will also receive a notification suggesting you back up your encryption key if you are using the windows encrypt feature for the first time. Although it’s an optional step, we highly encourage you to back up your file encryption key. It will ensure that your folder is still accessible even if you have lost the key or your system is at risk. Backing up the file encryption certificate The following steps will help you back up your file encryption certificate in Windows 10:
  • Click on the backup notification that you received just after the encryption process;
  • An Encryption File System (EFS) window will open on your screen. Select the “Back up now (recommended)” option;
  • You will see a welcome screen for Certificate Wizard. Click “Next” to continue the backup process;

  • On the Export Private Key, tap “Next” without making any changes;

  • Again, click on the “Next” button and leave the page without making any changes;

  • Check the “Password box” on the next page, fill the two fields with the password of your choice and then press “Next”. Make sure to enter a strong password for additional security;

  • Select a location for saving this Personal Information Exchange file and click on the “Next” button;

  • The last step is to tap “Finish” to complete the export process. You will get a prompt saying “The export was successful“;

  • Tap “Ok” to close the prompt.

This backup will keep your folder protected, and only you will be able to view it from your user account. You should note that a person can still view this folder if he signs in with your user account.

Locking a folder using WinRar in Windows 10

Software designed especially for encryption and password protection provides the best solution for protecting critical data. However, installing third-party apps from unreliable websites can lead to many privacy concerns. Fortunately, WinRar is a free and dependable utility that you can employ to encrypt your important data. It keeps data safe through a password feature, and the great news is that the software is compatible with both 32 and 64-bit operating systems. Here is how you can password protect your folders using WinRar in Windows 10
  • Download the correct version of WinRar, depending upon your system type;
  • Right-click the desired folder and click on the “Add to archive” option from the list;

  • A new window will open up. Tap on the “Set password” button;

  • Enter a strong password in the blank fields and tick the “Encrypt files names” box;
  • Finally, click “Ok” to create a password-protected .rar folder on your system. Once it’s ready, you can remove the original folder.

If you lock a program file in the .rar file, you will have to unlock it to make it run. For this, drag that file out of the archived folder. You can also utilize other trusted software like Wise Folder Hider to hide, password-protect, and encrypt your important files.

Using Password Protect to lock files in Windows 10

  • Open the folder that you wish to lock;
  • Right-click on the blank side of the folder and select “New“, and then “Text Document” from the menu;

  • Choose any name for the file and press “Enter“;
  • Open the newly created file and paste the following text into the notepad document:
“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 Do you really 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 choic. 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 Set a password for unlocking the 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 Your folder has been unlocked goto End :FAIL echo Wrong password goto end :MDLOCKER md Locker”
  • In the 24th line of this text, replace Your-Password-Herewith a strong password of your choice;

  • Tap on the “File” option and click on “Save As..“;

  • Name the file as “FolderLocker.bat“, change the Save as type to “All Files“, and hit “Enter“;

  • Double-tap the locker file for creating a new folder, “Locker“;
  • Drag the files that need protection inside the “Locker” folder;
  • Now, click open the earlier created “FolderLocker” bat file, press “Y” on your keyboard, and hit Enter. The window and the Locker Folder will hide folder/lock automatically;
  • To unhide and view the locked folder, open “FolderLocker” and type your password (the one you typed in step#5);

  • Press “Enter” and you will be able to see your locked files again.

Wrap up

Since Windows itself doesn’t support a reliable Password Protect feature, it’s best to encrypt your crucial data to secure it from other users on your PC. You can also make use of third-party tools like 7.zip or WinZip to magically hide your folders when they are not in use.

Other related articles that may be interesting for you: