Hello all! I'm very excited to tell you about this new batch script that I made that can hide folders and, apparently, lock them with a password. You may find many such scripts...but they don't lock more than one folder. The script you'll find here can lock, multiple folders. Enough intro, now let's get into the real thing...
NOTE : This blog is written assuming that you are new to batch file [.bat files] scripting...so don't worry if you don't know much about the script, I'll be guiding you with everything... :-) The locker script is initially made to lock 3 folders, but I'll tell you how to make it lock more than 3 folders...the beginner way.
NOTE : This blog is written assuming that you are new to batch file [.bat files] scripting...so don't worry if you don't know much about the script, I'll be guiding you with everything... :-) The locker script is initially made to lock 3 folders, but I'll tell you how to make it lock more than 3 folders...the beginner way.
First, let's take a look at the script...
I have divided the code into 3 areas - Existence, Lock, and Unlock
I have divided the code into 3 areas - Existence, Lock, and Unlock
@echo off
::Area I-Existence : This area will check for the existence of the folders - Locker, Locker 2, and Locker 3.
:EXISTENCE_1
if exist "Locker" goto LLOCKER else (
if exist "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309A}" goto ULOCKER else (
echo.
set /p "create=Do you want to create Locker?(Y/N)"
if NOT %create%==y goto EXISTENCE_2
md Locker
echo.
echo Locker created...
pause
goto EXISTENCE_2
))
:EXISTENCE_2
if exist "Locker 2" goto LLOCKER2 else (
if exist "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309B}" goto ULOCKER_2 else (
echo.
set /p "create2=Do you want to create Locker 2?(Y/N)"
if NOT %create2%==y goto EXISTENCE_3
md "Locker 2"
echo.
echo Locker 2 created...
pause
goto EXISTENCE_3
)
:EXISTENCE_3
if exist "Locker 3" goto LLOCKER3 else (
if exist "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309C}" goto ULOCKER_3 else (
echo.
set /p "create3=Do you want to create Locker3?(Y/N)"
if NOT %create3%==y goto END
md "Locker 3"
echo.
echo Locker 3 created...
pause
exit
)
::Area 2-Unlock : This area will manage the unlocking of the folders
:ULOCKER
echo.
set /p "pass=> Enter Password..."
if NOT %pass%==**** goto EXISTENCE_2
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309A}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309A}" "Locker"
echo.
echo Locker Unlocked...
echo.
pause
goto EXISTENCE_2
:ULOCKER_2
echo.
set /p "pass2=> Enter Password..."
if NOT %pass2%==++++ goto EXISTENCE_3
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309B}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309B}" "Locker 2"
echo.
echo Locker 2 Unlocked...
echo.
pause
goto EXISTENCE_3
:ULOCKER_3
echo.
set /p "pass3=> Enter Password..."
if NOT %pass3%==---- goto END
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309C}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309C}" "Locker 3"
echo.
echo Locker 3 Unlocked...
echo.
pause
exit
:LLOCKER echo. set /p "lock=Do you want to lock Locker?(Y/N)" if NOT %lock%==y goto EXISTENCE_2 ren "Locker" "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309A}" attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309A}" echo. echo Locker Locked... goto EXISTENCE_2 :LLOCKER2 echo. set /p "lock2=Do you want to lock Locker 2?(Y/N)" if NOT %lock2%==y goto EXISTENCE_3 ren "Locker 2" "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309B}" attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309B}" echo. echo Locker 2 Locked... goto EXISTENCE_3 :LLOCKER3 echo. set /p "lock3=Do you want to lock Locker 3?(Y/N)" if NOT %lock3%==y goto END ren "Locker 3" "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309C}" attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309C}" echo. echo Locker 3 Locked... pause exit :END exit::Area 3-Lock : This area will manage the locking of the folders
[How to use : Copy this whole box and paste it in notepad and save the file as a *.bat file. Voila! you have your Locker script ready to use]
By now I believe you have the script saved in '.bat' extension. So now, let's get an idea of how it works and then I'll tell you how to use it...though you'll know that yourself by simply executing the file...but still
The first time you run the file, it will ask if you wanna create the folders...lockers, apparently and you have a choice to make 1 locker, 2 or 3. Then it will exit.

