WEB TutorialsWINDOWS/SOFTWARE Tutorials

How to Lock a Folder in Windows: Safe Built-In Options

Want to keep other people who use your PC from opening a private folder? Windows includes tools that can help, but it is important to choose the right one. Windows does not provide a universal, separate password for every folder in File Explorer. Instead, you can restrict access by Windows user account, encrypt selected files with Encrypting File System (EFS) on supported editions, or encrypt the whole drive with BitLocker or Device Encryption.

This guide explains the difference between those options, how to use them safely in Windows 10 and Windows 11, and why the older cacls command shown in the original version of this article should no longer be treated as a folder-locking solution.

Advertisement

Quick answer: Which method should you use?

Your goal Best built-in option Important limitation
Stop another standard account on the same PC from opening a folder Separate Windows accounts and NTFS permissions Not a password prompt for the folder; an administrator can change ownership or permissions.
Encrypt selected files or folders Encrypting File System (EFS) Not available in Windows Home; requires an NTFS volume and a safely backed-up certificate.
Protect files if the computer or drive is lost or stolen BitLocker or Device Encryption Encrypts a drive, not one folder. Availability depends on the Windows edition and device.
Make a folder less visible in File Explorer Hidden attribute Hiding is not security. Anyone can show hidden items.

1. Restrict folder access with Windows user permissions

This is the most direct built-in option when different people sign in to the same computer using separate Windows accounts. Windows uses NTFS permissions to decide which users and groups can read, change, or manage a folder and its contents.

Before you change permissions

  • Give each person a separate Windows account and protect it with a strong sign-in method.
  • Use a normal standard account for everyday access where practical.
  • Make a backup of important files before changing permissions.
  • Do not experiment on Windows, Program Files, ProgramData, or other system folders. Use a folder containing your own documents.

Change permissions in File Explorer

  1. Open File Explorer and locate the folder you want to protect.
  2. Right-click the folder and select Properties.
  3. Open the Security tab. This tab is used for NTFS permissions.
  4. Select Edit to review the users and groups listed for the folder.
  5. Select the account you want to configure. If it is not listed, use Add and enter the correct Windows account name.
  6. Allow only the access that account needs. For example, Read lets a user view files, while Modify also allows changes.
  7. Select Apply, then test access by signing in with the other account.

Important: Do not remove permissions or add a blanket Deny entry without understanding the effect on inherited permissions. You can accidentally block your own account or an application that needs the files. Keep the intended account and the system’s required access intact. If you are unsure, cancel the change and ask an administrator to review the permissions.

Advertisement

NTFS permissions are access controls, not encryption. They are useful for separating standard user accounts, but they are not a strong barrier against someone who has administrator access to the computer or can remove the drive and access it elsewhere.

2. Encrypt a folder with Encrypting File System (EFS)

EFS encrypts selected files and folders on an NTFS volume using a certificate associated with the Windows user. It is different from a folder password: the authorised user’s Windows profile and EFS certificate provide access to the encrypted data.

Microsoft states that the File Explorer file-encryption option is not available in Windows Home. If you use Windows Home, skip this method and check whether Device Encryption is available on your device instead.

Check whether EFS is available

  1. Open Settings and go to System > About.
  2. Check the Windows edition under Windows specifications.
  3. In File Explorer, right-click the drive where the folder is stored, choose Properties, and confirm that its file system is NTFS.

Encrypt the folder

  1. In File Explorer, right-click the folder and choose Properties.
  2. On the General tab, select Advanced.
  3. Select Encrypt contents to secure data, then choose OK.
  4. Choose Apply. If Windows asks whether to apply the change to the folder only or to the folder, subfolders and files, select the scope that matches the data you intend to protect.
  5. Wait for Windows to finish applying the encryption, then check the folder and important files.

Back up the EFS certificate and private key before relying on EFS. Microsoft documents the cipher /x command for backing up the current EFS certificate and keys. Store the backup somewhere separate and protected, not only inside the encrypted folder. If the certificate and private key are lost, you may be unable to open the encrypted files after a profile problem, Windows reinstall, or device change.

For the command syntax and encryption-status checks, see Microsoft’s Cipher command reference.

3. Encrypt the whole drive with BitLocker or Device Encryption

If your concern is someone removing the hard drive or stealing the laptop, drive encryption is usually more appropriate than changing one folder’s permissions. BitLocker protects a drive rather than creating a separate password for a single folder.

BitLocker Drive Encryption

Microsoft lists manual BitLocker Drive Encryption for Windows Pro, Enterprise and Education editions. To check it:

  1. Sign in with an administrator account.
  2. Open Start and search for Manage BitLocker.
  3. Choose Turn on BitLocker beside the drive you want to encrypt.
  4. Follow the setup prompts and save the recovery key in a safe location separate from the computer.
  5. Allow encryption to finish. Keep the recovery key available in case Windows asks for it later.

