Welcome to yet another post, in our quest to feed you with computer tricks, we happen to come by a short code that allows you to keep a folder locked and password protected. Someone may ask why will you keep your folders locked in the first place. Just as we know, we live in a world where peoples privacy are being invaded from time to time so you might want to consider keeping certain contents on your PC confidential and away from unauthorized access. There are a lot of third party apps that allows you to do that, but why stress yourself purchasing third party apps whiles this simple trick is available. Lets get straight to business.

STEP1: Open notepad on your machine. You can either launch it from the start menu by searching for the keyword “Notepad”. Or by pressing Windows Key+R and then you type notepad and press enter.

STEP2: Copy and paste this code in the empty Notepad.

 title eminentblog.com
 if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
 if NOT EXIST MyFolder goto MDMyFolder
 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
 echo Invalid choice.
 ren MyFolder "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 Your Secure Folder
 set/p "pass=>"
 if NOT %pass%== eminent goto FAIL
 attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
 ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolder
 echo Folder Unlocked successfully
 goto End
 echo Invalid password
 goto end
 md MyFolder
 echo MyFolder created successfully
 goto End

NB: You can change the word “eminent” on line 23 to any word that you want to use as password to open the folder.

STEP3: Save the notepad file as Anything.bat (.bat is must). You can replace “Anything with” any word you want to use as the file name but the “.bat” is compulsory.

Step4 :    Now double click on anything.bat and a new folder will be created with name MyFolder

Step5 :  Transfer all the data you want to lock into that folder an close it.

Step 6 :.Now double click on anything.bat and when command prompt appears Type Y and press enter.

Step 7 : Now MyFolder will be hidden from you view, to access that folder double click on anything.bat  

Step 8:. It will ask for password enter your password and done.

The default password is “eminent” you can change to any password you want in the code line 23.

We believe this post was helpful, if it was, don’t forget to share and tell your friends about eminentblog.com.


Please enter your comment!
Please enter your name here