Secure your private files …

Abhiman Gowda
3 min readJul 16, 2021

--

As technologies are growing day by day people are facing privacy issues. some people share their pc with friends the files which are private can also be seen by a friend and chances are high that your friend itself can become an obstacle in your life, to overcome this we can secure our files in the folder and lock it, in the sense we can password protect it only the user with a password will be able to access the files inside the locked folder. there are many paid software to do so but we can’t trust any third-party software that too with our private files so Let’s see how this can be done for free without using any third-party software…

Follow the below steps:

Step 1:create a new folder and name it anything as you wish.

Step 2:create a .txt file inside the folder which is newly created and name it anything like [Lock.txt]etc.

Step 3:copy the below code and paste it in the .txt file which you have created earlier.

code:@ECHO OFF
if EXIST “Control Panel.{21EC2020–3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST Private goto MDPrivate
: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 Private “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%== YOUR-PASSWORD goto FAIL
attrib -h -s “Control Panel.{21EC2020–3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020–3AEA-1069-A2DD-08002B30309D}” Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDPrivate
md Private
echo Private created successfully
goto End
:End

Step 4:go to the line containing if NOT %pass%== YOUR-PASSWORD goto FAIL replace YOUR-PASSWORD with the actual password which you need to keep to protect your files in the folder.

Step 5:now click on file-> save as and save the file with .bat extension[for example you have named text file Lock.txt before now rename as Lock.bat and save it]

Step 6: After saving come back double click on the .bat file which was saved earlier a new private folder will be created.

Step 7:Move your private files inside the private folder which appears after double-clicking the .bat file

Step 8:After moving files to the private folder go back and double click on the .bat file again. command prompt appears asking for confirmation for locking the folder press Y and click Enter.

Step 9:once you click Enter the private folder will be hidden, If you need to access the hidden file then again double click on the .bat file it asks for the password provide a password which you have provided before in step 4.

Step 10:Repeat it for accessing and locking your private files.

Disadvantages:

  1. the .bat file can be renamed to a .txt file and the password can be viewed in the .txt file.
  2. But all will not be knowing the above method to access the password.Chances of being at risk will be 50-50.

DECLARATION: THIS CONTENT IS WRITTEN AS PER MY KNOWLEDGE FEEL FREE TO COMMENT HOPE THIS CONTENT IS USEFULL.

--

--