Ever wanted to hide your personal files without installing third-party software? 🤔 A simple batch script can do the trick! In this blog, I'll explain how a Lock.bat file works, allowing you to create a hidden folder, store your files, and lock them away securely. Let's dive in! 🚀
📌 What Does the Lock.bat File Do?
This batch file acts as a locker system:
✅ When you double-click, it creates a folder named Locker 🗂️.
✅ You can store files inside this folder.
✅ Double-click again, and the Locker disappears! ✨
✅ Even if you enable "Show Hidden Files", the folder remains invisible! 😲
✅ Enter your password to unlock and retrieve your files 🔓.
🔍 Breakdown of the Batch Code
Now, let's understand how this script works, step by step:
1️⃣ Checking If the Folder Exists
- If a hidden "Control Panel" folder exists, it means the folder is locked. The script jumps to
UNLOCK
🔓. - If the Locker folder doesn't exist, it creates one (
MDLOCKER
) 📂.
2️⃣ Creating the Locker Folder
- If no folder is found, it creates a folder named Locker 🏗️.
3️⃣ Locking the Folder
- Asks the user: Do you want to lock the folder? (Y/N) ⌨️
- If "Y" is entered, it goes to
LOCK
🔐.
4️⃣ Hiding the Folder
- Renames the "Locker" folder to
"Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
. - This makes the folder invisible by disguising it as a Control Panel shortcut ⚠️.
- Applies hidden (+h) and system (+s) attributes, making it harder to find 👀.
5️⃣ Unlocking the Folder
- Asks for a password 🛑.
- If correct, it removes the hidden attributes and renames the folder back to "Locker" 🎉.
- If incorrect, it shows an error message (
FAIL
) ❌.
6️⃣ Handling Incorrect Passwords
- If the wrong password is entered, it displays an error and does not unlock the folder.
🛠️ How to Use This Batch Script?
1️⃣ Copy the above code into Notepad.
2️⃣ Save as Lock.bat
(make sure to select "All Files" as the file type).
3️⃣ Double-click Lock.bat
to create the Locker folder.
4️⃣ Place your files inside the Locker folder 🗂️.
5️⃣ Double-click again → Type Y → The folder will disappear! 💨
6️⃣ To unlock, double-click again, enter your password, and the folder reappears! 🎩✨
⚠️ Important Notes
🔹 This is a basic security trick, not an encryption tool.
🔹 Anyone familiar with batch scripts can open Lock.bat
and view your password.
🔹 Use this method only for casual file hiding, not for sensitive data 🛡️.
⚠️ Complete Batch code (Copy and paste for your .bat file)
🤔 Final Thoughts
This simple batch file is a great way to hide your files quickly without extra software! If you found this helpful, let me know in the comments! 🚀💬
Comments
Post a Comment