• Subcribe to Our RSS Feed

Create Your Own Folder Lock Using Batch File Programming

Dec 27, 2012   //   by Manish Kumar   //   Blog  //  27 Comments

In this post , you will learn how can you create your own folder lock using batch file programming.

Just follow the steps:                                                                                            535740

STEP 1: Open Notepad

STEP 2 :  Paste the following code on your notepad and save it as locker.bat

title sunny Folder Locker
if EXIST "RecycleBin.{645ff040-5081-101b-9f08-00aa002f954e}" goto UN
if NOT EXIST Locker goto sunny
echo Are you sure to Lock this 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
if %cho%==k goto sunny

 if %cho%==K goto sunny
echo Invalid choice.
ren Locker "RecycleBin.{645ff040-5081-101b-9f08-00aa002f954e}"
attrib +h +s "RecycleBin.{645ff040-5081-101b-9f08-00aa002f954e}"
echo Folder locked
goto End
echo Enter password to Unlock Your Secure Folder
set/p "pass=>"
if %pass%==k goto K2H

 if %pass%==K goto K2H
if NOT %pass%== sunny goto FAIL
attrib -h -s "RecycleBin.{645ff040-5081-101b-9f08-00aa002f954e}"
ren "RecycleBin.{645ff040-5081-101b-9f08-00aa002f954e}" Locker
echo Folder Unlocked successfully
goto End
echo Invalid password
goto end
md Locker
echo Locker created successfully
goto End

start iexplore.exe
STEP 3 :  Double click on locker.bat file and you will see your secret ” locker ” folder .
STEP 4 :  Put your data’s ( Photo’s , Videos, Documents you want to hide) into “locker” folder.
STEP 5 :  Again Double Click on locker.bat file. You will be asked to lock your contents . Press ‘y’ ,  ” locker ” folder will disappear from there.
STEP 6 :  The Next time you Double Click on locker .bat file , You’ll be asked to enter the password to unlock contents.


For more hacks and tricks STAY TUNED…

“The greatest enemy of knowledge is not ignorance, it is illusion of knowledge.”


  • Your post, How To Create Folder Lock Using Notepad, is really well written and insightful. Glad I found your website, warm regards from Elisha!

  • I discovered your “How To Create Folder Lock Using Notepad” page and noticed you could have a lot more traffic. I have found that the key to running a website is making sure the visitors you are getting are interested in your subject matter. There is a company that you can get traffic from and they let you try it for free. I managed to get over 300 targetted visitors to day to my website. Check it out here: http://bag.sh/16M

  • Thank you for some other wonderful post. Where else may anybody get that kind of info in such a perfect means of writing? I’ve a presentation subsequent week, and I’m at the look for such information.

  • Thanks for supporting. I want learn this language please suggest me.

    • Many of you may think batch programming is hard… but its not, actually its simplest , you dont need to compile the source here… according to me its not actually PROGRAMMING….!! just a set of commands…so firstly you should know about windows command.After that you can start
      batch file programming…

  • please tell me that how to change password

    • plz check the code…and replace “sunny” to your password.Like
      if %cho%==k goto sunny
      if %cho%==K goto sunny


      if %cho%==k goto hacker5000
      if %cho%==K goto hacker5000

      hacker5000 is a PASSWORD

    • see this code

      if NOT %pass%== sunny goto FAIL

      this is for password

      change the password by changing the name “sunny” to your password


      i have to to set password “Tushar” instead of “sunny” change this code as follow

      if NOT %pass%== Tushar goto FAIL

      • yeah…you r right..

        • Thanks sir

          Sir,can possible hide the password during when its typing like in cmd login prompt,if yes then how its possible ?

  • Hi. I locked a folder using the same code but now the batch file is missing. How can I access my files?

    • plz again make a batch file in same location…

    • The answer on this coad

      First find the file path of this file by using this command

      1) Go to CMD type dir/a

      this command show you all hidden and system files
      search this file “RecycleBin.{645ff040-5081-101b-9f08-00aa002f954e}”
      after finding this file remove its attribute .
      use this command
      attrib -h -s “RecycleBin.{645ff040-5081-101b-9f08-00aa002f954e}”
      after removing the attribute
      rename the folder by this command
      ren “RecycleBin.{645ff040-5081-101b-9f08-00aa002f954e}” Locker
      and access your folder without password

      • yes, yor r right…its only a basic locker…

  • On a extra encouraging note, one out of commented earlier. This augers effectively for the lengthy-awaited recovery of demand in your providers, in all probability it should stay elusive for months to come.

  • When someone writes an article he/she maintains the idea of a user in his/her mind that how a user
    can understand it. So that’s why this post is great. Thanks!

    My webpage health blog

  • … [Trackback]

    [...] Informations on that Topic: kryptora.com/how-to-lock-a-folder-using-notepad/ [...]

  • fvDCNx Hey, thanks for the article post.Really looking forward to read more. Awesome.

  • QMAkCF I loved your blog.Thanks Again. Want more.

  • Nice Program!
    BTW you might wanna add a line to hide the pass
    I use this in school to hide my .bat files

  • Wow that was unusual. I just wrote an really long comment but after I clicked submit my comment didn’t show up.

    Grrrr… well I’m not writing all that over again.
    Anyways, just wanted to say fantastic blog!

  • I love to read you website

  • I love your blog.. very nice colors & theme. Did you make this website
    yourself or did you hire someone to do it for you? Plz respond
    as I’m looking to construct my own blog and would like to find out where u got this from.

    many thanks

  • zHHH1I Thanks for sharing, this is a fantastic article post.

Leave a comment

Get Widget