How to Create a Password Protected Folder:

Hi friends today I will tell you how to lock a folder in windows without using any software.

To create Password protected folder you don’t require any software, notepad is enough to create Password protected folder in Windows, using batch file programming you can create it.

If more than one person is using a computer at that time if you want to protect you personal files/documents from other users, this trick will help you to protect your files

Step 1: Open your notepad (Go to start -> all programs -> accessories -> notepad or click windows key+r run window will open type notepad and hit enter).

Step 2: Copy below code and past it in your notepad.

cls

@ECHO OFF

title Folder how2doit

if EXIST “HTG Locker” goto UNLOCK

if NOT EXIST how2doit 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 how2doit “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%== PASSWORD123  goto FAIL

attrib -h -s “HTG Locker”

ren “HTG Locker” how2doit

echo Folder Unlocked successfully

goto End

:FAIL

echo Invalid password

goto end

:MDLOCKER

md how2doit

echo Private created successfully

goto End

:End

Folder LockStep 3: Click  save (Ctrl+S) and provide the file name with .bat (Batch File) extension.

Here I am saving my file as myfolderlock.bat (Provide any name with .bat extension).

Folder Lock1Once if you click on save button then a batch file will be created in your system as shown below.

Folder Lock2Step 4: Double click the batch file a new folder will be created with name How2doit.

Folder Lock4Note: to change the folder name replaces how2doit with your desired folder name in the above code.

Folder Lock3Step 4: Copy/Move all your files that you want to hide into How2doit folder

Folder Lock5Step 5: Again run the myfolderlock.bat file, you will get a command prompt Just press Y and hit enter button

Folder Lock6 Once if you press the enter button immediately, the How2doit folder will be disappear, all your files are secured in this hidden folder.

If you want to access that hidden folder, again double click on myfolderlock.bat file

It will ask for the password, enter the password and hit enter button (Password is PASSWORD123)

Folder Lock7If you want you can change the password, just replace PASSWORD123 with your desired password in the above code.

Folder Lock8Note: Any one can access the Password by opening the batch file in notepad or any other text editor, it is better to hide myfolderlock.bat file in some secure location after hiding your files, I recommended you to store your batch in your mail and you can download it to your computer whenever you need to access your hidden files.

That’s it.

Enjoy 🙂

Thank you for visiting how2doit.in.  If you find any mistakes help us by leaving a comment.

Don’t Miss : How to Sign in with a picture password in windows 8.