Download the Script File (.txt)
Once downloaded, just update the password, rename the file, and place it in the folder you want to protect. Then, you’re all set to lock and unlock as needed.
To protect a folder on a Windows computer, you will need a batch script (.txt file) that is ready for download and configuration. That is all.
Here’s a step-by-step guide to setting up a password-protected folder using a batch file script.
Step 1: Download the Script
To make things easy, I’ve created a .txt file with the entire script written out. Download it here.
Once downloaded, open it in a text editor like Notepad.
Step 2: Set Your Password
Inside the script file, locate the line:
plaintext (txt) file
if NOT %pass%==YourPasswordHere goto FAIL
Replace YourPasswordHere with the password you want to use. For example, if your password is P@ssword123, change it to:
plaintext (txt) file
if NOT %pass%==P@ssword123 goto FAIL
Save and Rename the File
After setting your password, save the changes. Rename the file to FolderLocker.bat (the .bat extension turns it into a batch file), and place it in the folder you want to protect.
Step 4: Lock and Unlock the Folder
Create the Locker Folder: Double-click on FolderLocker.bat. It will automatically create a folder named Locker in the same directory if it doesn't already exist.
Add Files to the Locker: Place any files you want to protect inside this Locker folder.
Lock the Folder: Double-click FolderLocker.bat again and press Y when prompted to lock the folder. The Locker folder will disappear, securing your files.
Step 5: Access Your Files by Unlocking the Folder
To view or edit files in the Locker folder:
Double-click FolderLocker.bat.
Enter your password when prompted.
The Locker folder will reappear, giving you access to your files.
When you’re done, run the FolderLocker.bat again to re-lock the folder.
While this script is a helpful way to hide files, it doesn’t offer bulletproof protection. Someone with advanced knowledge could find a way to access it, so avoid using this for highly sensitive information. That said, it’s a great solution for everyday privacy needs!
Download the Script File (.txt)
Once downloaded, just update the password, rename the file, and place it in the folder you want to protect. Then, you’re all set to lock and unlock as needed.
Having a quick way to protect files on your computer can make a big difference for both privacy and organization.
This batch file is a straightforward, no-frills solution that anyone can use – no technical knowledge required!
Happy securing!
Most people don’t share because they feel that we bloggers don’t need their “tiny” social share. But I built this blog piece by piece, one small share at a time, and will continue to do so. So your support is really appreciated!
Pin it or share it with your favorite related Facebook Group!
The Share buttons are right below this message!
Or you can follow my other socials here: kaywat.me
Thank you so much!