[TUTORIAL] Folder Lock With A Single Batch File

GPow69

EDM for life ♥
Messages
18,837
Location
Canada
Here Is how to make a lockable folder, with a single batch file.
TIP: Dont tell anybody how to get/change the password!! (How to do this will be later in the tut)

1: First Of all, open up notepad.

2: Copy And Paste This code into notepad:
Code:
cls
@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%== PUT YOUR PASSWORD HERE! 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
:End

Where it says "ENTER YOUR PASSWORD HERE" In that code, That Is where you will put whatever you want your password to be, Example:

set/p "pass=>"
if NOT %pass%== PUT YOUR PASSWORD HERE! goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

Change that to (Example:)

set/p "pass=>"
if NOT %pass%== Forums.TheMaveSite.com goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

Now your password will be Forums.TheMaveSite.com

MAKE SURE THAT THERE IS A SPACE BEFORE AND AFTER YOUR PASSWORD IF THERE ISNT ALREADY!
Like you cant have this:

if NOT %pass%==Forums.TheMaveSite.comgoto FAIL
There has to be a space on both sides of the password.

STEP 3:

Save your text file In the location that you want the lockable folder to be.
IMPORTANT: Save your text file as the name (without quotes) "Locker.bat"

4: Double click the bat file and it will create a Folder in the same dirctory that the locker is in. The folder will be named "Locker"

Now Put all your valuable things in the folder, but dont delete them from their original directory until you have fully tested the locker.


5: After the folder "Locker" has your things in it, double click the .bat file. It will ask you "Do you want to lock the folder? (Y/N)

For yes> Type Y and press enter.
For No> Type N and press enter

If you did Y, the CMD window thing will close and Folder "Locker" Will disapear (This Is the Locked mode, and no, it didnt just make it invisible)

To Get the folder back (unlocking), Run the .bat file again. It will ask you for a password. Enter whatever you put in "ENTER YOUR PASSWORD HERE" on the txt file, and press enter. the folder should reappear.


.::TO CHANGE PASSWORD::.
Right click on the .bat file and click edit.
Go down to where your old password is, and replace that with what you want your new password to be.


I Hope this helps all of you! :biggrin:

(Any smartass comments by scripters on TMS (Eg- OHH THIS SUCKS I COULD DO THIS IN HALF THE TIME) will be removed.))
 
Re: Folder Lock With A Single Batch File

Yes the folder dissapears, but it comes back at the right password :biggrin:
 
Re: Folder Lock With A Single Batch File

Yeah. I even tried to make shortcut to that folder, BUT when I lock, the shortcut goes to control panel!
Bravo :)
 
Re: Folder Lock With A Single Batch File

oooh i like dis
 
Re: Folder Lock With A Single Batch File

is it possible to make a .exe of it so then like ppl cant edit the bat file to get ur password?
 
Re: Folder Lock With A Single Batch File

I have no idea I got this off google. ask zez.
 
Back
Top Bottom