How to Protect your Folder by Using Password in Windows 10


How to password protect a folder in windows 10 – Each of us store files, documents, and software on our Windows Device safely. But even if the date is stored in the folder, that may not be safe when it comes to hacking. So Microsoft has decided to use an alternate option to protect the data by assigning a password to it. Yes, you can use passwords to your folder and then you can protect it without using any third party software. Follow the step by step process to assign a password to your folder in Windows 10 and protect them.

How to Password Protect a folder in windows 10 | Protect a folder in windows 10 | Windows 10

So to lock your file, follow me by taking a sample folder as an example. Choose an unwanted folder on your Windows 10 device and apply all the steps mentioned below. I have tried all the steps and applied it to my Windows 10 folders. It has worked successfully.

How to password protect a folder in Windows 10:

Here are the simple steps to guide to Lock your folder on Windows 10 Operating System. Create a sample folder and put some unwanted data in it and save the file. Take this folder as a sample and apply the steps mentioned.

  • Navigate to the folder you want to lock.
  • Inside the folder, Right Click and then select New from the Contextual Menu displayed.

How to Password Protect a folder in windows 10 | Protect a folder in windows 10 | Windows 10

  • As you click on New, you can see the other options to create a file. Click on Test Document.
  • Name the file and then save in the folder you want to lock.
  • Now Double Click on the Text File you have saved and then you need to enter the text mentioned below or else paste it directly.

    ”   cls


    title Folder Locker

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

    if NOT EXIST Locker goto MDLOCKER


    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


    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

    :End  “

  • In the text, you have entered or pasted, check for Your Password Here label and then enter the password which you want to put to the folder.
  • Now save the file as “FolderLocker.bat” and Save as Type “All Files” and then click on Save.
  • Now you can see the FolderLocker.bat file is generated in the folder.
  • Now your will folder is ready to lock. Open the FolderLocker.bat file and then you can see a black screen.

How to Password Protect a folder in windows 10 | Protect a folder in windows 10 | Windows 10

  • Enter Y and Hit enter. Now your folder is locked.

So to unlock the folder. Open the FolderLocker file and then enter the password which you have given to lock. Enter the Password and Click Enter. Then you can see the folder you have locked.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Check Also

PC stuck in Attempting repaattempting repairs windows 10irs on windows 10,

PC stuck in Attempting repair on windows 10

3 (2) Windows 10 Attempting Repairs Loop. Windows 10 attempting repairs loop? No issues, we …

Leave a Reply

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