How to Password Protect a Folder in Windows 7/8/10

Comprehensive guide on How to Password Protect a Folder in Windows 7, Windows 8 or Windows 10. Many a time it becomes necessary to password protect files in Windows PC, especially if your Windows system contains some confidential or sensitive information.

As most of the Windows PC out there are used by more than one person, may it be your family or colleagues, it is always a good idea to password protect important folders in Windows.

So that no unauthorized personnel gets access to the folder and the contents cannot be changed by anyone other than yourself.

How to Password Protect a Folder in Windows 7-8-10

How to Password Protect a Folder in Windows 7-8-10

If you are searching for ways on how to password protect a folder in Windows 7, Windows 8 or Windows 10 powered systems, then today we bring you different ways to password protect a folder in computers running Windows 7/8/10 versions.

How to password protect a folder in Windows 7/8/10?

Below are different techniques that can help you to password protect a folder in Windows.

Method 1 to password protect a folder:

  • Find the folder on your Windows PC that you wish to password protect and then right mouse click on the folder once.
  • Once the folder is highlighted, press the Left Mouse Button.folder-properties
  • A popup menu will now appear, and from the menu click on the option that says “Properties”.
  • A new window will now
  • In the new window, at the top of the window different tabs will be shown.
  • Under the “General” tab, click on the button that says “Advanced”.
  • Under Advanced, check the box next to the option titled “Encrypt Contents to Secure Data”.how-to-password-protect-a-folder
  • Click on the “Apply” button and then the “OK” button.

This should password protect the folder you have chosen.

Please do note that if you are using the “Home Edition” of the Windows 7/8/10 operating systems on your Windows PC, then this option might be grayed out [disabled] for you.

If you are not using the Home Edition of the Windows operating system and still this option appears to be grayed out for you, then the hard drive where the folder is stored might not be in NTFS format.

Method 2 for protecting a folder with password in Windows 10, 7 and 8:

If the above method does not work for you, then below is another technique to answer your question on how to password protect a folder in Windows PC.

This method will show you how to format the hard drives in your Windows PC to the NTFS format so that you can password protect the folders stored on the hard drive.

It is to be understood that all the data stored on your hard drive will be lost once you choose to format your hard drive by following the guide below. So please be aware of it.

And even after you format the hard drive on your Windows PC, only folders that are stored within your user account can be password protected by you, which means, you will still not be able to password protect folders in someone’s else’s user account within your PC even if you format your hard drive to the NTFS format.

Considering that you have understood the requirements and constraints of the second method to password protect a folder in Windows, let us get going:

  • Launch the My Computer [also known as “This PC”] app on your Windows PC.
  • Select the hard drive that you wish to format to NTFS.
  • Now, left mouse click on the same folder and from the list of options that appears, click on the “Format” option.disk-selection
  • In the box that appears, choose “NTFS” under the “File System” title and then click on the “Start” button to begin the formatting procedures.format-window
  • Wait for the formatting of the hard drive to complete.
  • Once the formatting is completed, you can now password protect all the folders stored on this hard drive using the “method 1” explained above.

Method 3 for locking folder in Windows PC:

Below is another way to password protect folders in Windows PC.

  1. On an empty space of your Windows desktop, press the left mouse button and from the drop down menu that appears, click on “New”.
  2. Under New, click on “Text Document”. This will create a new text document file on your Windows desktop.
  3. Open the newly created Text Document, and paste the code below to the document:
    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.
    goto CONFIRM
    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%== wonderhowtogoto 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
  4. In the above piece of code, replace the instances of “Private” with the name of the folder where you want your password protected folder to reside and replace the instances of “wonderhowto” with the password of your choice.
  5. Now, save the Text Document file in the “.bat” file format and select the “Save As Type” to be “All Files (*.*)”.saving-format
  6. After you have saved the file, the file will show up in the folder that you chose in the previous step.
  7. Launch the “.bat” file that you had saved earlier from the folder that you replaced in the above code.
  8. A new folder will now appear next to the “.bat” file.
  9. Add the files you wish to password protect into this folder.
  10. After adding all the files that you wish to password protect, again launch the “.bat” file and then when a Command Prompt Window opens up, click on the “Y” key in your keyboard and press Enter.
  11. The folder that appeared in Step 8 will now disappear.
  12. You have successfully password protected and also completed hiding the folder you chose.
  13. Whenever you wish to access the locked folder, again launch the file with the “.bat” extension and enter the password selected by you in Step 4.

You can then also add or remove files from the folder that you have protected by a password.

Know: How to Fix DPC Watchdog Violation Error on Windows 8 or 10

Final Words for How to Password Protect a Folder in Windows 7/8/10

Hope you found the methods listed above on how to password protect a folder helpful and easy to follow. If you are facing with any difficulties in the methods listed above, leave a comment below and we will help you in solving the problem.

Leave a Reply