Besttechindia is reader-supported. When you buy through links on our site, we may earn an affiliate commission. Learn more.

How To Password Protect a Folder in Windows 10? (2020)

Since releasing its first version to Windows 10, Windows has evolved a lot. It has been 35 years since Windows began its journey and with every consecutive year, Microsoft tries to launch amazing features for its users.

But a very significant feature in which Microsoft still lags is the password protection of the files. Users always tend to become confused about how to password-protect a folder in Windows or any external software to safeguard a folder in Windows 10.

Windows do have a password protection mechanism to secure the files. However, it may not be visible to the user, or the feature may not be smoothly accessible as compared to other features.

In this article, we will tell you the step by step process to protect your important files.

Before we start, we would like you to note that it is not advised to store sensitive information like your bank account details, important documents, etc. in your files. 

But the method is pretty useful to have a separate room for your personal information. The same technique can be used for all versions of Windows 10.

 How To Password Protect a Folder in Windows 10? (2020)

Also, keep in mind that it is important to remember your password or note it somewhere to help you be secure in the future. Once you lose your password, it will be challenging to get your password if you do not have a technical background. However, having a technical background still does not guarantee you to get your files back.

Before sharing the 5 steps to password-protect a folder in Windows 10, we request you to note that many Microsoft apps may show your locked files in recent searches.

In this blog, we will cover four significant methods. The outline of the blog is given below:

  1. 1
    Method one: Using a text document
  2. 2
    Method two: Creating a virtual hard disk using Bit-Locker
  3. 3
    Method three: Using Advanced Properties
  4. 4
    Method four: Using third-party software’s
  5. 5
    Conclusion

Method 1: Using Text Document

If you know how to create a Word document, then this method is for you. Just a few steps and you are safe. In this method, you will have to create a Word document and need to add a small code in it.

Don't worry! If you are not a techie, our steps can unquestionably help you.

This method is beneficial as it will help you save your files without searching for some external method and the steps that are quite easy to follow.

This is one of the best methods to Password Protect a Folder in Windows 10; most importantly, it's safe.

Steps to password-protect the Folder in Windows 10:

We request you not to skip these steps. You can first read all the steps and then start the process step-by-step.

Method 1: Using Text Document
  1. 1
    Select the file which you want to protect and Right-click on it. Before performing all these steps, you can add all your files to the folder. You can also add or delete the files later.
  2. 2
    A context menu will open. Select NEW, i.e., second last option
  3. 3
    You will get another menu. Select a text document
  4. 4
    Rename the document (you can choose any name) and open it. Selecting a particular name is not important. It is because this document is temporary and will eventually lead you to create a password-protected file.
  5. 5
    Paste the text given below in the document:

Click here to see the code...

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

  1. 6
    After copying the code, press ctrl + F and type Your-Password-Here. Ctrl + F is used to search for a particular word in the document. This process will lead to a section in which you can replace your password with Your-Password-Here.
  2. 7
    Replace it with your password (Important note: Avoid using space in your passwords)
  3. 8
    Now, go to the file and click on "Save As."
  4. 9
    Rename the document as "FolderLocker.bat."Also, in save as type (that is below the name of your file), click on "Text Documents (*.txt)" and select "All Files."
  5. 10
    Go back to the file that has your document and double click to generate Folder Locker.

Voila! Your file is now protected.

Shift all the essential items you want to protect into that folder.

  1. 1
    Now open the locker folder.
  2. 2
    Select Y, i.e., yes, and hit enter.

Yeah! Now you have a separate room to protect your essential files or folders.

Now you may have a question:

How do I store more documents in the locker folder?

To store more documents in the locker folder, just follow the last three steps and you are good to go. Save the document by clicking on Save.

How To Password Protect a Folder on Windows 10 (2020)

Method 2: Creating a Virtual Hard Disk Using Bit-locker

  1. 1
    Search Disk Management from the start section of Windows.
  2. 2
    From the top left corner, click on Action and then create a VHD option.
  3. 3
    Now, you have to create a virtual disk. For that, click on ‘Browse’ and select your virtual disk.
  4. 4
    Give any name to the drive and click on save.
  5. 5
    Specify the storage that you want to store your file under the "Virtual hard disk size" section.
  6. 6
    Select VHDX (Optional)
  7. 7
    Select Dynamically expanding option.
  8. 8
    Why "Dynamically expanding" option?
  9. 9
    This ensures that the disk size will grow according to the size of your files.
  10. 10
    Click Ok
  11. 11
    Now to initialize the disk: Right-click on disk x and then initialize the option.
  12. 12
    Now select MBR (Master boot record option) and click ok.
  13. 13
    Select a new, simple volume by right-clicking on unallocated space. Keep the settings defaulted and then click "next."
  14. 14
    In the "new simple volume wizard," select a new letter for a new drive.
  15. 15
    Click the next button.
  16. 16
    Select NTFS for the "File System" drop-down menu.
  17. 17
    From "Allocation unit size" drop-down menu keep default settings on
  18. 18
    Give a name to your drive—for example, folder_vault.
  19. 19
    Check the "Perform a quick format" option.
  20. 20
    Clear the Enable file and folder compression option (unless necessary).
  21. 21
    Click the Next and then Finish button.

