Home » General, Windows

How to Create Password Protected Folder without any Software

8 April 2009No Comment

People are always requesting to use our computer, at that time we are always little bit scared about our personal data. Here I suggest you to protect your data with password protected folder. To create this password protected folder we don’t need any special software or any complex technique.

We just need to create one batch file from notepad with special code which includes folder name and its password. So let’s see how to create password protected folder.

  • Copy below code into notepad and save it as “anyname” with .bat extension, for example secret.bat



title Folder Personal

if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK

if NOT EXIST Personal goto MDLOCKER


echo Are you sure u 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.



ren Personal “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”

attrib +h +s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”

echo Folder locked

goto End


echo Enter password to Unlock folder

set/p “pass=>”

if NOT %pass%==pwd123 goto FAIL

attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”

ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Personal

echo Folder Unlocked successfully

goto End


echo Invalid password

goto end


md Personal

echo Personal created successfully

goto End


In above code we create folder “Personal” with password “pwd123” as shown in red color. You can give any name and password by editing above file.

  • When you run this bat file, it will create “Personal” folder automatically in the same location of bat file. Now you can put any data in this folder.
  • Now run this bat file again for locking the folder and the default icon of folder is change to control panel icon.
  • Now place this bat file to any secure location to keep your password safe.
  • When you want to unlock this “Personal” folder, just run this bat file from same location as folder and it will ask for password which stored in bat file. After entering the correct password your folder is unlocked.

I think is very useful to protect our personal data. What you think?

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.