Best Way To Password Protect A Folder Or File [Without Software]

Security is one of the major concerns for all computer users. We all protect our PC with Windows Security using a pin or fingerprint. But it often happens we need to share our system with other people due to some important work purposes.

And we all have such a file or folder in our computer that we don't want others to see, we want to keep it confidential from others. In that case, we can password protect our folders or file. But the problem is, not everyone knows how to password-protect files. So in today's post, I'm here to help you to teach how you can easily protect your important files in just a few steps.

How To Password Protect Folder Or Files

There are plenty of tools available on the internet. Using that, we can easily protect our documents. But in today's article, you will learn to protect files without using any external software. You can do it just by using only the notepad! So let's begin.

1: First of all open Notepad on your computer and copy the code given below and paste it to your notepad.

if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private goto MDPrivate
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.
ren Private "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
echo Enter password to Unlock Your Secure Folder
set/p "pass=>"
if NOT %pass%== Type Your Passwordgoto 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
echo Invalid password
goto end
md Private
echo Private created successfully
goto End

2: Now Just scroll down a little bit and you will see a line "Type Your Password" (I've highlighted in the above code). Just remove that line and type your desired password (in my case password is "Nitesh"). Click on save and give it any name with .bat extension (for Example- Lock.bat).

3: Boom! you are all set, to lock your files or folder simply open that bat file. After that, you will see a folder named "Private".

4: Put all the documents or files in the private folder that you want to protect. After that again click on the bat file, and a window will pop up for confirmation. Just type "y" (Y='Yes' | N='No') and hit enter. And the private folder will be disappeared. That means you have successfully protected your files or folder without using any software.

5: To bring it back similarly again click on the bat file and it will ask you to enter the password. Just type the password and hit enter. And your confidential files or folder will be visible.

Bottom Line

So, guys! that was the simple trick to protect your folder without using any software. I hope you understood all the steps clearly. If you have any dought then let me know in the comment section we'll definitely help you.

Post a Comment

Any spam comment will be removed immediately

Previous Post Next Post

Like us on Facebook