Create Password Protected Folder (Folder-Lock)

There are always some things which we don’t want others to see in our Computer, Example: private photos, porn films, secret documents etc. So we need to hide them. Just attributing the Folder which includes these Files as HIDDEN does not serve this purpose because these days every person knows to view Hidden files. So why not Password protect this Folder? We do get Folder Lock softwares for Download on Internet but they offer only trial versions for free. So, Today I will give a tutorial on Creating a Password Protected folder in Windows.

Just open Notepad and copy the following code given in Green colour in it.

title Folder Locker
if EXIST “Control Panel.{21EC2020- 3AEA-1069- A2DD-08002B30309 D}” goto UNLOCK
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 Locker “Control Panel.{21EC2020- 3AEA-1069- A2DD-08002B30309 D}”
attrib +h +s “Control Panel.{21EC2020- 3AEA-1069- A2DD-08002B30309 D}”
echo Folder locked
goto End
echo Enter password to Unlock folder
set/p “pass=>”
attrib -h -s “Control Panel.{21EC2020- 3AEA-1069- A2DD-08002B30309 D}”
ren “Control Panel.{21EC2020- 3AEA-1069- A2DD-08002B30309 D}” Locker
echo Folder Unlocked successfully
goto End
echo Invalid password
goto end
md Locker
echo Locker created successfully
goto End

Do not forget to change the “YOUR PASSWORD HERE” text by a strong and secure password which you want to set for your Locker.
Now save this file WHERE YOU WANT THE PASSWORD PROTECTED FOLDER as “locker.bat”. A folder named Locker will appear in the same directory. (Refresh if it does not appear)

Click on the locker.bat file and it will ask you for the password for your Locker (Not for the first time, Second time onwards) You need to give the same password which you gave while writing the BAT file in Notepad (Remember password is case sensitive) Now you can save any data in this Locker folder. After saving the data again click on the locker.bat file. It will ask you weather you want to lock this folder. Type y if you want to lock it or n if you don’t want to lock it.

You can use the locker.bat file to unlock this folder as explained above. Have fun locking your documents in your password protected folder. Ask your queries in Comments and Don’t forget to tell weather you liked this trick or no.

(Note: BAT files can be edited in Notepad (Different Notepad tricks) so any Computer savvy person might get to know your password through the locker.bat file. So it is advised that you HIDE the locker.bat file. You don’t need to hide the Locker folder because it is Hidden by Default)

  • Danin

    NIce site dude

    Keep Developing your site

    Search some Free Web Hosting sites for my sake………

  • who am i

    awesome site dude…thanks a ton

  • lou

    Great Job! Thanks for your share

  • Anonymous

    do not work with vista

  • Rohit Sane – Tech freak

    Hey Anonymous,
    I am using windows Vista Home Premium and this trick is working properly….Just check weather there is some error from your side..take care…Try again

  • Surya

    This code can simply break with the REN command.

    This script is doing nothing more than changing the folder into the “control panel” using the registry.

    One need to rename the folder name using REN.

  • Simha

    It is not working for windows 7.
    Any suggestions ???

  • Kyle

    does it work for Vista Starter?

  • Rohit Sane

    @kyle: it does work!

  • vijayan

    pls some one ,any body decrypt this

  • rdharma

    nice post , now I can create password protectd folder without using any lock application.

  • K Gaurav Thantry

    hey i’m using windows xp dark edition and its not working for me.
    Its not asking d password. when i click the locker.dat folder its just showing- “are you sure you want to lock this folder(Y/N)” and if i type Y, the window is just closing. and the locker folder is opening without any question for password.
    reply me as soon as possible.

  • Rohit Sane

    @Gaurav: Please check if you have done all the steps properly.. Coz It is working with all Windows XP versions..

  • Kenric

    Can someone decrypt this for me md5 hash 3144d89f633a5a584ceb33a1736ce048 Thanks, very important. Password can be sent to

  • nicholas

    6660d98451db91f96a6911bf3102eb79 kan somone decrypt this for me, its a very important password! and i cant do it, send it to, thx alot

  • anna

    e99db499f56627867455e090f29be307 THX THX THX THX THX THX

  • Channing

    Hello im so srry to bother you but could u help me decrypt this code its soo very important i cant really do anything without it c17ca919931405eecf1051abba27ce4b id absolutly love u if you could, plss and tyvm.

  • sahiti

    sir plz can u plz decrypt me dis ……i will be very helpful
    n my email id is….plz sir

  • Joker

    It keep saying {21EC2020- is not recognized and it doesn’t create a folder.

  • walle

    @gaurav is it working for you ? am experiencing the same problem in windows 7.

  • underskull

    it worked great loved it but it would only come up with do you want to unlock this folder (Y/N)can you help i have been over the script for it many times and i cant figure out what is wrong with it cheers