How To Lock your Folder Without Any Software

Hello Everyone! In this post, I’m going to tell you a way, though classic but very simple,  to “Lock a folder in Windows“.

There will be no need to download or install any kind of software for this purpose. It’s just “Copy and Paste” procedure. 🙂

>Just follow the steps given below:

  1.  Copy and paste the code given below in Notepad.
  2.  Type your password in place of “Type your password here
  3.  Save the file with *.bat extension instead of *.txt
  4.  Now double click to open the file.
  5. When you open it, a new folder named Locker will be created in the same place.
  6. Move all the folders and files you want to lock into this folder.
  7.  Now double click the batch file again and in the confirmation type ‘y‘ to lock the folder, and the locker folder will disappear.

Whenever you want to unlock the folder, open the batch file and enter the password, the locker folder will reappear again.




title Folder Locker

if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” 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-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%==Type your pasword here goto FAIL

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

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

echo Folder Unlocked successfully

goto End


echo Invalid password

goto end


md Locker

echo Locker created successfully

goto End



There might be some problem with the code, when you paste it on the notepad, the inverted commas ” “ would no longer be of the same format. They would be like ” “  i.e, italic. So you must have to reinsert the inverted commas ” “, by removing the italic ones.

4 Responses to “How To Lock your Folder Without Any Software”
  1. muhammad ahsan says:

    ooops not working 4 me…

  2. Mr AhsanAli says:

    Check the “Note”, please. Sorry for your inconvenience.

  3. Mr AhsanAli says:

    @Tech Freak: Thanks for sharing ma article.

Check out what others are saying...
  1. […] How To Lock your Folder Without Any Software ( […]

Comment if you like...

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: