Here Is Coding of Batch File
cls
@ECHO OFF
title Folder Personal
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if Not EXIST Personal 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%==Y goto END
echo invalid choice.
goto CONFIRM
:LOCK
ren personal "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%== Password goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Personal
echo Folder unlocked successfully
goto End
:FAIL
echo Invalid password
goto unlock2
:FAIL2
echo Invalid password
goto End
:MDLOCKER
@ECHO OFF
title Folder Personal
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if Not EXIST Personal 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%==Y goto END
echo invalid choice.
goto CONFIRM
:LOCK
ren personal "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%== Password goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Personal
echo Folder unlocked successfully
goto End
:FAIL
echo Invalid password
goto unlock2
:FAIL2
echo Invalid password
goto End
:MDLOCKER
Give us your comments
ReplyDelete