Introduction: LOKEY V1.0 (portable Version)

About: Full time Technical Support Associate. Part time Web-Designer & Developer. What's left I spend trying to make stuff.

There have been many batch files that let you password protect a folder, I even made a few to use. But the problem with all of them is that anyone who has access to that batch file can right click on it and see the password written in it.
So after many hours of thinking I came up with a solution, "REMOVE the PASSWORD from the batch file".
And the result was LOKEY v1.0, it has the following advantages over other batch file:
1) The password is not stored in the batch file.
2) You can create as many secret folders as you want.
3) You can use it from any directory.

So lets see how it's made.

Step 1: How It Works

Step 1. Place it anywhere on your PC.
Step 2. Double click on it.
Step 3. Enter a to create a Folder, b to hide an existing folder or c to unhide an existing folder.
Step 4. Enter a folder name and password.
Step 5. Enter.

Since you guys are making batch files, I assume that you can fully understand the code and it's working.
It is like my other batch codes really simple, since I don't know much about anything.

So next is the code, use it and comment about any problems or any changes that you might have made.

Step 2: Code Goes Here

Copy and paste the following lines in Notepad and save it as anything.bat


@echo off
title LOKEY v1.0
:top
cls
echo.
echo LOKEY v1.0
echo Password Protect your files and folders the easy way
echo.
echo.
echo (cc) BY-NC-SA Copyrighted under Creative Commons 2013, Tanmay Das
echo Attribution - NonCommercial - ShareAlike 3.0 Unported License.
echo Visit Instructable Page @ https://www.instructables.com/member/Tanmay Das
echo.
echo.
echo Welcome to LOKEY v1.0
echo.
echo Please select one of the options
echo A) Create a New Lokey Folder
echo B) Hide an Existing Lokey Folder
echo C) Open an Existing Lokey Folder
echo D) Exit
echo.
set /p opt= Your Option :
if /I %opt% == a goto create
if /I %opt% == b goto hide
if /I %opt% == c goto open
if /I %opt% == d goto end
echo.
echo This option DOES NOT EXIST
echo.
pause
goto top
:create
cls
echo.
echo Create a New Lokey Folder
echo.
set /p name= Enter an Unique Name :
md "%name%"
cd "%name%"
echo LOKEY v1.0 > log.txt
echo Password Protect your files and folders the easy way >> log.txt
echo. >> log.txt
echo Log File >> log.txt
echo Lokey Folder Created on %date% at %time% >> log.txt
cd..
cls
echo.
echo Successful....
echo A new Lokey Folder is Created named (%name%)
echo.
pause
goto top
:hide
cls
echo.
echo Hide an Existing Lokey Folder
echo.
set /p name1= Enter the FolderName :
set /p pass= Enter your Password :
if EXIST "%name1%" goto do1
cls
echo.
echo Sorry but the Folder you want to hide was NOT FOUND or DOES NOT EXISTS
:again1
echo.
set /p ask1= Do you want to create a New LokBox? (Y/N) :
if /I %ask1% == y goto create
if /I %ask1% == n goto top
echo.
echo This option DOES NOT EXIST
goto again1
:do1
cd "%name1%"
echo Lokey Folder hidden on %date% at %time% >> log.txt
cd..
move "%name1%" "C:\WINDOWS\%pass%%name1%"
attrib +h "C:\WINDOWS\%pass%%name1%"
cls
echo.
echo Successful....
echo Your Lokey Folder is Now Hidden
echo You can access your Lokey Folder with Name (%name1%) and Password (%pass%)
echo.
pause
goto top
:open
cls
echo.
echo Open an Existing Lokey Folder
echo.
set /p name2= Enter the FolderName :
set /p pass2= Enter your Password :
if EXIST "C:\WINDOWS\%pass2%%name2%" goto do2
cls
echo.
echo Sorry but Lokey FOlder with the given Name and Password was NOT FOUND
:again2
echo.
set /p ask2= Do you want to create a Lokey Folder? (Y/N) :
if /I %ask2% == y goto create
if /I %ask2% == n goto top
echo.
echo This option DOES NOT EXIST
goto again2
:do2
attrib -h "C:\WINDOWS\%pass2%%name2%"
move "C:\WINDOWS\%pass2%%name2%" "%name2%"
cd "%name2%"
echo Lokey Folder accessed on %date% at %time% >> log.txt
cd..
cls
echo.
echo Successful....
echo Your Lokey Folder is ready for use
echo.
pause
goto top
:end
cls
echo.
echo Exiting Lokey v1.0.... Thank You....
echo.
echo Created By Tanmay Das
echo.
pause
exit

Save it as anything.bat

Note. I've tested it in my XP. If you find some problem in finding the WINDOWS Folder, just change all the bold test with the path to that folder.
You can also change that path to any folder you want to keep the Lokey Folder in.

EDIT: Thank to Batchcc to suggest a change, the new script is a few lines smaller