How to password protect a folder in Windows 10 (2024)

We all have computer files we'dlike to protect and keep completely private, but not everyone knows how to password-protect a file folder in Windows 10. Whether you'rehidingnotes from someone(spouse, child, co-worker) with access to your computer or (hopefully) something less drastic, you're allowed tohave some privacy.

Fortunately, in Windows 10, you cansecurely protect your private documents or files in a secret folderthat is password protected, and you can do it withoutbuying any additional software. Once you've created a new folder in Windows 10, here's how to password-protect it. You can never be too careful when it comes to privacy.

How to password protect a folder in Windows 10 (1)

A note before you start:

We've received comments about issues people have run into with this how-to. So, we went back and performed multiple rounds of testing internally and can now confirm that following this process closely, step-by-step, works — at least on our end.

But to be safe, you should trythis how-tousingfiles you can afford to lose, just in case the method doesn't work for you. Also, ensure you're keeping some record of the exact password you're using to lock your folder.

Please Note: If you lose the password, your files aregone, and since every computer is different,we can't deduceexactly whatwent wrong on your end.

Also, yes, the FolderLocker file can be reverse-engineered by someone who understands the process, but this isn't meant to keep tech-savvy folks out, just nosy family members who you don't trust.

Stay in the know with Laptop Mag

Get our in-depth reviews, helpful tips, great deals, and the biggest news stories delivered to your inbox.

Tips from readers:

  • Do not use a password with a space, as this may create an issue with the batch file.
  • Yes, filesplaced inyour locked folder can appear inRecent Files list in various apps, such as Microsoft Word.
  • Back up your backups! Here's how to change your password in Windows 10

Here's how topassword protect a folder in Windows 10, so you can fill it with files you want to keep secret — and how to lock it, open it and repeat.

How to lock a folder with apassword in Windows 10

1.Right-click inside the folder where the files you want to protect are located.The folder you want to hide can even be on your desktop.

How to password protect a folder in Windows 10 (2)

2. Select "New"from the contextual menu.

How to password protect a folder in Windows 10 (3)

3.Click on"Text Document."

How to password protect a folder in Windows 10 (4)

4. Hit Enter.It doesn't matter what thefile will be named. You can delete this text file once the lockable folder has been made.

How to password protect a folder in Windows 10 (5)

5.Double-click thetext file to open it.

6. Paste the belowtextinto the new document:

How to password protect a folder in Windows 10 (7)

cls

@ECHO OFF

title Folder Locker

if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK

if NOT EXIST Locker goto MDLOCKER

:CONFIRM

echo Are you sure u want to Lock the folder(Y/N)

set/p "cho=>"

if %cho%==Y goto LOCK

if %cho%==y goto LOCK

if %cho%==n goto END

if %cho%==N goto END

echo Invalid choice.

goto CONFIRM

:LOCK

ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

echo Folder locked

goto End

:UNLOCK

echo Enter password to Unlock folder

set/p "pass=>"

if NOT %pass%==Your-Password-Here goto FAIL

attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker

echo Folder Unlocked successfully

goto End

:FAIL

echo Invalid password

goto end

:MDLOCKER

md Locker

echo Locker created successfully

goto End

:End

7. Find where it says "Your-Password-Here" in the document.

How to password protect a folder in Windows 10 (8)

8.Replace "Your-Password-Here" with the password you want to lock the folder with.

How to password protect a folder in Windows 10 (9)

9.Click File.

How to password protect a folder in Windows 10 (10)

10. Select "Save As..."

How to password protect a folder in Windows 10 (11)

11.Click on the "Text Documents (*.txt)" menu bar that's next to "Save as type:"

How to password protect a folder in Windows 10 (12)

12. Select "All Files"

How to password protect a folder in Windows 10 (13)

13.Change the file name to "FolderLocker.bat"

How to password protect a folder in Windows 10 (14)

14.Click "Save."

How to password protect a folder in Windows 10 (15)

15.Double-click FolderLocker.

How to password protect a folder in Windows 10 (16)

The Locker folderhas been generated!

How to password protect a folder in Windows 10 (17)

16. Fill the Locker folder with the items you want to protect.

How to password protect a folder in Windows 10 (18)

17. Open the FolderLocker file, because it's time to lock that folder up!

How to password protect a folder in Windows 10 (19)

18. Type "Y" into the screen.

How to password protect a folder in Windows 10 (20)

19.Click Enter, and the Folder Locker window will disappear, along with the Locker folder itself. Your secrets are now safe.

How to password protect a folder in Windows 10 (21)

To unlock the folder, double-click "FolderLocker" to open it.

How to password protect a folder in Windows 10 (22)

