How to Password Protect a Folder in Windows 10

Currently, all of our information is digital – from photos to our banking information and everything in between. Among these files, we all have sensitive information that, if seen by others, can cause irreparable harm. Windows 10 doesn’t make it easy to password protect a folder, but we can tell you here how to protect your most sensitive information.

1. Open the folder you want to password protect.

How to protect password-protected folder in Windows 10

2. Right-click inside the folder to open the context menu.

 How to password protect a folder in Windows 10

3. Select New from the context menu.

How to password protect a folder in Windows 10

4. Click Text Document from the context menu that pops up.

How to password protect folder in Windows 10

5. Rename the new text document to “Locked Folder” and press Enter.

How to password protect a folder in Windows 10

6. Open the “LockedFolder” text document.

How to password protect a folder in Windows 10

7. Copy the highlighted code below.

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%==INPUT 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

8. Paste the code into the “Locked Folder” text document.

Like password protect a folder in Windows 10

9. In the “Locked Folder” text document find the phrase “INPUT YOUR PASSWORD HERE”.

How to password protect a folder in Windows 10

10. Replace “INPUT YOUR PASSWORD HERE” with a password of your choice. Do not use spaces in your password.

How to password protect a folder in Windows 10

11. Click File in the text document header menu.

How to password protect a folder in Windows 10

12 . Select “Save As” from the drop down menu.

As password protect a folder in Windows 10

13. Change the file name “LockedFolder” to “LockedFolder.bat”.

How to password protect a folder in Windows 10

14. In the “Save as type” dropdown select “All files”.

How to password protect a folder in Windows 10

15.Click Save.

How to password protect a folder in Windows 10

16. Double-click “LockedFolder.bat”; Windows batch file.

How to password protect a folder in Windows 10

17. You will now see a new folder named “Locker”. Select, drag and drop the files you want to lock in the Locker folder.

How to password protect a Folder in Windows 10

18. Right click on the Windows batch file named “LockedFolder”.

How to password protect a folder in Windows 10

19. Select “Open” from the context menu.

How to protect password-protected folder in Windows 10

20. Enter “Y” in the pop-up CMD window, and then press Enter on your keyboard. Your locked folder and its contents are now hidden.

How to password protect a folder in Windows 10

21. To unlock and make the folder visible again, double-click on the Windows command file “Locked Folder”.

22. Enter the password you created earlier and press Enter on your keyboard when asked to unlock the folder.

How to password protect a folder in Windows 10

Repeat these steps again to hide and password protect a folder:

24. Double-click the batch file “LockedFolder.bat” Windows.

How to password protect a folder in Windows 10

25. Type “Y” in the CMD popup and then press Enter on your keyboard.

How to password protect a folder in Windows 10

@top-advice.com

Rate article
TOP ADVICE
Leave a Reply