How to Create a Password Protected Folder without any Extra Software

How to Create a Password Protected Folder without any Extra Software


Before you get started you need to create a folder that will house your password protected folder, this is just an ordinary folder and can be located anywhere and named anything.

Open the document, now paste the following code into the contents of the document:
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.

Now run your batch file by 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. When you have finished adding all your stuff to the Private folder, run locker.bat again.

45 comments

Anonymous mod

doesn't work

Reply

Private not showing after run .bat file again

Reply
This comment has been removed by a blog administrator.
Anonymous mod

Not Working this

Reply
Anonymous mod

It works, i just have one question : is it possible to create differents "Private" folder in different places without any conflict ?

Reply

It worked fine for me, though it isn't secure at all as anyone can edit the .bat file and see/edit the password.

Reply

It works ! Nice job men

Reply

Just hide the folder with attrib? ... and you consider that "locking"?

Reply

This trick works but sometimes it happens that even if we lock the content we see the control panel directory in the place of that private folder.I've been using this trick from last 2years almost. And this issue is not everlasting.. it need pc to be restarted several times. Please post your reply if anyone found the bug fixed.

Reply

Yes its possible.Just copy that same .bat file into other folders and execute it.

Reply
Anonymous mod

not private doc showing after the running of bat file i want to know what's due to or else what can i do please help

Reply
This comment has been removed by a blog administrator.

i fixed this by My software...


Download and use My software Free of cost

Reply
Anonymous mod

It worked fine

Reply
Anonymous mod

thx !

Reply
Anonymous mod

Where should i paste the codes. I dont understand this.

Reply

Folder is visible if we uncheck the option "Hide protected operating system files" in 'Folder options' in control panel.

Reply

Create a txt file and paste ur code and save it as locker.bat in any folder. Then running it will create folder named 'Private' in the same directory.

Reply

it works..........

Reply

If someone deletes the bat file, then how do I recover the private folder?

Reply

Folder is visible if we uncheck the option "Hide protected operating system files" and "check on show hidden files" in 'Folder options' in control panel.

Reply
Anonymous mod

how to reback private file folder...by clicking on locker.bat in that place i used to type password ? which password i have to enter

Reply
Anonymous mod

not working...the rename folder HTG Locker is opening just like other folders...what to do now?>??

Reply
Anonymous mod

the folder was not actually lock it was just hidden.!!

Reply
Anonymous mod

if you want to hide your files in private you can download folder locker search it from google.

Reply
Anonymous mod

there are intances that the administrator blocked cmd "command pomp" it will be a headache if you'll use this trick.

Reply

It works like a charm!!!

Reply

it would be optimized if the same password is required to open .bat file in any text editor!!. currently it can be opened with any text editor and very easy to locate that "Password"..

Reply
Anonymous mod

after hiding things ....the folder is not gettng back even aftr clicking on the locker.bat file.......
can you give me solution ??

Reply
Anonymous mod

AWESOME it works

Reply
Anonymous mod

This works..but wen u search in the search bar all files get visible..

Reply
Anonymous mod

it hide only... not locking

Reply
Anonymous mod

If I deleted my bat file can i retrieve the BAT files using CMD? if yes, how?

Reply
Anonymous mod

This is nice it's worked but the password not secured the unauthorize user can edit the codes and view the pwd.
by the way thanks :)

Reply
Anonymous mod

yes you can create many folders in different places.

Reply

I've done everything and now the file is invisible....I can not find him.... some help maybe?

Reply

Can anybody show me how to change those password that when we enter it changes to ****

Reply

What is Password...........!!
Everytime ask for Password

Reply

what is default path of locker.bat
only first time working then again not working.

Reply

yup, its working & helpful too.

Reply

thanks!!!!!!!!!! :)

Reply

house your password means
......

Reply

this script just will mark the folder as hidden and system protected and WILL NOT protect it by password. after you thing is protected you can go ->Control Panel->Folder Options -> View tab -> check "Show Hidden files and folders .."-> uncheck "Hide protected operating system files" and the folder is shown right where it is

Reply

Worthless... Useless... If someone knows the name of any file inside the locker and 'searches' it using windows search tool s/he can get it. Not only s/he can get that file, s/he can get overall access to 'HTG LOCKER' folder and all its contents. Can someone provide a better solution?

Reply

I have created it but when i locked it a folder wit HTG Locker is created n the hidden things are showing in that without asking password

Reply

Post a Comment