How to Create a Password-Protected Folder in Windows with One Click ๐Ÿ”’

Want to hide your personal files in Windows without installing any fancy software or spending a dime? Here’s a super simple, super effective trick using a batch script (.bat) that lets you create a folder called Private and lock or unlock it with a password in just a few clicks. 


Whether it's your personal photos, work documents, or any sensitive files, this method keeps them safe from casual users or curious eyes. No complex tools, no confusing software – just a neat one-click solution that anyone can use! ๐Ÿ”’

Step 1: Open Notepad ๐Ÿ“

Start by opening Notepad on your Windows PC. We’re going to paste a small script that handles folder locking.

Step 2: Paste the Script ⚡

@ECHO OFF title Folder Private if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK if NOT EXIST Private goto MDLOCKER :CONFIRM echo Are you sure you want to lock the folder(Y/N) set/p "cho=>" if %cho%==Y goto LOCK if %cho%==y goto LOCK if %cho%==n goto END if %cho%==N goto END echo Invalid choice. goto CONFIRM :LOCK ren Private "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 folder set/p "pass=>" if NOT %pass%== password goto FAIL attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private echo Folder Unlocked successfully goto End :FAIL echo Invalid password goto end :MDLOCKER md Private echo Private created successfully goto End :End


Step 3: Save as Batch File ๐Ÿ’พ

Save the Notepad file as locker.bat (select "All Files" in the Save as type dropdown). Make sure it ends with .bat so Windows can execute it. THE DEFAULT PASSWORD IS password and you can change it in the script, also you can name the bat file anything like boot,sys,log to blend it for any new user on the computer. 

Step 4: Run the Script ▶️

Double-click locker.bat. It will create a folder named Private. Put any files you want to hide inside this folder. When you run the script again, it will ask if you want to lock the folder. Enter Y to lock and a password to unlock it later.

Tips & Best Practices ๐Ÿ’ก

  • ๐Ÿ”‘ Change the default password from password to something only you know.
  • ⚡ This method hides files from casual users, but it’s not 100% secure from advanced hackers.
  • ๐Ÿ’พ Backup important files before using the script to avoid accidental loss.
  • ๐Ÿ–ฅ Works on all modern Windows PCs without any extra software.

Disclaimer ⚠️

This script is a simple Windows utility to hide folders. Do not use it for illegal activities. It protects against casual access but is not a replacement for full encryption.

Why This Trick is Useful ๐Ÿš€

Sometimes, you just need a quick and free way to hide personal files, work documents, or media. No software installs, no paid tools – just a simple batch script that works instantly. Perfect for students, home PCs, or anyone who wants a little extra privacy! ๐Ÿ”’✨

Helpful Links & References ๐Ÿ“š

How to Create a Password-Protected Folder in Windows with One Click ๐Ÿ”’ How to Create a Password-Protected Folder in Windows with One Click ๐Ÿ”’ Reviewed by Saad Maqsood on September 24, 2025 Rating: 5

No comments:

Powered by Blogger.