how to lock a folder without a software     We always want to keep our file more confidential and safe  from others  and the hackers in our computer .We are always wasting time  for a long  in searching for the best password protect locker application in the play store.And mos of the time they are not available for the free, we need to buy it .And occupies the more data spaces too. If we spend money in buying these apps, we have to consider about the expiry time too.because it will get expire after a period of time.

Then what is the way to protect the hide our private files keep away stealing from  hackers. yes!!!! this article will help you to protect your valuable folders  and keep it more safe by lock folder without any third party .It is possible by the simple coding in the notepad .This works in all windows(i.e XP,vista,7,8).Just follow the simple steps given below and keep your folder more secure.

Lock a Folder without any Folder Locker :

  • Open notepad or press window+R
  • copy and paste the code in the notepad

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%==password lock 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


  • In the above batch code we added password is password lock, and you can change to your desired  password.
  • Now save this file by using an extension (.bat) for example:FILENAME.bat?(.bat is more essential ,it is indicate the batch file)
  • Now you will see a batch file on the desktop in the file name you saved.
  • Then Double click on the batch file ,now a  command prompt window will pop up.
  • Now enter the password which you have used in the source code and press Enteri.e “password lock” that i mentioned in above .
  • Then a folder will appear on the desktop.
  • Now drag the  important files you want to keep safe  into the folder and again press on the batch file.
  • Now a command prompt window will pop,in that type ‘y‘ and  you will see that the folder which appeared on the desktop will disappear.
  • when you need to Unlock the Folder Simply  Click on Lock.bat file and Enter your password and Hit Enter.

Now your folder is more safe than before.