To password protect a folder in windows first copy the below code in notepad and save it as lock.bat and follow the below steps :

if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST MyFolder goto MDMyFolder
echo Are you sure to lock this 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.
ren MyFolder "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 Your Secure Folder
set/p "pass=>"
if NOT %pass%== trickytrickzz goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolder
echo Folder Unlocked successfully
goto End
echo Invalid password
goto end
md MyFolder
echo MyFolder created successfully
goto End

Now if you want to change the password change the text in red colour . Now close the notepad and double click on the lock.bat file , it asks for the password type the password you gave in the code . A folder will be created on the desktop now copy all the files you want to keep secure and again double click on lock.bat file inorder to lock the folder.  

Also Read :

Trick o clean windows temp. files and temperory internet files

How To Remove Shortcut Virus In Pendrive :

Post a Comment

Share Posts