Now you have your password-protected hard disk. It's time to enable BitLocker on a virtual hard disk. Enabling BitLocker can be accomplished by using the control panel. This process is a bit complicated; hence it's important to concentrate on these steps if you are following this method.

  1. 1
    Go to the Control Panel and then chose System and Security.
  2. 2
    Click on BitLocker Drive Encryption to select the folder_vault drive from the "Fixed Data Drives" section.
  3. 3
    Turn the BitLocker option ON.
  4. 4
    To unlock the drive, check the Use a Password.
  5. 5
    Set a password to protect your files.
  6. 6
    Click Next and Save to a folder button.
  7. 7
    Select a location to store the recovery key.
  8. 8
    Click Next and Save button. Also, select the "Encrypt used disk space only" option.
  9. 9
    Click the Next button.
  10. 10
    Select the Compatibility mode option.
  11. 11
    Click the Next button.
  12. 12
    Click the Start encryption button.
  13. 13
    Once you are done with encryption, click the close button.

Now you can use a virtual disk to protect your files.

How do you lock and unlock your files?

To Unlock your folders with a password, follow the following steps:

  1. 1
    Go to File Explorer and select the folder_vault.vhd file.
  2. 2
    Double-click the VHD (VHDX) file to mount it to File Explorer.

[IMPORTANT: Note that getting a "is not accessible" and "Access is denied" message is normal.]

Once you install the VHD to File Explorer, getting "is not accessible" message is not an issue, so that you can move on to the next step is to unlock the drive.

How do you lock and unlock your files?
  1. 3
    Now, to unlock the drive go to This PC
  2. 4
    Open the sign-in page by double-clicking on the drive under the "Devices and Drives" section.
  3. 5
    Now, you can unlock it by typing your password and can access all the important files.

How to lock your folders with a password after unlocking it?

Again, open File Explorer and under the "Devices and Drives" section, right-click the BitLocker drive and select the Eject option.

Voila! You are ready with a super protected file. Store your important documents and access them easily whenever you want. Your files are now secure. However, you may have a question on how to recover your files if you forgot your password. To have an answer to this query, you can refer to this question.

Question: What if you forgot your password?

It's always advised to remember your password. But if you have forgotten your password, then you can use the following tips.

  1. 1
    Click the Enter Recovery Key option from the More Options link.
  2. 2
    Type 48-digit recovery (Find it from the text file that you should have saved when setting up BitLocker on the virtual hard disk).

Method 3: Using Advanced Properties

  1. 1
    Select the file which you want to protect and Right-click on it
  2. 2
    Go to the properties and click on Advanced.
  3. 3
    Select "Encrypt contents to secure data."
  4. 4
    Click on APPLY

There may be a chance that you have not used this feature before. In that case, you may see a dialog box. Just click the back-up option, i.e., recommended.

Your files are secured!

To reverse the encryption, just untick the "Encrypt contents to secure data" checkbox. Always keep in mind to lock your account (Win+L) if you are away from the screen!

Using Advanced Properties

Lock File or Folder Using BitLocker Full Tutorial

Method 4: Invest in Third-party Software

If you are getting the most superior facility to guard your files, spending on third-party software is not a big deal! The marketplace is brimming with many software and choosing the best can help you have great peace of mind.

Using Windows' BitLocker feature (Pro and Enterprise editions only) can help you get good peace of mind. A small investment for this software can help you to keep your mind free.

Conclusion

So, let’s conclude by analysing which is the best method?

You can start with the first method. Method one is free and it involves fundamental steps like creating a document, copy-pasting the text, etc. Always try to remember your password. Otherwise, it's challenging to get back your precious files once you forget your passwords.

These methods should not be used for highly protected data. If you want pro software, then you can invest in Windows' BitLocker feature.

So, we can end this blog by stating that technology has developed a lot and you can accomplish a lot of tasks if you have the proper set steps to perform a particular task. Knowledge of more than one approach is always helpful, and it will surely help you answer your technical problems. 

Piyush

Follow me here

About the Author

Piyush Kashyap is a Ph.D student at Sant Longowal Institute of Engineering and Technology, Sangrur. He is a budding editor/ writer and has been working as a part-time reviewer for online content. He loves to read tech-based articles and has a knack for reviewing such articles He likes to stay updated about the latest trends in technology. He has also been working as a reviewer for many scientific journals. He also writes articles based on science. Know More About Piyush


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>