Technical Anshu
Tutorials Blog
🔧 How It Works

How the Folder Locker Trick Works Rename Hide and a Password Prompt

People imagine the locker script builds a tiny vault. It does not. It stacks three features Windows already has — rename, attributes, and a text comparison — and the stack only looks like a lock from the outside.

✍️ Technical Anshu🪟 Windows 10 / 11⏱️ 6 minute read
🎥 Watch the full video — the folder locking script shown step by step

Once you see the mechanism, you will never over-trust this trick again — and you will also understand exactly when it is the right tool. There are three moving parts. None of them is a security feature, and that is precisely why the combination produces privacy instead of protection.

Command Prompt — checking attributes (illustration)
C:\Users\Public> attrib Personal A SH C:\Users\Public\Personal A = ready to archive S = system H = hidden

The attrib command shows the truth: a locked folder is simply a folder carrying the S (system) and H (hidden) flags.

1

Layer One — the Rename That Changes What Explorer Sees

Windows decides how to display some folders by their names, not their contents. Certain system locations — Control Panel is the famous example — are really folders whose names end in a class ID, a long code in curly brackets. When the locker script renames your folder and attaches such an ID, Explorer stops treating it as a folder you can open and starts treating it as a system location. Double-clicking it no longer shows your files. Nothing was locked; the sign on the door was changed, and Explorer politely obeys the sign.

2

Layer Two — Hidden Plus System Attributes

The second layer is the attrib command, built into Windows for decades. The script runs the equivalent of attrib +s +h on the renamed folder. The H flag hides it from normal view. The S flag matters more: system-flagged items stay hidden even when a user turns on "show hidden files", because Explorer only reveals them when someone also disables "hide protected operating system files" — a setting most people never touch. Your files are fully present on the disk the whole time, readable by any program that asks for them by name.

3

Layer Three — the Password Prompt Is Just a Comparison

The third layer is the part that feels like security. The script asks for a password and compares your typing with a value stored in its own text — batch files do comparisons with a simple IF test. If the two match, the script renames the folder back and clears the attributes with attrib -s -h. If they do not match, it loops back or closes. Understand what this means: the check happens in a file you can open. There is no protected store, no hashing, no lockout after wrong tries. The prompt controls the script's behaviour, not access to the data — anyone can reach the data without the script's permission.

4

Why the Stack Still Has Honest Uses

None of this makes the trick useless. Most real-world " snooping" is not an attack at all — it is a family member opening the wrong folder, a colleague glancing at a desktop, a guest browsing while you make tea. Against that audience, rename plus super-hidden plus a prompt works completely, because those viewers never go looking behind the curtain. The failure only begins when the other person is motivated and even slightly technical. Knowing which audience you face is the whole skill — the companion pages on this set grade the common situations one by one.

🔴 Remember the shape of it: rename changes the sign, attrib draws the curtain, the prompt is a polite request. Polite requests stop polite people — and sometimes that is genuinely all you need.

🎥 Watch the Complete Video

See the locking script built and tested live, then decide honestly whether it is strong enough for your folder.

▶️ Watch Full Video
❓ Common Questions (FAQ)

Why does the locked folder not open like a normal folder?

Because the script renames it with a Windows class ID in its name. Explorer reads that name and treats the item as a system location such as Control Panel instead of a regular folder, so double-clicking no longer lists your files. The files themselves are unchanged and fully readable by other means.

Why can I not see the folder even with hidden files shown?

The script sets both the hidden flag and the system flag using attrib. Explorer keeps system-flagged items invisible unless you also turn off the separate setting that hides protected operating system files. That is why a locked folder looks completely gone to most users.

Is the password checked anywhere secure?

No. The password is stored as plain text inside the batch file, and the script simply compares what you type against that text. There is no encryption, no hashing and no limit on attempts. Anyone can open the script in Notepad and read the password directly.

This guide is based on the Technical Anshu folder locking video • Stuck on a step? Ask in the video comments — you will get a reply 🙏