How to Lock a Folder in Windows 10

Lock up your folders and secure your files for good

What to Know

  • To encrypt a folder, right-click it and select Properties > Advanced > Encrypt contents to secure data.
  • To back up encryption keys, enter certmgr.msc into the Run dialog box, and go to Personal > Certificates.
  • To password-protect folders, install a program like Wise Folder Hider.

This article explains how to lock a folder in Windows 10 using the built-in encryption tool or a password protection program.

How Do I Lock a Specific Folder?

Windows has an encryption tool to prevent other users from opening your files, but install a more robust third-party tool for greater privacy.

While there's more than one method, the easiest doesn't involve any third-party programs. Windows 10 has this feature built-in.

This article covers three methods. See the section directly below these steps to learn how this process works; you might prefer to use one of the other techniques instead of this one.

  1. Right-click the folder you want to lock, and select Properties.

  2. Select Advanced at the bottom of the General tab.

  3. Check the box next to Encrypt contents to secure data.

  4. Select OK, and then OK again on the Properties window to save.

    Folder properties and Advanced Attributes screens in Windows 10.

    Windows will prompt you to back up your file encryption key to avoid permanently losing access to your encrypted files. You can follow those steps (keep reading) or ignore them.

    If you don't see the prompt, but you still want to back up the encryption key, skip ahead to the next section.

  5. Select Back up now (recommended) if you followed the notification to back it up.

    Encrypting File System back up now option.
  6. Start the Certificate Export Wizard by selecting Next on the first screen.

  7. Keep the defaults selected, and then press Next again.

    Certificate Export Wizard export file format.
  8. Select the box next to Password to enable the password, and fill out the text fields below. Select Next.

    Certificate Export Wizard security screen.
  9. Choose where to save the PFX file, and give it a name.

  10. Select Next to review the information you provided and select Finish to complete the export.

    Completing the Certificate Export Wizard review screen.
  11. Select OK on the successful export prompt. If you ever need to use this certificate, just open it from wherever you saved it in step 9, and follow the on-screen prompts.

How to Back Up Locked Folder Encryption Keys in Windows 10

Follow these steps to manually back up keys for encrypted folders:

  1. Press WIN+R to open the Run command (or just select the search bar on the taskbar), type certmgr.msc, then press Enter.

    certmgr.msc in Windows Run box
  2. In the left pane, go to Personal > Certificates.

    Personal store > Certificates in Windows Certificate Manager
  3. Select all certificates for Encrypting File System.

    Encrypting File System in Windows Certificate Manager
  4. Right-click on the selected files, then go to All Tasks > Export.

    All Tasks > Export in Windows Certificate Manager
  5. Refer to steps 6-11 in the previous section to complete the backup.

How Encrypted Files Work on Windows 10

You should know how encrypted files behave in Windows to ensure this is the method you want to use.

Take this as an example: An encrypted folder exists on the root of the C drive of a computer with two users. John encrypts the folder and all the files inside it. He has complete control over the data.

Another user, Mark, logs in to his account, where he can do nearly everything John can:

  • See file names
  • Rename files
  • Move and delete the folder and its files
  • Add more files to the folder

However, because John encrypted the files in the folder, Mark can't open them. Mark can, however, do essentially anything else.

Any files Mark adds to the encrypted folder are automatically encrypted, but now the permissions are reversed: Since Mark is the logged-in user, he can open the files he adds, but John can't.

Can You Put a Password on a Folder?

Windows 10 doesn't have a way to put a password on a folder, apart from what we described above. That method is similar to other password protection techniques in that you need to provide the correct user account password before you can view the encrypted data.

There are, however, third-party tools that let you define any password as the folder password, utterly independent of the logged-in user. The methods described below are arguably more private than Windows' encryption procedure because they can obfuscate the file names and hide even the folder itself.

Password Protect and Hide the Folder

Wise Folder Hider is a good example. This program is ideal if you're protective of the data because it can hide the folder behind two passwords. It can also secure entire flash drives and encrypt individual files.

  1. Open the program and define an initial password. This is what will be entered each time you want to open Wise Folder Hider.

  2. From the Hide File tab, select Hide folder, and choose the folder you want to protect behind a password (or drag the folder into the program window). Any folder but system folders are allowed.

    After choosing it, the folder will immediately disappear from its original location. To view it again, select the menu button to the right and select Open; it will open in File Explorer. Select Close to hide it again, or Unhide to permanently restore it.

    Wise Folder Hider open and close options.
  3. Optionally, for greater security, you can force another password to be entered before opening that specific folder. To do that, press the down arrow to the right of the folder path, and select Set Password.

    Wise Folder Hider set password prompt.

Make a Password Protected Copy

7-Zip is another favorite. Instead of hiding the original folder, it creates a copy and then encrypts the copy.

  1. Right-click the folder and go to 7-Zip > Add to archive.

  2. Change Archive format to be 7z.

  3. Enter a password in the text fields in the Encryption section.

  4. Optionally define other settings, such as these:

    • Archive is the file name and path to where the encrypted file should be saved.
    • Encrypt file names prevents someone from seeing the file names without providing the password.
    • Create SFX archive lets someone provide the password to decrypt the folder even if they don't have 7-Zip installed. Ideal for sharing the folder; it turns the file extension into EXE.
    • Compression level can be set to a different level to make the file smaller, though it might also increase the encryption and decryption time.
    Add to Archive screen for 7-Zip.
  5. Select OK.

The original folder isn't deleted or changed in any way, so if you take this route, be sure to delete or move the original files after making the password-protected version.

Other apps are available if you prefer to put your secret files on a virtual hard drive with a custom password.

A "locked folder" can also mean a folder with files currently in use, but that's not the same idea as a folder you'd lock intentionally for privacy reasons. See How to Move, Delete, and Rename Locked Files for more on how those files work.

  • How do I lock a folder in Windows 10 to prevent deletion?

    One option is to right-click the folder and choose Properties > Security > Advanced Disable Inheritance > Convert inherited permissions into explicit permissions on this object. Then select a user from the list > Edit > Show advanced permissions > Type > Deny > and check the box beside Delete

  • How do I hide a folder on my PC and lock it for myself in Windows 10?

    To hide files and folders in Windows 10, right-click the folder and select Properties > General > Hidden Apply > OK. While you can prevent hidden files from displaying by adjusting the File Explorer view, other users can easily show hidden items by changing this setting. A third-party tool to add password protection locks and hides folders more effectively.

Was this page helpful?