How to Lock a Folder with a Password in Windows 10?
Many times we need to lock our folders which are having confidential files. But we don’t know how to do that. So we are providing you the process of locking folders as well as files in Windows 10.
- Right click where you want to create lock folder & select New ->Text Document

- Open this new created Text Document & paste below Texts in that file: –
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
- Find Your-Password-Here & replace your own password which you want to set on that folder
- Click on File-> Save As

- In save as type select “All Files” & put file name as FolderLocker.bat

- Save this file
Now you see a file named FolderLocker.bat in your folder.

- Just run this FolderLocker.bat File. It will create a folder named “locker”

- All your files which you want to lock copy them in Locker folder.
- After that again run FolderLocker.bat. It will ask for your confirmation to lock. Just type Y and Enter. It will lock your folder.

Whenever you want to unlock your folder just run this FolderLocker.bat file. It will ask you for password. It will show you the folder once you enter your password

5 Responsesso far
I really enjoyed this. can i share this ?
thanks for the knowledge
thanks information
thanks for the knowledge
thanks for this information. can i share this ?