Yo guys, Need to protect your personal datas and pics with your girlfirend/boyfriend from your dad, mom friends or anyone? ;) Trust me, it's easy. All you just need is a cmd in your machine. Let's start it.
First of all jus copy this code below to a notepad. And save as "Locker.bat" (It's the name I chose, You can give any!). Save it anywhere, I am here saving it in my Desktop.
cls
:End
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u 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 Locker "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 folder
set/p "pass=>"
if NOT %pass%==secure goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
Now you can see a batch file icon appearing. Double click on that batch file and the cmd opens for you like below. Isn't it?

Notice that there is a folder named Locker created in the same location as of your bat file.Drag your files that you need to protect into this folder and then give "Y" in the cmd.
The folder is now hidden and you won't be able to access it!
Don't worry click again on the Locker.bat file and the cmd comes up again asking for the password to unlock.
Type the password here...Oh sorry guys, forgot to say you that in the code I've specified the password as "secure". See these lines in the code:
if NOT %pass%==secure goto FAIL
You can type your own password here instead of secure and then save it.
Once you type your password and unlock the folder, the floder-Locker appears again allowing you to access the files. Cool huh?
Check it out.. But never keep names like Locker.bat and all as anyone could guess it's something secret and would love to peep in or see the code to understand your password.! Think and keep an app name.!!
Cheers.
First of all jus copy this code below to a notepad. And save as "Locker.bat" (It's the name I chose, You can give any!). Save it anywhere, I am here saving it in my Desktop.
cls
:End
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u 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 Locker "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 folder
set/p "pass=>"
if NOT %pass%==secure goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
Now you can see a batch file icon appearing. Double click on that batch file and the cmd opens for you like below. Isn't it?
Notice that there is a folder named Locker created in the same location as of your bat file.Drag your files that you need to protect into this folder and then give "Y" in the cmd.
The folder is now hidden and you won't be able to access it!
Don't worry click again on the Locker.bat file and the cmd comes up again asking for the password to unlock.
Type the password here...Oh sorry guys, forgot to say you that in the code I've specified the password as "secure". See these lines in the code:
if NOT %pass%==secure goto FAIL
You can type your own password here instead of secure and then save it.
Once you type your password and unlock the folder, the floder-Locker appears again allowing you to access the files. Cool huh?
Check it out.. But never keep names like Locker.bat and all as anyone could guess it's something secret and would love to peep in or see the code to understand your password.! Think and keep an app name.!!
Cheers.
No comments:
Post a Comment