sherazi21st
New member
Last copy paste article. Any more will be deleted. Refer Guidelines to Quality posts. - Genesis
- Open a new notepad file and copy paste the code given at the end of this tutorial
- Replace the name ABIDKHAN with your desired password on line number 9 and 22 (Password is case sensitive)
- Save this file with lock.bat or with any name with .BAT extension (when notepad ask for name while saving, give it full name like lock.bat. If you give it name without .BAT extension, it'll be saved as a text file.)
- Run the newly saved bat file, it'll create your locked folder (Only fist time). Put your files in this folder.
- Run the BAT file again. it will ask you to enter password. Enter your password selected in step 2
- Your folder is locked and hidden now
- Running this BAT file will ask password this time and will unlock and show the hidden folder
Code: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 Enter password to lock folder or for cancel press N set/p "cho=>" if %cho%==ABIDKHAN 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%==ABIDKHAN 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