How to password protect a folder on Windows 11 without Installing any third-party apps

Usually, users have several files on their Windows 11 computers, which contain sensitive information like their home addresses, bank account numbers, passwords, and others. Therefore, it is advisable to keep such files hidden from prying eyes.

One way to keep secure confidential files is to save them in a locked folder. That way, people can get access to a user’s computer but they won’t be able to access the sensitive files in their locked folder on Windows 11.

Windows 11 Guide Folder Locked

How to Lock a Folder in Windows 11

  1. Open the folder you want to lock.Windows 11 folder lock 1
  2. Inside the files folder right-click in an empty space > new > text document.Windows 11 folder lock 2
  3. A text document will appear > right-click on it > rename it whatever you’d like.Windows 11 folder lock 3
  4. Open the text document > in which we will paste a locking code.Windows 11 folder lock 4
  5. Open the link given here ( Github ) and select all and press CTRL key + C on the keyboard to copy.Windows 11 folder lock 5
  6. Go back text document and press the Ctrl key + V on the keyboard to paste the code into the text document.Windows 11 folder lock 6
  7. Inside the code, there is a code saying “YOUR-PASSWORD”.Windows 11 folder lock 7
  8. Select that part of the code and add a password of your own.Windows 11 folder lock 8
  9. Click on File > Save as.Windows 11 folder lock 9
  10. At the end of the file name, add (dot)bat > change text document to all files > save.Windows 11 folder lock 10
  11. Close the text document.Windows 11 folder lock 11
  12. A new batch file will appear > double click on the batch file > a new folder will appear as “Private”.Windows 11 folder lock 12
  13. Now you can add the files you want to hide or lock inside the folder. Select the files > right-click on it > click on the scissor icon to cut/move the file.Windows 11 folder lock 13
  14. Open the private folder > right-click > paste the files.Windows 11 folder lock 14
  15. Go back to the folder where the batch file is located > double click on the bat file.Windows 11 folder lock 15
  16. The command prompt will appear > type the capital letter Y > press Enter on the keyboard.Windows 11 folder lock 16
  17. > the file will be locked and hidden which contains your files, documents, etc.Windows 11 folder lock 17
  18. Double click on the batch file > the command prompt will appear asking for password > simply enter the password and press Enter on the keyboard.Windows 11 folder lock 18
  19. And the files containing your belongings re-appear.Windows 11 folder lock 19
  20. Remember to double-click on the batch file to lock your folder before closing it.

In case you want to delete the batch file and no longer need the folder locker. Here is how you can remove it:

  1. Right-click on the batch file > delete the file.Windows 11 folder lock 20
  2. Open private file > select all files > press Ctrl key + X on the keyboard to cut/move the files.Windows 11 folder lock 21
  3. Go back to the file >  right-click > paste it.Windows 11 folder lock 22
  4. Right-click the “Private” folder > delete.Windows 11 folder lock 23

Read more:

About the Author

I'm a passionate tech enthusiast here to break down the latest trends, gadgets, and software. Whether you're a seasoned programmer or just curious about the digital world, I aim to deliver insightful articles that are both informative and engaging.