Categories: Tech

How to Lock, Password Protect Folder in Windows 10

We all have our secret little worlds in which we don’t want others to intrude. Especially when it comes to computers and smartphones, we want to have some privacy. Luckily, there are all sorts of tools and features which let you protect your data and information from others. Windows 10 full release is just days away. Once you install it, you will need to ask about how to lock folder in Windows 10 to save data. The good news is that Microsoft has provided an easy, native feature using which you can password protect a folder in Windows 10 to protect data inside it. You would not need any third party app to do the job for you. Here’s how to password protect and lock a folder in Windows 10.

Lock Folder in Windows 10

Open the folder which you want to lock. This folder could have files, subfolders, videos, presentations, or any sorts of data you want to protect.

Right click inside the folder and select “New” to open the sub-list. Click on “Text Document” to make a new text document.

Open the text document and paste the below-mentioned text as it is.



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


After pasting the text, search the document where it’s written “Your-Password-Here”. Replace “Your-Password-Here” with the password you want to put on this folder to lock. Just backspace the phrase Your-Password-Here and type your new password.

Now click on the File menu right away without making any other changes in the file and click on “Save As’.

Remember to choose “All Files” from the “Save as Type” drop down menu while saving the file.

You must also give “FolderLocker.bat” name to the file. (Quotes not included).

After saving the file, click on this file (FolderLocker file).

You will see that a new folder with name “Locker” is created. This is the folder on which the lock has been applied. You can move all the items you want to protect in this folder. This folder will be password protected, the password being the one you set in the file.

Open the FolderLocker file again.

You will be asked whether you want to lock the folder. Type Y and press enter.

The folder in which you put your private contents will be vanished! No one will be able to see it unless you unlock it.

In order to unlock a locked folder, open the Open the FolderLocker file again, and type the password of the folder.

This is how to lock and password protect a folder in Windows 10. In case of any question, feel free to comment.

Images: blog.laptopmag

Fahad Saleem

Recent Posts

14 Ways To Make Telemarketing Work For Your Business In 2021

Most business consultants would agree that businesses can take advantage of the many benefits that…

1 day ago

How to Beat the Casinos with Their Own Money?

If there is one thing that everyone wishes to get aware of gambling is the…

1 day ago

Top 5 Tips for Successful Websites in 2021

First impressions are crucial, particularly as the modern consumer is bombarded with choices every minute.…

1 day ago

Learn to Win With Facebook Ads for eCommerce: Key Tips

Social media presence is a must for any business these days, as it connects 4.48…

1 day ago

3 Ways You Can Successfully Finance Your Own Real Estate Flipping Business

Starting a new business is tough. There are countless decisions to be made before you…

3 days ago

CISA Certification

Let IT and accounting practitioners achieve "Gold collar life" CISA ranks highest among the certificates…

3 days ago