How to protect a Folder with password in Windows PC/laptop

5:55:00 AM ZIA ULLAH 0 Comments

How to protect a Folder with password in Windows PC/laptop By Amad Ahmad

Secure your folder with password without using any additional software in your Windows 7/8.1/10 PC/laptop

This article will be helpful for those who want a better level of privacy than the level offered by basic OS functionalities. And also do not want to struggle with various software available as free or paid.
In this article we will teach you to password protect a folder(and transfer your private stuff in it) just by using command prompt.
Okay, first of all you need a text editor(notepad will do), and you have to copy the following code there. Replace “YourPassword” with the password you want to give to the folder (without double quotes).
cls
@echo off
echo amadahmad.blogspot.com
title Folder Private
if EXIST TWlock 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 TWlock
attrib +h +s TWlock
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p “pass=>”
if %pass%==YourPassword goto Decrypt
goto FAIL
:Decrypt
attrib -h -s TWlock
ren TWlock Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto End
:MDLOCKER
md Private
echo Private created successfully
goto End
:End
Now save the file as a .bat file(give any name you want, I have given name “Cipher”).
Third step is to open this file. ( I recommend that you open this batch file by command prompt rather than by clicking on it, in this way you will be able to see all the action)
How to protect a Folder with password in Windows PC/laptop By Amad Ahmad
As you open the file for the first time, it creates a folder named “Private” in the same directory as of the batch file.
How to protect a Folder with password in Windows PC/laptop By Amad Ahmad
You can place your desired stuff in this folder.
Now again open Cipher.bat in cmd and you will be presented with a choice of yes or no. Once you type ‘Y’ the folder will be locked.
How to protect a Folder with password in Windows PC/laptop By Amad Ahmad
After this the folder will be locked.
How to protect a Folder with password in Windows PC/laptop By Amad Ahmad
Whenever you need access,open Cipher.bat again, Enter the required password and the folder will be unlocked.
How to protect a Folder with password in Windows PC/laptop by Amad Ahmad
Read Also: 
                                               For More Updates: Click Here