Sometimes privacy is important for all of us, especially when you use a common computer in a family. You may be interested in protecting a personal file or folder from someone accidentally opening and viewing the content. Unfortunately, when it comes to protecting a file or folder in Windows 10, there is no such feature to do that specifically. Though other versions of Windows 10 do provide you with an option to encrypt your files or folders. But, Windows 10 Home sometimes does not do that. There is a particular option to hide your files/folders but it’s just for the hiding or showing purpose.
So, if you want to protect your files in Windows 10, there are some tricks and third-party apps which you can opt for it. In this guide, we are going to show you how to do that.
3 Ways to Password Protect a File or Folder in Windows 10
There will be three methods in this guide and all are pretty easy, you just need to follow the steps in order.
- First method is by protecting with a locker folder.
- second is by using a third-party software.
- Third is by using Windows 10 inbuilt feature for encrypting files.
1. Using a Locker Folder
Make sure that you are trying this method only with the files not with the folders because this method will not work on folders. Also, make sure to test these steps (though we have already tested) on the file which is not important.
- Go to the folder inside which you want to password protect the files. To do this in a more confirming way, try to make a sample folder for yourself and add some sample files in it.
- Copy and paste the below code inside a Notepad document and save the text file. You can give any name, let’s name it ‘PasswordPro.txt’.
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%==Enter-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
- Move this text file to the same folder in which you want to protect the files.
- Open the ‘PasswordPro.txt’ text file and go to the line having the text ‘Enter-Your-Password-Here’. This is a placeholder text and change this with your own password. We use the password ‘enjoytheevening’.
- Go the ‘File’ options from the top menu. Click on ‘Save as’ and select ‘All Files’ from the bottom ‘Save as type’.
- Give your file a name with ‘.bat’ extension. For example, ‘PasswordPro.bat’
- Click on ‘Save’ button. Basically you save the ‘PasswordPro.txt’ file into ‘PasswordPro.bat’ file.
- Double-click on the file and a new folder name ‘Locker’ will be created in the folder.
- Move your files inside the ‘Locker’ folder.
- Double-click on the file ‘PasswordPro.bat’ and it will ask you to lock the locker folder in a command prompt window.
- Type ‘Y’ and press ‘Enter’ key. The window will close and the locker folder will be hidden.
- The only files which will be left are ‘PasswordPro.bat’ and a text file ‘PasswordPro.txt’ which you have created.
- To unlock and see the folder again, double-click on the ‘PasswordPro.bat’ file.
- It will open up a new CMD window and ask you to unlock the folder. Enter your password which you have set in previous step, ‘enjoytheevening’ is our password.
- Press ‘Enter’ key from the keyboard and it will show the locker folder again.
- Repeat the steps again to hide and password protect the folder.
Now, the main thing, you can delete the text file which you have downloaded from our site if you want. You can move the ‘PasswordPro.bat’ file too. But the problem is you won’t be able to see the files in any other folder/drive/path in your hard drive. Make sure if you are moving this file then remember the path where the files were hidden. You need to move this ‘PasswordPro.bat’ file back and then use it in locking/unlocking the ‘Locker’ folder.
Related: How to setup PIN, picture and fingerprint password in Windows 10?
2. Using a Third-Party App
There are many third-party apps which help you in protecting your files/folders with a password. WinRAR is a software which allows you to compress/archive your files/folders as well as protect your files with a password. You can also use WinZip to archive and set password to the archived folder. To do this:
- Download and install the WinRAR from their official website.
- Go to your file/folder and right-click on that file.
- Choose ‘Add to archive’ option.
- Give this file a ‘Name’ and click on ‘Set password…’ button.
- Enter the ‘Password’ in the given field.
- Make sure you check the option ‘Encrypt file names’.
- Click on ‘OK’ and then ‘OK’ again.
Your file has been secured with a password successfully. This method is very effective but this is ok when you are dealing with file/folders. In case you have an application, then this can be hectic. You have to extract it every time. Also you should delete the original folder after archiving it.
3. Using Inbuilt Feature of Windows 10
This feature is the encryption feature which is only available in Windows 10 Pro and other versions of it except Windows 10 Home. This is not a complete password protection, it only does not allow other accounts on Windows to open your files.
- Right-click on your file and select ‘Properties’. You can also highlight the file and press ‘Alt + Enter’ keys to ‘Properties’ window.
- Under the ‘General’ tab, click on the ‘Advanced’ button.
- A new popup will open up and you need to check the option ‘Encrypt contents to secure data’.
- Click on ‘OK’.
- Then, click on ‘Apply’ and ‘OK’.
A small notification popup will arise which contain the keys. You need to click on that and export all the keys to a file and save it.
Conclusion
Sometime you only need to hide the files from others and not protect with password. I such a case, simply right click on the file or folder and go to properties. Here you can set the attribute as ‘Hidden’. You can also hide or show the files from File Explorer or File Options settings. If you really wanted to protect with password or encrypt a file, then follow one of the above explained methods in Windows 10.
7 Comments
Leave your reply.