Then you can put in the stuff you want to lock then open the file again to lock the folders. They then disappear...but if they don't press F5 button.

Then comes the unlocking part. Open the file and enter the password. The password I initially applied was - **** for Locker, ++++ for Locker 2 and ---- for Locker 3. But you can change it as per your choice per folder.


So that's how it works.
By now,
You have the script as .bat
You know how to change the passwords
So let's increase the number of folders it can lock. [Yea!]
Copy and paste this at the end of the 'Existence' area [refer to the first part of the blog post]
By now I believe you have the script saved in '.bat' extension. So now, let's get an idea of how it works and then I'll tell you how to use it...though you'll know that yourself by simply executing the file...but still
The first time you run the file, it will ask if you wanna create the folders...lockers, apparently and you have a choice to make 1 locker, 2 or 3. Then it will exit.

Then you can put in the stuff you want to lock then open the file again to lock the folders. They then disappear...but if they don't press F5 button.

Then comes the unlocking part. Open the file and enter the password. The password I initially applied was - **** for Locker, ++++ for Locker 2 and ---- for Locker 3. But you can change it as per your choice per folder.


So that's how it works.
By now,
You have the script as .bat
You know how to change the passwords
So let's increase the number of folders it can lock. [Yea!]
Copy and paste this at the end of the 'Existence' area [refer to the first part of the blog post]
:EXISTENCE_[4,5,6...]
if exist "Locker [4,5,6...]" goto LLOCKER[4,5,6...] else (
if exist "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309[type D,E,F...]}" goto ULOCKER_[4,5,6...] else (
echo.
set /p "create[4,5,6...]=Do you want to create Locker [4,5,6...]?(Y/N)"
if NOT %create[4,5,6...]%==y goto END
md "Locker [4,5,6...]"
echo.
echo Locker [4,5,6...] created...
pause
exit
)
{type things as told in the [ ] and don't write [ ]}
And in the :EXISTENCE section before the one you pasted, change 'exit' to 'goto Existence_[4,5,6...]'
Similarly change the 'Unlock' area...
:ULOCKER_[4,5,6...]
echo.
set /p "pass[4,5,6...]=> Enter Password..."
if NOT %pass[4,5,6...]%==[the password in continuation,ie, no spaces] goto END
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309[D,E,F...]}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309[D,E,F...]}" "Locker [4,5,6...]"
echo.
echo Locker [4,5,6...] Unlocked...
echo.
pause
{type things as told in the [ ] and don't write [ ]}
And in the :ULOCKER section before the one you pasted, change 'exit' to 'goto Existence_[4,5,6...]'
Similarly change the 'Lock' area...
:LLOCKER[4,5,6...]
echo.
set /p "lock[4,5,6...]=Do you want to lock Locker [4,5,6...]?(Y/N)"
if NOT %lock[4,5,6...]%==y goto END
ren "Locker [4,5,6...]" "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309[D,E,F...]}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309[D,E,F...]}"
echo.
echo Locker [4,5,6...] Locked...
pause
exit
{type things as told in the [ ] and don't write [ ]}
And in the :LLOCKER section before the one you pasted, change 'exit' to 'goto Existence_[4,5,6...]'
So paste 3 things and edit them as desired.
Now you can change the number of folders you can lock!
So now you have a locker program which can hide folders and lock them with a password. You can change the password and change the number of folders and advance the algorithm to more than 3 lockers on your own.
Tell me about what you wanna see next and comment your queries below.
This is pretty much all I guess, tell me if i missed to explain something important, and thank you for being with me and have a nice day!
And enjoy your new locker!
No comments:
Post a Comment