Copy the following to Notepad.
Then add the file name as .bat and save it, like folder locker.bat
cls
@ECHO OFF
title Folder Locker
if EXIST
"Locker.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}" goto UNLOCK
if NOT EXIST Locker 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 Locker
"Locker.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}"
echo Folder locked
goto End
:UNLOCK
@echo off
set "psCommand=powershell -Command "$pword =
read-host 'Enter the Password to unlock folder' -AsSecureString ; ^
$BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword);
^
[System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)""
for /f "usebackq delims=" %%p in (`%psCommand%`) do
set password=%%p
if not "%password%"=="12345" goto Fail
ren
"Locker.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End