Friday, 25 October 2013

password protect folder

password protected folder in windows 7

 windows 7 does'nt support the password  protected folders.For password protection of folder there are many software available in the market.

But below is the program for password protection of folder and so you will not need any software

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%== ***type you paasword 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 

At the place of ***type your password here*** delete it and type whatever password you want to keep for your folder without asteriks.

 copy this code in notepad and go to save as change file type to all files and save the file with.bat extension

 then at last run the file.

if you have any problem or you require more programs like this then comment below your suggestion or queries.

No comments:

Post a Comment

About the author

Scholar Ratan pal singh is a Google scholar, a man with innovative ideas and a nothing is impossible attitude, is a tech-lover.
He works as a independent researcher and freelance website and software developer.
Member of IEEE comsoc society, Green technology society and has published research paper and codes in many international journals and opensource.

"Failure is the pillar of success and Honesty with oneself is the only true way of achieving self-confidence."

Translate

Pageviews