Device Encryption

Some Windows 10 and Windows 11 devices, including supported Windows Home devices, offer Device Encryption. It uses BitLocker technology but is available on a wider range of hardware.

  1. Sign in with an administrator account.
  2. Open Settings > Privacy & security > Device encryption.
  3. If the setting is available, review the recovery-key arrangements and turn Device Encryption on.

If the setting is missing, the device may not meet the requirements or you may not be signed in as an administrator. Do not assume the drive is encrypted simply because the PC uses a Microsoft account; check the actual Device Encryption setting and its status.

Keep the recovery key safe. Microsoft cannot recreate a lost BitLocker recovery key. Store it somewhere you can reach if the computer becomes unavailable, and do not keep the only copy on the encrypted drive itself.

4. Does hiding a folder lock it?

No. Marking a folder as hidden only changes whether it appears in the normal File Explorer view. A person can enable the display of hidden items and find it. Hidden folders are useful for tidying a view, not for protecting confidential files.

5. What about the old CACLS command?

The earlier version of this article showed a command based on cacls that changed permissions for a named account. That command did not create a separate folder password; it changed the folder’s access-control list. An incorrect permission change can block the wrong account or make files difficult to access.

Microsoft has deprecated cacls and identifies icacls as its replacement. The following command only displays the current permissions for a folder; it does not change them:

icacls "C:\Path\To\Folder"

Replace the example path with the actual folder path. Use permission-changing commands only when you understand the account names, inheritance and effects on every file and subfolder. For most home users, the File Explorer Security tab is easier to review.

Common mistakes to avoid

  • Using the same Windows account: another person who can sign in to that account can generally access its files.
  • Confusing hidden with protected: a hidden folder is still accessible to someone who knows where to look.
  • Removing inherited permissions blindly: this can break access for your own account or software.
  • Forgetting the EFS certificate: encrypted files can become inaccessible if the private key is lost.
  • Keeping the only BitLocker recovery key on the PC: you may need it precisely when the PC cannot be opened.
  • Assuming encryption protects an unlocked session: anyone using your already signed-in account may be able to open files available to that account.

Frequently asked questions

Can I put a separate password on one folder in Windows?

Windows does not provide a universal built-in folder-password prompt in File Explorer. You can restrict access by user account with NTFS permissions, use EFS on a supported edition, or encrypt the whole drive with BitLocker or Device Encryption.

Can I use EFS on Windows Home?

No. Microsoft’s current File Explorer instructions state that file encryption is not available in Windows Home. Some Home devices may support Device Encryption, which protects supported drives rather than an individual folder.

Can another administrator open a folder protected by NTFS permissions?

NTFS permissions help separate ordinary user accounts, but an administrator can generally take ownership or change permissions. Do not treat folder permissions as protection against a determined administrator.

Is a hidden folder secure?

No. Hidden status only affects normal display in File Explorer. It does not encrypt the files or require a password.

What happens if I lose my EFS certificate or BitLocker recovery key?

You may lose access to the protected data. Back up the EFS certificate and private key before using EFS, and keep the BitLocker recovery key somewhere safe and separate from the encrypted device.

Conclusion

The right way to protect a Windows folder depends on what you are trying to prevent. Use separate Windows accounts and carefully reviewed NTFS permissions to limit access between standard users. Use EFS for selected files on a supported Windows edition, and back up its certificate. Use BitLocker or Device Encryption when you need protection for a whole drive, especially if a device could be lost or stolen. Do not rely on hidden folders or the deprecated CACLS command as a substitute for encryption.

Official references

Archived screenshots from the original command-line tutorial

These original images are retained for historical context. They illustrate the earlier CACLS-based workflow and are not current instructions. Follow the updated methods above instead.

Nitish

My Parents call me Nishu, and I am registered in my death certificate as. . . Oh sorry, in my birth certificate as Nitish Andola. Friends Often Also Call Me as Andy. I hate people who act over smart. I don’t take lot of time to adjust with anybody. It’s my strength rather. I love to live with my friends. I love all those who feel comfortable with me and who make me feel comfortable with them… I always think positive, which have never helped me to achieve anything, but still it has become a habit. I forgive people soon, as I feel this life is too short and we have no time to prove others wrong. I love innovative things. And friends sometime call me as HiFi. I love to be Honest, and one thing I have observed about myself is, I am not a Fan, I believe there is good and bad in everyone and we need to embrace the good. I enjoy the company of people who are FREE. I too love to live freely! I like to interact with nature and am very much interested in adventure sports and fascinated by Astronomy. I respect each and every person on this earth, sometimes even things and like to be a free spirit. Some don't like that, but that's the way I am. I never think badly for anyone...

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button