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 > Properties > Advanced > Encrypt contents to secure data.
  • To password protect it, install a program like Wise Folder Hider.

This article explains how to lock a folder in Windows 10.

How Do I Lock a Specific Folder?

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

While there's more than one method, but 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. Press Advanced at the bottom of the General tab.

  3. Put a check in 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 it.

  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 then fill out the text fields below it. 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 then 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 Encrypted Files Work on Windows 10

You should know how encrypted files behave in Windows to make sure 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 full 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 the files to view them. Mark can, however, do essentially anything else.

Any files Mark adds to the encrypted folder are automatically encrypted as well, but now the permissions are reversed: Since Mark is the logged-in user, the files he adds can be opened by him, but not John.

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's 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 which let you define any password as the folder password, completely independent of the logged-in user. The methods described below are arguably more private than Windows' encryption procedure because the file names can be obfuscated and even the folder itself can be hidden.

Password Protect and Hide the Folder

Wise Folder Hider is a good example. This program is ideal if you're really 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 the folder again, select the menu button to the right and select Open. It will open normally in File Explorer again; select Close to hide it again, or Unhide to permanently restore it again.

    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. Enter a password in the text fields in the Encryption section.

  3. 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.
  4. 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'd rather put your secret files in 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?