How to make a Locked Folder and set Password?

View previous topic View next topic Go down

GMT - 3 Hours How to make a Locked Folder and set Password?

Post by modi on Sun Sep 30, 2012 5:21 pm

Following is the script.
copy and paste it in notepad and save it as *.bat (a batch file).
For layman... name the file as "run.bat" and save it where you want your folder to be.
E.g.: if you want your protected folder or Locked Folder to be in C:\ then save the file in C:\.
If you want your protected folder or Locked Folder to be in D:\New Folder\ then save the file in D:\new Folder\

Code:
cls
@ECHO OFF
title Folder Briefcase
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Briefcase goto MDLOCKER
:CONFIRM
echo Are you sure you want to Lock 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 Briefcase"Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK

echo Enter password to Unlock the folder
set/p "pass=>"
if NOT %pass%==pwd123456 HERE goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Briefcase
echo Folder Unlocked
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Briefcase
echo Briefcase created
goto End
:End

Note: paste the above code in notepad and go to Edit>>Replace... and replace "Briefcase" with a folder name of your choice and "pwd123456" with a password of your choice. If you use any new folder name which do not exist, it will create one.

How to use it...
To hide:
Run the .bat file, it will ask you for confirmation to hide the folder (Y/N), press 'Y' if you want to hide the folder and its done

To Unhide:
Run the same file again, it will ask for the password. Put in the correct password and your folder again shows up.


Pros:
1) easy to use
2) hides the content completely i.e., even Show Hidden Folders option enabled cannot show this hidden folder nor Windows search can search the contents of this folder when the content is hidden.
3) I never faced any data loss or anything.
4) even if you forget your password you can always recover it by reading the batch file you created.

Cons:
1) no encryption. therefore not advised for offices where data security is critical. In that case I suggest you to go for professional software.
2) Password can be hacked by any geek by reading the batch file.
3) It hides only 1 folder, for another folder you need another batch file.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
modi
Monstars
Monstars

Virgo Cat
Posts : 632
Join date : 2011-02-13
Age : 31
Location : OnLion
--Mood-- : Sporty

Character sheet
Experience:
0/500  (0/500)

Back to top Go down

GMT - 3 Hours Re: How to make a Locked Folder and set Password?

Post by plhr60 on Sun Sep 30, 2012 9:02 pm

Thanks for the tip(s), I have learned many things from you guys . . . . Angel
avatar
plhr60
Monstars
Monstars

Aquarius Horse
Posts : 536
Join date : 2011-10-20
Age : 28
--Mood-- : Drunk

Character sheet
Experience:
33/500  (33/500)

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum