You are on page 1of 19

3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Subscribe

TRENDING Best laptops HP Envy 14 review Surface Pro 8 PS5 review Xbox Series X review

LaptopMag is supported by its audience. When you purchase through links on our site, we may earn an a liate commission. Learn more

How To Password Protect a Folder in Windows 10


By LAPTOP Sta August 19, 2019

We all have computer les we'd like to keep secret from the world, but not everyone knows how to password protect a folder in Windows 10.
Whether you're hiding notes from someone with access to your computer or (hopefully) something less drastic, you're allowed to have some
privacy. Fortunately, in Windows 10, you can tuck those unmentionable plans or les in a secret folder that is password protected, and you can
do it without buying any additional software. Once you've created a new folder in Windows 10, here's how to password protect it.

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 con rm that following this process closely, step-by-step, works — at least on our end.

But just to be safe, you should rst try this how-to using  les that you can a ord to lose, just in case the method doesn't work for you. Also,
make sure you're keeping some record, somewhere, of the exact password you're using to lock your folder. If you lose the password, your les
are gone, and since every computer is di erent, we can't deduce exactly what went wrong on your end.

Also, yes, the FolderLocker le 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.

Tips from readers: 

Do not use a password with a space, it may create an issue with the batch le.
Yes, les placed in your locked folder can appear in Recent Files list in various apps, such as Microsoft Word. 

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

How To Lock a Folder With a Password in Windows 10

https://www.laptopmag.com/articles/password-protect-folder-windows-10 1/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

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

Egyptian Cotton Fitted Beds...

Enjoy smooth feel with Livpure Sleep’s Egyptian Cotton Fitted Bedsheet that comes with ...

Ad

MORE: How to Change Your Password in Windows 10

2. Select "New" from the contextual menu. 

3. Click on "Text Document."

https://www.laptopmag.com/articles/password-protect-folder-windows-10 2/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Subscribe

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

5. Double-click the text le to open it.

6. Paste the below text into the new document:

cls

@ECHO OFF

title Folder Locker

https://www.laptopmag.com/articles/password-protect-folder-windows-10 3/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

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


Subscribe

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.

https://www.laptopmag.com/articles/password-protect-folder-windows-10 4/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Subscribe

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

9. Click File.

10. "Select Save As..."

https://www.laptopmag.com/articles/password-protect-folder-windows-10 5/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

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

12. Select "All Files"

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

https://www.laptopmag.com/articles/password-protect-folder-windows-10 6/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Subscribe

14. Click "Save."

15. Double-click FolderLocker.

The Locker folder has been generated!

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

https://www.laptopmag.com/articles/password-protect-folder-windows-10 7/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Subscribe

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

18. Type "Y" into the screen.

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

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

https://www.laptopmag.com/articles/password-protect-folder-windows-10 8/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Subscribe

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

The Locker folder is back. You can open it to nd your hidden les. Repeat Steps 17, 18 and 19 to lock the folder again.

To learn more 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 gure out how to reset Windows 10 PCs and how to reset your password in Windows 10. Lastly, tired of

https://www.laptopmag.com/articles/password-protect-folder-windows-10 9/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Windows? We've got a guide that answers the relatively new question of "Should I Buy a Chromebook?"
Subscribe

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

MORE ABOUT... LATEST

Windows 10 update fixes critical File Explorer bug that causes Microsoft Teams update makes collaborating even easier 
poor performance 

SEE MORE LATEST 

https://www.laptopmag.com/articles/password-protect-folder-windows-10 10/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Subscribe

https://www.laptopmag.com/articles/password-protect-folder-windows-10 11/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Subscribe

MOST POPULAR

https://www.laptopmag.com/articles/password-protect-folder-windows-10 12/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Subscribe

How to replicate the best Windows 10 features on a MacBook


By Shubham Agarwal March 06, 2021

Best college laptops in 2021: Best laptops for students


By Phillip Tracy March 03, 2021

https://www.laptopmag.com/articles/password-protect-folder-windows-10 13/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Subscribe

Windows 10 update will hide this useless feature — it won't be missed


By Sean Riley February 26, 2021

Watch out Apple M1! Samsung and AMD may have a killer Windows on ARM solution
By Sean Riley February 26, 2021

https://www.laptopmag.com/articles/password-protect-folder-windows-10 14/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Windows 10 update improves copy-and-paste in a big way Subscribe

By Phillip Tracy February 22, 2021

Windows 10 update causes dreaded Blue Screen of Death — Here's how to x it


By Darragh Murphy February 09, 2021

Windows 10 adds support for running multiple Android apps — if you have the right phone
By Sean Riley February 03, 2021

https://www.laptopmag.com/articles/password-protect-folder-windows-10 15/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Subscribe

Windows 10 Insiders update brings a time-saving feature to the taskbar — Here's how to get it
By Sean Riley January 08, 2021

How to take a screenshot in Windows 10


By Matthew Ramirez December 27, 2020

https://www.laptopmag.com/articles/password-protect-folder-windows-10 16/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Subscribe

Windows 10 update adds useful features for power users — what you need to know
By Phillip Tracy December 02, 2020
Advertisement

BE IN THE KNOW

Get instant access to breaking news, the


hottest reviews, great deals and helpful
tips.

Your Email Address

Contact me with news and o ers from other


Future brands

Receive email from us on behalf of our trusted


partners or sponsors

SIGN ME UP

No spam, we promise. You can unsubscribe at any time and


we'll never share your details without your permission.

Advertisement

https://www.laptopmag.com/articles/password-protect-folder-windows-10 17/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Subscribe

MORE FROM LAPTOP MAG...

1 25 U.S. States are working on Right to Repair Laws: What you need to know

2 Surface Pro 7 with keyboard bundle hits new price low of $559

3 MacBook Pro M1 hits lowest price ever in never-before-seen deal

4 The best 4K laptops in 2021

5 Best cheap MacBook deals of March 2021

Advertisement

https://www.laptopmag.com/articles/password-protect-folder-windows-10 18/19
3/17/2021 How To Password Protect a Folder in Windows 10 | Laptop Mag

Subscribe

Related products

Microsoft Windows...
₹7,000

VIEW

at Amazon

Laptop Mag is part of Future US Inc, an international media group and leading digital publisher. Visit our corporate site.

Terms and conditions

Privacy policy

Cookies policy

Accessibility Statement

About us

Archive

© Future US, Inc. 11 West 42nd Street, 15th Floor, New York, NY 10036.

https://www.laptopmag.com/articles/password-protect-folder-windows-10 19/19

You might also like