How to Password Protect a Folder in Windows 10

All of us must have some files which we don’t want to share with anyone around the world. In Windows 10 you can easily tuck files in a secret folders which are password protected. You can protect the files with password without any additional software. In order to lock a folder with password in Windows 10 you need to follow these simple steps.

  • 1st of all you need to right-click inside the folder where the files which you need to protect are located.
  • From the contextual menu you need to select New.
  • After this you need to click on Text Document.
  • After this you need to click on Enter
  • Now in the next step you need to double click the text file in order to open it.
  • Once the text file is opened you need to paste the following text.

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

  • Now in the next step you need to find “Your-Password-Here” in the document.
  • Now you have to replace “Your-Password-Here” with the password which you want to set for locking the folder.
  • Now click on File and then select Save As.
  • Now click on the Text Documents (*.txt*) menu bar which is next to “Save as type:”
  • Noe select All Files.
  • Now change the name of the file to “FolderLocker.bat” and click Save.
  • Now double click on FolderLocker.
  • Thats it your Locker folder has been generated.
  • Now you need to fill the Locker folder with all the items which you want to protect.
  • Now Open the FolderLocker file as it’s the time to lock the folder.
  • Now you need to type Y into the screen.
  • Click Enter and the Folder Locker window will vanish and your secrets are save now.
  • In order to unlock the folder you need to double click FolderLocker to open it.
  • Enter the password which you have set.