Enter the password you entered in Step 8, and click Enter.

How to password protect a folder in Windows 10 (23)

How to password protect a folder in Windows 10 (24)

The Locker folder is back. You can openit to find your hidden files. RepeatSteps 17, 18 and 19 to lock the folder again.

How to password protect a folder in Windows 10 (25)

How to password protect a folder in Windows 10 (26)

To learnmore about how to make use of your laptop, check out our guide for what to do as you set up your new laptop. We've also got instructions if you're trying to figure out how to reset Windows 10 PCsand how to reset your password in Windows 10. Lastly, tired of Windows? We've got a guide that answers the relatively new question of "Should I Buy a Chromebook?"

If you find yourself running into serious Windows issues, you might need to take advantage of that extended warranty and give tech support a jingle. Check out our Tech Support Showdown to see how each laptop manufacturer stacks up on the back end.

Windows 10 Security and Networking

  • Previous Tip
  • Next Tip
  • Use the Windows 10 parental controls
  • Find your MAC address
  • Turn your Windows PC into a Wi-Fi hotspot
  • Password protect a folder
  • Create a guest account in Windows 10
  • Enable windows Hello fingerprint login
  • Set up Windows Hello facial recognition
  • How to restrict Cortana's ever-present listening in Windows 10
  • Automatically lock your PC with Dynamic Lock
  • Blacklist non-Windows Store apps
  • Find saved Wi-Fi passwords
  • Set up a metered Internet connection
  • Use Find My Device
  • Stream XBox One games
  • All Windows 10 tips
  • Map a network drive
  • Create limited user accounts
  • Set time limits for kids
  • Pin people to your taskbar
How to password protect a folder in Windows 10 (2024)

FAQs

Why can't I lock my folder in Windows 10? ›

Although Windows 10 doesn't have the option to protect folders and files with a password, it doesn't mean your data isn't secure. One of the reasons why you can't apply a password to a folder is that your account is already protected from unauthorized access with a password (and even encryption if you use BitLocker).

How do I protect a folder with security? ›

Right-click on the folder or file and select Properties. Open the General tab, and select the Advanced button. Check the box next to Encrypt contents to secure data. After checking the box, select Apply and click OK.

Why am I not able to Encrypt a folder? ›

The encryption file system might be disabled by default. This will cause the encryption option to be greyed-out. Users will have to enable it manually using the Windows registry.

Can you password protect a folder in one drive? ›

You can do this on the OneDrive website or in the OneDrive app depending on what platform you're using. Password protect the folder: From the Home screen, right-click on the new folder and select the “Password Protect” option. You'll be asked to enter a password, which will be used to secure your folder.

What does it mean when a folder is locked? ›

File locking is a feature that prevents a file from being edited.

Why does a folder have a lock on it? ›

The lock icon on a folder typically indicates that the folder is read-only or has restricted access. To unlock the folder, you will need to check the folder permissions and change them if necessary.

How do I prevent others from accessing my files in Windows 10? ›

In Windows 10, go to Start > Settings > Privacy > File system and make sure Allow apps to access your file system is turned Off.

How to make a folder not accessible to others? ›

Open or select the file or folder. Find the person you want to stop sharing with. Remove access. Click Save.

How do I create folder permissions? ›

In the Folder Pane, right-click the public folder to set permissions, and then click Properties. Note: If you can't see Public Folders in the Folder Pane, press Ctrl+6. On the Permissions tab, under Permissions, choose a permissions level from the list.

Why can't I Encrypt my folder? ›

Way 1: Fix Encrypt Folder Greyed out in Windows Services

You need to go to Windows services and check If the EFS service is stopped or disabled. If yes, just find out the Encrypting File System service and set it automatically start. In this way, the encryption option may be available again.

How to access secure folder on PC? ›

You can usually find the Secure Folder icon in the app drawer or on the desktop. Step 2: Enter your unlock method, such as a password, fingerprint, or PIN, to access the Secure Folder. Step 3: Once inside the Secure Folder, locate the files or folders that you want to back up.

Top Articles
Latest Posts
Article information

Author: Maia Crooks Jr

Last Updated:

Views: 6177

Rating: 4.2 / 5 (43 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Maia Crooks Jr

Birthday: 1997-09-21

Address: 93119 Joseph Street, Peggyfurt, NC 11582

Phone: +2983088926881

Job: Principal Design Liaison

Hobby: Web surfing, Skiing, role-playing games, Sketching, Polo, Sewing, Genealogy

Introduction: My name is Maia Crooks Jr, I am a homely, joyous, shiny, successful, hilarious, thoughtful, joyous person who loves writing and wants to share my knowledge and understanding with you.