Friday, February 20, 2015

How to password protect a folder without any software?

Note: This tutorial is not for beginners.

Step 1:

  First step, all you have to do is just create a new folder.

Step 2:

 Navigate to the newly created folder(that you want to protect with password) and create a new Text Document "lock.bat"(Note that the file extension should be in 'bat' not in 'txt').

Step 3:

Inside the text document, type these codes:
cls
@ECHO OFF
title Folder Private
if EXIST "EYEMATRICX Locker" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Are you sure you 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 Private "EYEMATRICX Locker"
attrib +h +s "EYEMATRICX Locker"
echo Folder locked
goto End
:UNLOCK
echo eyematricx batch locker
echo Enter password to unlock folder
set/p "pass=>"
if NOT %pass%== typeyourpasswordhere goto FAIL
attrib -h -s "EYEMATRICX Locker"
ren "EYEMATRICX Locker" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End

Step 4:

 Replace "typeyourpasswordhere" with your own password. Save the file and Run  the "lock.bat" file.

Step 5:

Now you will see the new folder "Private" is created. It will quickly disappears.

Step 6:

Run the script and it will ask for a password. Type the password(default password is typeyourpasswordhere). The folder will appear again. Keep your files inside the folder and run the file again. Your folder is now locked and hidden.

Step 7:

 Everytime you want to access the folder, you need to run the file and type the password.(Wrong passwords will terminate the command window i.e. Script) 

No comments:

Post a Comment