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.
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
- Open File Explorer and locate the folder you want to protect.
- Right-click the folder and select Properties.
- Open the Security tab. This tab is used for NTFS permissions.
- Select Edit to review the users and groups listed for the folder.
- Select the account you want to configure. If it is not listed, use Add and enter the correct Windows account name.
- Allow only the access that account needs. For example, Read lets a user view files, while Modify also allows changes.
- 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.
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
- Open Settings and go to System > About.
- Check the Windows edition under Windows specifications.
- 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
- In File Explorer, right-click the folder and choose Properties.
- On the General tab, select Advanced.
- Select Encrypt contents to secure data, then choose OK.
- 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.
- 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:
- Sign in with an administrator account.
- Open Start and search for Manage BitLocker.
- Choose Turn on BitLocker beside the drive you want to encrypt.
- Follow the setup prompts and save the recovery key in a safe location separate from the computer.
- 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.
- Sign in with an administrator account.
- Open Settings > Privacy & security > Device encryption.
- 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
- Microsoft Learn: Access control overview
- Microsoft Support: How to encrypt a file or folder
- Microsoft Support: BitLocker Drive Encryption
- Microsoft Support: Device Encryption in Windows
- Microsoft Support: Back up your BitLocker recovery key
- Microsoft Learn: ICACLS command reference
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.


















