How to Password Protect a Folder in Windows 11 without Software

Do you want to put a password on a folder in Windows 11? If yes, here’s how to password protect a folder in Windows 11 without software and with software.

We all have some personal files and folders on our computers that we don’t want others to find out. “Private” or “Homework” folder, anyone? ????.

Many of us share our computers with kids or family, and we all know how pesky they can be. And if you want to password protect a file or completely lock a folder on your Windows PC without using any third-party software, you might wonder how to password protect a folder in Windows 11 without software. Isn’t it?

Worry not; today, we’ll answer all your questions regarding creating a password-locked folder for free (Yes, there is no need to invest in any folder lock software). So, if you are curious to discover, can I password protect a folder in Windows 11 operating system? And how to protect folder with password on Windows 11 computer, this is the perfect guide for you.

how to password protect a folder in windows 11
(Disclosure: This post contains affiliate links and images. I earn advertising/referral fees if you make a purchase by clicking them. There is no extra cost to you. See our full disclosure here. )

The process of password protecting a folder on Windows 11 is quite similar to the techniques followed on previous versions of Windows. So, just go ahead and take a look at how to lock a folder in Windows 11 with password using CMD. It’s a very straightforward method, and anyone with basic computer knowledge can so try it.

In this guide, we have also explained a second method where we are using a free, light-weight, and easy-to-use file lock software called “Easy File Locker” to protect private files and folders within a few simple clicks.

So, without further ado, let’s dive right in and learn how to make a folder in Windows 11 password protected.

Quick Note: We’ve tested these Windows 11 password protect folder methods internally. However, we’ve heard of some isolated complaints from people locking files using these methods and not being able to reaccess them. So, try playing around with some dummy files before encrypting your essential files. It’s just a precaution!

How to Password Protect a Folder in Windows 11 without Software

Windows 11 doesn’t allow locking of individual folders by default, but there are workarounds to it. You can easily lock a folder using the command prompt and by making an executable .BAT file. Follow these steps accurately, and you will be able to password protect folders in Windows 11 PCs:

Step (1): First of all, open the folder you want to password protect. Next, right-click on the empty space inside the folder and select the New > Text Document option.

how to password protect a folder

Step (2): Name the file something you’ll remember and then double-click on this text file to open it in the Notepad.

how to protect folder with password

Step (3): Now simply, copy and paste the following code:

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 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

Step (4): Now locate if NOT %pass%==your_password goto FAIL in the code you just pasted and replace your_password with a password of your choice. You can use Control + F to find it quickly.

password protect a folder in windows 11

Note: Use a single word password without any spaces as passwords with spaces have been known to cause issues down the line.

For the example, here’s how my code looks like after replacing it with the password (zdt2021):

Before: if NOT %pass%==your_password goto FAIL

After: if NOT %pass%== zdt2021 goto FAIL

Step (5): Now, from the top left, click on the File menu and then select the Save As option.

windows 11 password protect folder

Step (6): Next on the Save As window, change the File Name to FolderLock.bat and select Save as type as All Files. Also, make sure the Encoding is set to ANSI from the dropdown.

how to password protect a folder in windows 11 without software

Step (7): Once you have done all these changes, click on the Save button, and it will create a FolderLock BAT file.

Step (8): Now, simply double click on the FolderLock file, and a password lockable folder with the name Locker will be automatically generated.

password protect folders

Step (9): Place all your files and folders (that you want to password protect) in the Locker folder.

how to put a password on a folder

Step (10): After moving all the files and folders to the Locker folder, double-click on the FolderLock file. A command prompt window will appear. Here you have to just type Y to confirm the locking and then press Enter key.

how to password protect a folder on windows 11

Step (12): Once you press the Enter key, the Locker folder that was created will disappear automatically, and you’ll no longer see the folder.

password protect a folder in windows 11 using CMD

Step (13): Now, whenever you wish to open the Locker folder with all files and folders, double-click on the FolderLock BAT file, which will open a command prompt windows and ask you for your password.

how to lock a folder on windows 11

Step (14): So, just type in the password you set up before (in Step 4) and press Enter key to access your password protected folder in Windows 11.

Now you will be able to see and open the password protect folder and use the files inside it like any normal folder.

password protect folder in windows 11

You can follow these exact steps to lock or unlock any password protect folder as per your wish. This is how you can password protect folders on Windows 11 computers.

Do you know? How to Always Open Chrome in Incognito Mode on Windows 11

How to Password Protect a Folder in Windows 11 with Easy File Locker

If the first method seems unnecessarily cumbersome to password protect a folder on Windows 11 operating system, then this second method is perfect for you! Although you’ll need to install an external third-party software called Easy File Locker, which is a freeware (A software that’s free).

Easy File Locker is a light-weight, easy-to-use, and one of the best free file and folder lock software for Windows 11 PC. It allows you to lock files andfolders, hide files and folders, and password protected GUI and uninstaller.

So, now let’s check out how to lock a folder in Windows 11 with password using Easy File Locker software. Here we go:

Step (1): At first, download Easy File Locker software and install it on your computer. Once the software is installed, open it by double-clicking on its icon.

Step (2): Once the software opens, click on the Set Password icon (key symbol) and set a password of your choice. Once you’ve established a new password, move to the next step.

how to password protect a file in windows 11

Step (3): From the top menu icons list, click on the Add Folder icon (folder icon with a + sign beside it).

Step (4): A pop-up window will open, click on the three horizontal dots beside the Path section and select the folder you wish to lock. Next, uncheck the Accessible, Writable, and Deletable options and then click on the OK button.

can you password protect a folder in windows 11

Step (5): Once you click on the OK button, now the folder will be locked, unwritable and undeletable. And when someone tries opening the password protected folder, it won’t open and display the “You don’t currently permission to access this folder” or “You have been denied permission to access this folder” error message.

how to hide a folder in windows 11 with password

Thus, you can see how simple it’s to make a folder password protected in Windows 11 using the Easy File Locker freeware. Also, if you want to hide the password protected folder, then you can simply uncheck the Visible option (in Step 4), and the folder will disappear as well.

So, how will you unlock the password protected folder now?

Unlocking the folder and accessing files are quite simple if you know the password. Here’s how to unlock password protected folder in Windows 11 locked using Easy File Locker software:

Step (6): Open the Easy File Locker software, and it’ll ask you to enter the password. So, simply put in the Password to open the software.

how to make a folder password protected in windows 11

Step (7): Once you’re in the software, double-click on the password protected folder path under the Files & Folders section and then check the Accessible, Writable, and Deletable option. Finally, click on the OK button.

how to unlock a password protected folder in windows 11

That’s all! Now your folder is accessible again, and you will be able to access, edit, or delete any files or folders inside the folder according to your wish.

how to password protect folders in windows 11

And if you wish to relock the folder, simply uncheck the Accessible, Writable, and Deletable option again like we did in Step 4, and it will be locked.

Password Protect a Folder in Windows 11 – Final Words

I hope these two step by step methods helped you password protect files and folders on your Windows 11 computer. This guide must have definitely answered your question, how to password protect a folder in Windows 11 without software and with software, right?

There are a few other ways like locking drives using Bitlocker, Compression softwares like WinRAR or 7Zip, and more, but these are the ones that work well and have been personally tested by the team here at the office. 

If you’ve got any more questions about the newly launched Windows 11 operating system or want our help solving other issues, then please comment down below. We’ll undoubtedly help you out! Until we meet again, do svidaniya!

You may also be interested in checking out: