Windows

How to Password Protect Files or Folders on Your Computer

Shares

I’m sure that you have a lot of things to worry about and having your sensitive files read by others can be very irritating. If there is one thing that we are always frantic about doing, it’s protecting our valuable information. So, if you don’t feel like downloading any additional software that might slow down your computer’s performance, the following method will help you add a password to your files.

One thing to keep in mind is that this method won’t hide your files from someone who really knows their way around a computer, but if you are surrounded by beginners, then this is the method for you.

How to Password Protect Files or Folders on Windows

The first thing that you will need to do to add a password to your Windows folder is to create a folder like you normally would in documents. You can name this folder whatever you want, and as you can see in the image below, I called mine “Secret Love Letters from Famous People.”

Password to a Folder

Go to and open the file you just created and create a new Text Document. Once it’s open, you will need to paste the following codes:

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%==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

Scroll back up slowly and look for the words that say “password goes here” and change it to the password you want to use to protect the folder. Remember to create a password that is not easy to crack.

You will need to save that text document as “FolderLocker.bat”.

Password to a Folder

Note: You will have to choose Save as Type >> All Files to do this.

Click on the file that says “FolderLocker” and you should see a folder called Locker or Private. This is the file where you should transfer the files you don’t want anyone to see. Now, you can hide those pictures you don’t want your buddies to see every time they ask to use your computer.

Go back to the Folder Locker file and double-click on it and the command prompt should appear asking if you if you are sure that you want to add a password to your folder. Type “Y” and press Enter.

Password to a Folder

Don’t panic if the folder disappears, because that’s exactly what it’s supposed to do. Whenever you want to access your important documents, double-click on the FolderLocker file and the command prompt will ask you to type the password.

Password to a Folder

After you have done that, the file should reappear. Congrats! You have just learned how to add a password to a file in Windows. It wasn’t that hard, was it?

What To Do If You Forget Your Password

Have you ever had to reset your password on any of your accounts? If you’re like me you have and many times for that matter. If you happen to forget the password you set for your folder, all you have to do to see it is right-click on the locker.bat file and choose Edit. It’s that simple, but make sure that you don’t do this in front of anyone since they to will find the way to see your password.

Password to a Folder

Conclusion

We are constantly trying to find ways to protect our information and adding a password to files is a great way of keeping things safe. How do you keep your files safe? Let us know in the comments.

Read more like this

Judy Sanhz

I can never get enough of tech in general, whether it's Android or web apps, but helping others solve their tech problems also brings great satisfaction. I carry a device wherever I go and I'm always connected. Life without Internet just sounds too scary to me. :-).

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Shares

Adblock Detected

Please consider supporting us by disabling your ad blocker