Securing sensitive files and folders is essential for protecting your data from unauthorized access. In Windows 10, you can lock a folder with a password for added security. In this blog post, we will guide you through the steps to create a password-protected folder in Windows 10.
Method 1: Using a Batch Script
This method uses a batch script to create a password-protected folder. Follow these steps:
- Create a new text document in the desired location.
- Open the text document and paste the following code:
<sourcecode> @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 you 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 </sourcecode>
Note: Replace <your_password>
with your desired password.
- Save the file with the extension
.bat
instead of.txt
(e.g.,locker.bat
). - Double-click the
locker.bat
file to run the script. It will create a new folder named “Locker.” - Place your files and folders inside the “Locker” folder.
- Double-click the
locker.bat
file again and press “Y” followed by “Enter” to lock the folder. - To unlock the folder, double-click the
locker.bat
file, enter your password, and press “Enter.”
Method 2: Using a Third-Party Software
Another easy way to lock a folder in Windows 10 is by using third-party software. There are various folder-locking applications available online, such as:
These applications provide a more user-friendly interface with additional features like drag-and-drop and file encryption. Download your preferred software, install it, and follow the on-screen instructions to lock your folders.
Conclusion
Securing your sensitive files and folders with a password is a simple yet effective way to protect your data from unauthorized access. In this blog post, we discussed two methods to lock a folder in Windows 10 – using a batch script and third-party software. Choose the method that suits your needs and keep your information safe.