How To Password Protect Folder In Windows | Without Any Software

Files And Folder Security is an Important part of Individual’s Privacy. Everyone wants that their personal files and folders should not be accessed by anyone else. You may come accross many different ways to hide your personal files and folders for this purpose. But what if you could actually password protect folder so that, no one except you and the ones who know the password can view the files.

So, Let me Tell you a Way by which you can actually Password Protect Folder, That too without using any software :

Just Follow these Simple Steps And Get Password Protect Folder :

  • At First Create a folder, that will be housing your Password Protect Folder, this will be just an ordinary folder and can be located anywhere on your windows and named anything. For eg: We Created a Folder (By Right Clicking  -> New -> Folder) Named “IndianGyaan” On Desktop.

    "IndianGyaan" Folder On Desktop
    “IndianGyaan” Folder On Desktop
  • Open  the folder you created and then create a Notepad file in it (By Right clicking in open area -> New -> Text document), Now Open The text document and you need to paste the following Code there :

cls
@ECHO OFF
title Folder Private
if EXIST “HTG Locker” goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Are you sure you 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.
goto CONFIRM
:LOCK
ren Private “HTG Locker”
attrib +h +s “HTG Locker”
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p “pass=>”
if NOT %pass%== PASSWORD_GOES_HERE goto FAIL
attrib -h -s “HTG Locker”
ren “HTG Locker” Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End

  • Change The PASSWORD_GOES_HERE text to the password you want to set. Now go ahead and save the file as locker.bat (Remember, You Need to Give .bat Extension only).

    password protect folder
    Change The “PASSWORD GOES HERE” to Your Desired Password
  • Once the Text Document is saved as a batch File, You can delete the orignal Text file, if you want.Delete
  • Now run your batch file (double clicking on it) – the first time you run it, it will create a folder called “Private”. This is where you can store all your secret things, the things you want to password protect.
  • When you have finished adding all your secret stuff to the Private folder, run locker.bat again. It will ask you if really want to lock the Private, type “Y” and Press Enter to Confirm. The Private folder will Dissapear. 

    Password Protect Folder
    Type “Y” And Press Enter
  • In order to view the Private folder again Click on Locker.bat file. A window will appear asking you for the Password, Type the Correct Password and Press Enter. The Private foder will appear again. 

    Password Protect Folder
    Type the Password And Press Enter

Note : You can change the password anytime by Editing the locker.bat (Batch File) 

THANK YOU 🙂

Hi Folks, Myself Satyam, A tech enthusiast, loves to help people around also a active LifeHacker and sometimes I do chemistry.

Satyam Kumar

Hi Folks, Myself Satyam, A tech enthusiast, loves to help people around also a active LifeHacker and sometimes I do chemistry.

2 thoughts on “How To Password Protect Folder In Windows | Without Any Software

  • December 5, 2016 at 4:46 am
    Permalink

    Good work. But does the locker.bat file needs to be secured? Otherwise it can be opened in notepad and the password will be shown. Correct me if I am wrong.

    Reply
    • December 5, 2016 at 5:03 am
      Permalink

      This Method gives a basic idea about Password Protecting a folder, With Simple Easy to follow steps. And Yes Anyone with a Good Experience With computers or someone who knows about this method will be able to easily crack it By opening the batch file in notepad. But I don’t Think this would be possible for any ametuer Computer user.
      You can hide the Locker.bat file in order to ensure that no one can access it on the go.. 🙂

      Reply

Leave a Reply

%d bloggers like this: