Create a folder lock:
First of all you need to create a folder that will have your password protected folder in it, it will be an ordinary folder that can be located anywhere and named anything.
Now create a new Text Document by right clicking on folder and selecting text document.
Now open documentand copy the following code"
Now change the password_go_here text to the password you want to keep.Than save the file as locker.batcls @ECHO OFF title Folder Private if EXIST "HTG Locker" goto UNLOCK if NOT EXIST Private 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 Private "HTG Locker" attrib +h +s "HTG Locker" echo Folder locked goto End :UNLOCK echo Enter password to unlock folder set/p "pass=>" if NOT %pass%== PASSWORD_GOES_HERE goto FAIL attrib -h -s "HTG Locker" ren "HTG Locker" Private echo Folder Unlocked successfully goto End :FAIL echo Invalid password goto end :MDLOCKER md Private echo Private created successfully goto End :End
Remember:make sure to write .bat at the end becuase extension plays a key role.
Once the file is saved as a batch file.Now if you want you can delete the original text file.
Now double click your batch file this will run and it will create a folder called Private. This is where you can store all your confidential stuff. When you have finished adding all your stuff to the Private folder, run locker.bat again.
This time you will be asked if you sure that you want to lock the folder, press the “Y” key and hit enter to lock your folder.
You will see that your Private folder quickly disappears.
If you run the script again, you will be asked to enter password.
If you enter the same password that you have set in the script the Private folder will reappear but in case of entering wrong password the script will terminate.
What will happen If You Forget Your Password
So need to worry for the password you had set. And the answer is really simple: Right-click on the locker.bat file and choose Edit.
No comments:
Post a Comment