How to Create a Secured and Locked Folder in Windows 10


When you share a computer with someone, there is always a risk of human error—the unintentional deletion of an important file, the incorrect editing of a sensitive file, the accidental sharing of a private folder, etc.

Sometimes you are your own worst enemy Sharing confidential information by email with the wrong recipients is an unfortunate, if not, entirely too frequent, cause of data breaches.

One way to deal with these risks is to provide codes to your most important files, one-by-one. Sharing a computer becomes a worry-free scenario after that, and sending email attachments would be less of an anxiety-inducing experience. And while the requirement to enter a password every time you open the file can slow you down a little, the peace of mind is absolutely worth it. Just remember to use strong passwords all the time.

How To Lock a Folder With a Password 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.


2. Select “New” from the contextual menu.


3. Click on “Text Document.”


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


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


6. Paste the below text into the new document:



title Folder Locker

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



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.



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

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

echo Folder locked

goto End


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


echo Invalid password

goto end


md Locker

echo Locker created successfully

goto End


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


Replace “Your-Password-Here” with the password you want to lock the folder with.


9. Click File.


10. “Select Save As…”


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


12. Select “All Files”


13. Change the filename to “FolderLocker.bat”


14. Click “Save”.


15. Double-click FolderLocker.


You’ve now created a Locked folder.


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


17. Open the FolderLocker file, 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.


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


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



Other Third-Party Software To Password Protect Folders

If you are using Windows 10 Home (meaning EFS and built-in folder encryption is not available to you), you will need to use third-party applications to secure your folders.

A variety of antivirus software packages provide encrypted file storage functionality, including Bitdefender Total Security. Alternatively, you might use dedicated file encryption applications such as AxCrypt, which provides a Secured Folders function. This is a premium feature, but you can try the 30-day free trial software.

  • AxCrypt keeps track of these folders, encrypting any files that are added to them. This ensures that only files within the folder can be accessed. You can decrypt files using your own encryption password, although you will also need an AxCrypt account to use the software. However, passwords are stored locally.
  • To use AxCrypt, you would need to install the software first and build a new account when you launch it first. When launched, press the Secured Folders tab.
  • When encrypted, you will be able to access the folder, but any files stored within the folder will be encrypted with the.axx file suffix. Trying to open it would open the AxCrypt client, where you would first need to use your decryption password to decrypt files and make some adjustments. If you have already signed up, you won’t need to enter your password to edit any files.
  • If you want to decrypt your files later, right-click on the encrypted folder and press Axcrypt > Decrypt. This will disable encryption in that folder and remove all existing encryption.
  • Secure and Lock Folders in Windows 10

With built-in folder encryption and a range of third-party methods available, it’s never been easier to lock a folder by password and secure your most valuable files in Windows 10.

If you want to take it further, nothing is keeping you from encrypting all your files, whether it’s online or offline. This is a particularly good idea for online data, especially if you find out that a site or service you use has suffered a breach of data.

Scroll to Top