Short answer: a popular Notepad batch script can hide and "lock" a folder behind a password for casual privacy. It is a fun trick that stops a nosy sibling or coworker, but it is NOT real security, the files are recoverable. For anything genuinely private, use encryption. Here is the trick and, more importantly, the safe alternative.
The Notepad folder-lock script
- Open Notepad and paste this script (change YOURPASSWORD to your own):
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 Lock the folder? (Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==N goto END
: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
set/p "pass=>"
if NOT %pass%==YOURPASSWORD goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked
goto End
:FAIL
echo Wrong password
goto end
:MDLOCKER
md Locker
echo Locker created
goto End
:End
- Save it as Locker.bat (choose All files).
- Run it once; a folder named Locker appears. Put your files in it.
- Run the .bat again and choose Y to lock/hide it; run again and enter the password to unlock.
Why this is NOT secure
Be clear-eyed about what this does: it hides the folder and gates it behind a password check in plain text. Anyone can:
- Open the .bat in Notepad and read the password directly.
- Turn on "show hidden and system files" to reveal the folder.
- Access the files, which are not encrypted at all.
It only stops someone who does not know the trick. Treat it as a curtain, not a lock.
The real way: encrypt
| Method | Protection |
|---|---|
| Notepad lock | Casual hiding only |
| VeraCrypt container | Strong encryption, free |
| BitLocker (Windows Pro) | Full-drive encryption |
The non-obvious tip: match the tool to the stakes
For hiding a surprise gift list from a family member, the Notepad trick is fine and fun. For financial documents, IDs, or anything you would truly not want exposed, only real encryption protects you, put those in a VeraCrypt container or a BitLocker-encrypted drive. Never rely on the Notepad lock for genuinely sensitive data; its password is literally sitting in the file.
Frequently asked questions
How do I lock a folder using Notepad?
Paste the folder-locker batch script into Notepad, set your password, save it as Locker.bat, and run it to create, lock and unlock a Locker folder.
Is the Notepad folder lock secure?
No. The password sits in the .bat in plain text, the folder is only hidden, and files are not encrypted. It stops only someone who does not know the trick.
How do I actually protect a private folder?
Use real encryption: a VeraCrypt container (free) or BitLocker on Windows Pro, which keep files unreadable without the password even if found.
When is the Notepad lock good enough?
For casual privacy, like hiding a surprise from family. For financial documents, IDs or truly sensitive data, use encryption instead.
Comments
Post a Comment
If you have anything in mind, please let me know!