A simple and effective Windows batch script to lock and protect your important folders with password protection.
Folder Locker is a lightweight Windows utility that provides basic folder protection through password authentication and system-level hiding techniques. This tool is designed for personal use to secure sensitive files and folders on your local system.
- Protect personal files from casual access
- Hide important folders from plain view
- Provide a simple password-based security layer
- No complex installation or configuration required
- Language: Windows Batch Script (.bat)
- Platform: Windows (All versions)
- Dependencies: Built-in Windows commands only
- Security: Password protection + system folder disguise
- Lines of Code: ~109
- File Size: < 5KB
- Dependencies: 0 (Zero external dependencies)
- License: Personal Use
- Password Protection: Secure your folders with a customizable password
- Hidden Protection: Locks folders by making them appear as system folders
- Easy to Use: Simple batch script with user-friendly interface
- No Installation Required: Works on any Windows system
- Lightweight: Minimal resource usage
The Folder Locker uses a clever technique to hide your folders:
- Renames the target folder to a special Windows system folder name
- Sets hidden and system attributes
- Requires password to unlock and restore normal access
lock/
├── lockjhs.bat # Main locker script
├── Locker/ # Created folder for storing files
└── README.md # This file
- Run
lockjhs.batfor the first time - A "Locker" folder will be created automatically
- Place your important files inside the "Locker" folder
- Double-click
lockjhs.bat - Click "Y" when prompted to confirm locking
- Your folder will be hidden and protected
- Double-click
lockjhs.bat - Enter the password when prompted
- Your folder will be restored and accessible
Default Password: Password89
To change the default password:
- Open
lockjhs.batin a text editor - Find the line:
if NOT %pass%==Password89 goto FAIL - Replace
Password89with your desired password - Save the file
- Backup: Always keep backups of important files
- Password: Remember your password - there's no recovery option
- Windows Only: This script works only on Windows systems
- Administrator Rights: May require administrator privileges on some systems
- Uses VBScript for password input masking
- Implements confirmation dialogs
- Handles folder attributes (hidden, system)
- Uses Windows special folder names for camouflage
- Password-protected access
- Hidden folder attributes
- System folder disguise
- Access control modifications
Folder not unlocking:
- Ensure you're using the correct password
- Check if the script has proper permissions
Script not running:
- Ensure you're on a Windows system
- Try running as administrator
- Check if antivirus is blocking the script
Files not visible:
- The folder is intentionally hidden when locked
- Use the unlock process to restore visibility
If you encounter any issues or have questions:
- Check the troubleshooting section above
- Ensure you're following the usage instructions correctly
- Verify your Windows system compatibility
Developer: Janith Suraweera
Project: Folder Locker
Language: Windows Batch Script
Version: 1.0
This project is provided as-is for educational and personal use. Use responsibly and ensure you have proper authorization to lock folders on your system.
- v1.0: Initial release with basic locking functionality
- Password protection
- Hidden folder implementation
- User-friendly interface