How to Password Protect a Folder in Windows 10:

A lot of us have been down that road where we had some files or folders on our how to password protect folder in windows 10computer that we knew we should have had protected from spying eyes like other family members, co-workers, other students or maybe your kids.

But if you’re like me I just never got around to doing because, well, I just never looked into how to do it. So if you would like to know how to password protect a folder in Windows 10, 8.1, or 7, follow along and I’ll try to make it as painless and easy as possible.

The sad thing is Windows doesn’t have an easy solution for this unless you have purchased the professional or enterprise version of Windows 10. But I will cover that one at the end of this post for those of you that spent the extra bucks.

There are a couple of options to use to do this and one will include downloading a ZIP application (real easy) and the other will be copying and pasting some code into a folder. So if your ready (I know you have been since the start of this lol) let’s get started with the first one, downloading the application.

Using the 7-Zip application to password protect a file:

We will be downloading the 7-Zip application, I have found this one to be easy to use and it is one of them that is most popular to use. So click here to download the application and install it.

how to password protect folder in windows 10

Now that you have done that open your File Explore and locate the folder or file you wish to password protect, right-click on it and select “7-Zip” > “Add to Archive”, you will now have a new window where you want to locate the  “Encryption” section and under that is where you will type in your password (twice).

how to password protect folder in windows 10

There are other options that you may wish to modify to your liking, once you’re happy with all the settings, click OK. You will notice that this has saved it as a compressed file with the added “7z” at the end of the original file or folder name. Now to open the file, locate it > right-click > select “7-Zip” > “Open Archive”. This will open up the 7-Zip application where you can click on the file to open and it will ask you for the password before opening it.

how to password protect folder in windows 10

See that was fairly easy and simple, right? But you’re not done yet, one more very important step to complete this step, you must delete the original by right-clicking on it and selecting delete. If not deleted this whole exercise would be a waste of time if it were still there for someone to open, right! ?

Ok now let’s look at another way to do this where your copy and paste skills will come in handy.

Locking a Folder using copy and paste code:

To get started, open your File Explorer and find the folder where the files you wish to password protect are, then right-click inside the folder to bring up the small window where you will hover on “New” and select “Text Document”. If you wish you can rename this file or leave it as is because once we are done you can delete the file, it will have done its job.

how to password protect folder in windows 10

Next, you will want to copy the below code which will be pasted into the new file.



title Folder Locker

if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK



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.



ren Locker “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 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


echo Invalid password

goto end


md Locker

echo Locker created successfully

goto End



Now double-click on the new file “New Text Document” and paste the code into it. Then locate the phrase “Your-Password-Here” and replace it with your password or passphrase. Next click on “File”, select “Save As…” and change “Save as Type” to “All Files”, now change the “File Name” to “FolderLocker.bat” and click save.

how to password protect folder in windows 10

This just generated the Locker Folder and is now ready for you to move your file to it. As you can see in the image below I highlighted the files I wish to move into the new folder “Locker” clicked on “Move to” and select the “Locker” folder, then I clicked on “Move”.

how to password protect folder in windows 10

All the selected files have now been moved to “Locker” so now we need to lock that folder up by double-clicking on the “FolderLocker” file. This will open the file and you will be presented with a black screen asking if you want to lock the folder, type in “y” and click “Enter”.


You will now notice that your “Locker” folder is gone, but not really, it is just hidden from sight. To unlock or retrieve the folder all you have to do is once again double-click on “FolderLocker” and this time the screen will ask you for the password that you created above to unlock the folder.

Enter your password and click “Enter” and your folder will appear and you will be able to view its contents just like before and you can add or remove files in this folder.

So now anytime you unlock your folder to view or change you will need to repeat the steps above to lock it up again.

Once you have set up your “Locker” folder it will become much simpler to unlock add to and view and lock it back up again.

Now for those that have the Pro version of Windows 10:

In this step, you will not be using a password to protect your files, instead, they will be encrypted and to view them all you need is to log into your Microsoft account. So with that in mind, anyone who has your credentials for logging into your account will be able to view or alter those files.

Let’s get started by opening your File Explore and finding the file or folder you wish to encrypt and right-click on it. In the pop-up window select, “Properties” > “Advanced” > “Encrypt contents to secure data”. Click OK and select your desired settings in the next pop-up when prompted.

how to password protect folder in windows 10


That’s it, just remember that anyone that can log in to your Microsoft account will have access to the file or folder.


Using third-party software to protect your files:


Instead of listing them all here I thought I would find a reputable site that has already done a review on third-party software for protecting your files. This is one that I found and it lists 16 of them for you to choose from, the website is and you can click on this link if you are so interested in using software to protect your files.

Wrapping this up:

Well, there you have it, four ways that you can use to protect your files or folders on your PC or Laptop. Using one of the first two gives you the ability to password protect those files whereas the third one only encrypts them, and then choosing to use a third-party software gives you both options.

Which one do I like the best? Either the first or second one, though I tend to lean toward the second one because once you have the Locker folder setup it is fairly simple to use and it hides the folder from sight. Though you do have to remember the files you have hidden and let’s not forget the password you created it would be bad if you forgot it. ?

Have any Question on How to Password Protect Folders in Windows 10, 8.1, 7?

Hope this has helped and you have found this to be useful.

If you should have any question or problem performing any of these steps please let me know in the comment section below and I will be more than happy to help. Or if you just want to leave a comment, that would be great, I love to hear from my readers!!

I agree to have my personal information transfered to MailChimp ( more information )
Join others others who are recieving there weekly newsletter with the latest Tips & Solutions to EveryDay Home Computing
We hate spam. Your email address will not be sold or shared with anyone else.

About Author

Hello, my name is Kim and I am the owner of this site. I have been working with computers since they first became available to the public.I have built several computers over the years and enjoy helping others with their everyday computing. Should you have any questions about using your computer, or any other device, please leave me a note below in the comment section and I will be more than happy to help you out. Come back often for more tips and solutions to your every day computing.


  1. Christina

    Hi Kim,
    You gave really easy steps to follow for password protecting windows 10 files. I wonder is it just as easy to password protect files that you keep on the cloud. My new Windows 10 laptop stores most of its files on the cloud. I wondered if it’s difficult to password protect those files and how much of the danger it is to have those out there on the web. Do you have recommendations on using cloud over personal file storage on your computer? Thank you for your help and these easy steps to follow to password protect my files.

    1. Kim (Post author)

      Hello Christina, it’s a pleasure to see you again! Once you password protect a file or folder and it is uploaded to the cloud it will still be password protected. If you want to password protect a file or folder in the cloud the best way is to download it to your Laptop > password protect > uploaded it back to the cloud under a different name and delete the original.
      I highly recommend using the cloud for your backups as long as it is a well-known service like iDrive (I use this one), because #1 they encrypt your files, and #2 you can access them from anywhere.
      I also keep my files on my computer just for extra backups.
      So with how safe it is to have your files on the cloud, I would have to say that they are quite safe concidering there encrypted and can only be accessed with your password. Now it is a good idea to change your password at least yearly if not bi-yearly.
      Hope this has answered your question, if not let me know.


Leave a Comment

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