It has been more than 15 years since Microsoft released the first stable and consumer ready version of Windows, Windows XP. Recently, the Redmond Company released most advanced operating system for PC, Tablets, Windows 10. But the latest version of Windows doesnโt provide an easy way to password protect a folder in Windows. However, with a little effort and some code, you can lock any folder on your computer.
There are plenty of third-party software available on the Internet which will allow you to password protect a folder. So, if you donโt want to go to the hassle of enabling the coding method, you can always use a third-party software. One such good example is Free Hide Folder.
Read also: How to Show Hidden Files in Windows 10
How to password protect a folder in Windows 10
Create your own program
Open the location of the Folder which you want to hide and create a new text document. Right-click in the folder and Click on New and select Text Document
You donโt have to rename the file now, simply double-click on file to open it. Hereโs how it will look like.
Copy the following code and paste it in the text file as shown in the text 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%==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
See Image Below:
Natively, the Password will be Your-Password-Here, however, you can change it if you want to. Scroll down until you find the Your-Password-Here text.
Now, replace the password with a new password. In this example, the password is test.
Once you have changed the Password, Click on File in the top right menu and click on Save As. Donโt select the save options, because you need to change the extension of the file.
Click on Text Document next to the save as type and change it to the All Files
Name this file as FolderLock.bat and click on save to save this file on your computer.
Close the text document and open the folder location again. Here you will find a new folder Locker
Hold and drag all the folders and files that you want to password protect and drop them to the Locker folder.
Now, Double-click on the folder locker, this will be the file that you recently saved in the text document. It will ask you confirm the password protection and locking of this folder. Press Y from your keyboard to confirm it and close the folder.
Now, you will see the Lockerfolder’s vanished from the location.
If you want to show the locked folder again, double click on the FolderLocker again and it will ask you to enter the password. If you havenโt change the password, it will be Your-Password-Here, however, if you have changed the password, write down the new password and hit enter.
As soon as you close this program, you will again see the Locker folder on your computer.
Thatโs it! Although this method doesnโt provide a high-level security and it may have some breaches, but it is still better than nothing. If you find this method very lengthy, you can follow the alternative method to lock a folder in few seconds.
Using Free Hide Folder To Password Protect a Folder
This little utility is absolutely free of cost and works like a charm. The best part about this freeware is that it doesnโt come with the clumsy third party software. First of all, download and install the latest version of Free Hide Folder on your windows computer.
Click here to visit the main page of the developer.
On the main web page click on Download Now to download the software. Follow the on-screen instructions to install this software on your Windows computer.
After installing the software, a new pop-up will be shown asking you to enter the password. You can choose whatever password you like and click on OK.
On the main user-interface of the software, Click on Add to add the folders that you want to lock. You can select any folder from your computer.
Select a folder and click on OK again
Now, you will find the exact location of the folder and the status of it.
Now, if you go to that exact location of the folder, you will not find anything there. To unlock the folder, open Free Hide Folder again and enter the password.
Select the folder that wants to unhide and click on the unhide button.
Close the program and there you will find your folder again. Thatโs it, by this method you can easily lock and unlock different folders on Windows. You can also make a backup of the locked folders which will be saved in a private a protected format.
Free Hide Folder is the best free program to password protect a folder in Windows. There are also some best options to use including Folder Guard or Protected Folder