cruntrix
APPSHOW-TO

How to password-protect a folder on Windows without extra software

Windows has no 'add a password' button for folders. Here's the closest built-in option, a locked virtual drive, and what to do on Windows Home.

Research-based: specs + published reviews

A small blue padlock resting on a dark laptop keyboard

Short answer: you can’t password-protect a folder on Windows the way you’d lock a zip file. There’s no “add a password” option anywhere in File Explorer. The closest built-in option is a small virtual drive locked with BitLocker: a single file that opens as a drive when you type the password and locks again when you eject it. It works only on Windows 11 Pro, Enterprise and Education.

On Windows 11 Home, your Windows sign-in is the lock, and there are a couple of honest ways to make it stronger. What doesn’t work is the “folder locker” batch file found all over the web. More on that below.

First, check which Windows you have

Open Settings → System → About and look at Edition under Windows specifications. If it says Pro, Enterprise or Education, use the first method. If it says Home, skip to the Home section.

How to password-protect a folder on Windows 11 Pro

This creates a “vault”: a file such as Vault.vhdx that behaves like a USB drive. Inside it, BitLocker encrypts everything, and nothing can be read without the password. Setting it up takes about ten minutes.

  1. Open Disk Management. Right-click the Start button and choose Disk Management.
  2. Create the virtual drive. Click Action → Create VHD. Choose Browse, pick a folder and type a name such as Vault. Set a size a little bigger than the files you’ll keep (10 GB is plenty for documents), choose VHDX and Dynamically expanding, then click OK.
  3. Initialise it. A new disk appears at the bottom marked Not Initialized. Right-click its name, choose Initialize Disk, keep GPT and click OK.
  4. Format it. Right-click the Unallocated space next to it, choose New Simple Volume and click Next through the wizard. Give it a drive letter and the volume label Vault, keep NTFS, and click Finish.
  5. Turn on BitLocker. In File Explorer, right-click the new Vault drive, choose Show more options → Turn on BitLocker, then tick Use a password to unlock the drive and type a strong password.
  6. Save the recovery key. Choose to save it to your Microsoft account, to a file or to paper. Don’t save it inside the vault itself.
  7. Start encryption. For a new, empty drive, Encrypt used disk space only is fine. Pick Compatible mode if you might open the vault on an older PC; otherwise choose New encryption mode. Click Start encrypting.
  8. Lock and unlock it. To lock the vault, right-click the drive in File Explorer and choose Eject. To open it again, double-click the .vhdx file to mount it, open the drive and type your password.

Ejecting is what locks it. If you leave the drive mounted and unlocked, anyone using your signed-in PC can open it, just like an unlocked USB stick.

The other Pro option: encrypt a folder with EFS

Windows Pro also has EFS, the Encrypting File System. It’s quicker, but it isn’t a password in the usual sense.

  1. Right-click the folder, choose Properties, then click Advanced on the General tab.
  2. Tick Encrypt contents to secure data, click OK, then Apply. Choose to apply it to the folder, subfolders and files.
  3. When Windows offers to Back up your file encryption key, do it, and keep the backup on a USB stick or in a safe place.

EFS ties the encryption to your Windows account. You don’t type a separate password; the files open automatically whenever you’re signed in. It stops other user accounts on the PC, and anyone who removes the drive, from reading them. It doesn’t stop someone who sits down at your unlocked PC. If the tick box is greyed out, you’re on Windows Home, or the drive isn’t formatted as NTFS.

What can you do on Windows 11 Home?

Home has neither BitLocker drive encryption nor EFS. Microsoft says BitLocker Drive Encryption is available on Pro, Enterprise and Education only. Home gets a simpler feature, Device Encryption, which encrypts the whole drive automatically. That protects your files if the laptop is stolen, but it does nothing to stop other people who use the same PC.

Three honest options:

If extra software is acceptable after all, a free archiver such as 7-Zip can create an encrypted, password-protected archive. That’s the usual recommendation for Home users who want a true per-folder password.

Why the “folder locker” batch file doesn’t protect anything

Many guides suggest pasting a script into Notepad and saving it as locker.bat. It renames your folder and marks it hidden and protected. That’s all. The files aren’t encrypted. The password is stored as plain text inside the script, which anyone can open in Notepad. And anyone who turns on hidden files can browse straight in. Technobezz sums it up: these tricks change what’s visible without encrypting anything.

Common mistakes

Once your private files are locked away, you can tidy the rest automatically with our guide to organising files on your PC with zero coding. For files you keep in the cloud, our Google Drive vs OneDrive vs Dropbox comparison covers how each one protects them.

FAQ

What happens if I forget the password?

For a BitLocker virtual drive, you can unlock it with the 48-digit recovery key you saved when you set it up. Without the password or the recovery key, the files can't be recovered. That's the point of encryption, so save the key somewhere other than the locked drive.

Can I put the virtual drive file in OneDrive or on a USB stick?

Yes. The .vhdx file is just a file, and it stays encrypted wherever you copy it. Eject the drive before you copy or sync it, so you're not copying it halfway through a change.

SOURCES

Apps DeskCruntrix's app guides, alternatives and fixes, researched from official documentation and edited by Nate Arden.