Password Protect Any Folder Without Any Software - Neuroon Networks

Breaking

Sunday, February 18, 2018

Password Protect Any Folder Without Any Software

By Shehan Dhaleesha

In this post i will show you interesting and useful trick to protect folder with a password and without using any software. We do this by  using batch file programming. This trick will work on all windows platform (Win XP, Win 7). I'm not sure about Win 10. If it is please leave a comment.

So first of all open a text editor and paste the following code. I prefer note pad because this code is a simple code and note pad is easy to access.

cls
@ECHO OFF
title vTeamNeuron
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST MyFolder goto MDMyFolder
:CONFIRM
echo Are you sure to lock this 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 MyFolder "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 Your Secure Folder
set/p "pass=>"
if NOT %pass%==
NEURON goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolder
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDMyFolder
md MyFolder
echo MyFolder created successfully
goto End
:End 


And save the file as "lock.bat". This name can be changed. It doesn't affect to the code. But the extension should be ".bat". Otherwise it may give some errors or will not compile. 
Then double click on that file and it will create a folder name as "MyFolder". If you want to change the folder name you can change it on the code. But make sure to change all occurrences of 'MyFolder'.
Now you can paste your data in this folder. As well as you can create sub folders also.
After that again double click the .bat file. Then it will ask you permission to lock the folder. Just type "Y" if you like to lock the folder or otherwise type "N"
Now your data on that folder are hidden and none can access them. To access the folder again double click on .bat file and it will ask for a password. The default password is NEURON. If you want to change it, change it on the source code.

So now you have a folder that none can access and only you can access without using any software.

Use this only for educational purposes. Have fun!!!

No comments:

Post a Comment