How to Unlock and Password Protect a Folder in Windows

/ Posted by Shawn Hamilton to Password

Follow @ShawnHamilton

In all versions of Windows OS, you have the option to create a password protected folder or remove the lock icon from a folder. In fact, many people are unfamiliar with this powerful function. In this article, I will show you how to unlock and password protects a folder in Windows 8/7/Vista/XP.

Part1: How to Create a Password Protected Folder in Windows 8/7/Vista/XP?

For any security reasons, you need to password protect your folder in your Windows computer. There are a lot of methods that you can use to create a password protected folder, most of which require the use of some third party software. Here we list the way to create a password protected folder without any extra software.

  • Create a folder that will house your password protected folder, this is an ordinary folder that can be located anywhere and named anything.
  • Navigate into your newly created folder and create a new Text Document from the context menu. set password for a folder in windows
  • Open the document and paste the following code into the contents of the document:

    cls
    @ECHO OFF
    title Folder Private
    if EXIST "HTG Locker" goto UNLOCK
    if NOT EXIST Private goto MDLOCKER
    :CONFIRM
    echo Are you sure you 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 Private "HTG Locker"
    attrib +h +s "HTG Locker"
    echo Folder locked
    goto End
    :UNLOCK
    echo Enter password to unlock folder
    set/p "pass=>"
    if NOT %pass%== PASSWORD_GOES_HERE goto FAIL
    attrib -h -s "HTG Locker"
    ren "HTG Locker" Private
    echo Folder Unlocked successfully
    goto End
    :FAIL
    echo Invalid password
    goto end
    :MDLOCKER
    md Private
    echo Private created successfully
    goto End
    :End
  • Change the PASSWORD_GOES_HERE text to the password you want to set. Now go ahead and save the file as locker.bat. password protects a folder in windows
  • After the file is saved as a batch file, you can delete the original text file. create a password protect folder in windows
  • Double click on the batch file and it will create a folder called "Private". Here you can save all your secret things. After finishing adding all your stuff to the "Private folder", you need to run "locker.bat" again. how to set password for a folder in windows
  • Press the "Y" key and hit enter to lock your folder when you are asked if you sure that you want to lock the folder. how to password protects a folder in windows
  • Now your Private folder disappears quickly. And if you run the script again, you will be prompted to enter a password. if the password is right, then the Private folder will reappear.

Part 2: How to Remove the Lock Icon from a Folder in Windows 8/7/Vista/XP?

If you have created a private folder in your computer and now want to unlock the password protected folder, following guide is for your reference.

To unlock an encrypted folder, you have to change the security settings on the folder to allow the Users group to read from the folder.

  • Right click the encrypted folder and select Properties. Switch to the Security tab, and then press the Edit… button. unlock a password protected folder in windows
  • Click on Add to add the "User" group. remove the lock icon from a folder in windows
  • Enter "Users" into the text field near the bottom of the window. Click the Check Names button. how to unlock a password protected folder in windows
  • "Users" will change to the location of the Users group on your computer. Just click OK. how to remove the lock icon from a folder in windows
  • Now the User group must in the list of Groups and Users with access to the folder. You can modify the specific permissions that the Users group has but it must have Read access. Click OK to go on. unlock and password protect a folder in windows
  • Keep clicking OK until you're back at the Explorer window. Now you will see that the lock icon is gone from your folder.

Now you must have a clear idea about how to create a password protected folder or remove the lock icon from a folder. For any other password issues, click here.

Free Try Windows Password Recovery Tool

World's 1st Windows Password Recovery Software to Reset Windows Administrator & User Password.

Free Download Free Download
comments powered by Disqus