Hello friends, my last two blogs in this category were about How to hide the Folder using Command Prompt, that was done by changing the attributes of the file or the folder. And changing the folder icon to the system icon, using the hex codes of the system folders. This article is to protect the data with the password.
Protect your data with a password:
Many of us install third party software to protect the data with a password. But in this article, we will learn how to protect our data folder with the password using batch files. This is very easy method of locking and hiding folders in Windows without any additional software.
Follow these steps:
1. Open a text file on notepad and save it as lock.bat
2. Add these following lines to the notepad file
3. Save the above code.
4. When you double click or run the Lock.bat file, it will create a new folder named “Locker” automatically, if it is not created. Just copy all the sensitive and important data to this folder.
5. If the folder named “Locker” is created and visible, then it will ask to lock the folder.
The folder named Locker will be locked with the password and invisible.
6. To unlock the folder double click on the batch file named lock.bat, it will asked for the password. Enter the password as techfanas and the folder will be visible and unlocked again.
you may change the password, just replace the techfanas with your password in the above code.
This trick uses both the trick used in my previous articles of this section.
- The default password for the folder named Locker is “techfanas”. You may change this password to your desired password. Just replace the techfanas in the code of the lock.bat file and save that file.
- The directory of the batch file and the folder should be same i.e. the batch file and the folder should be in the same directory.
- Do not put the batch file with the folder after locking it because anyone can unlock it using the batch file and can get your password by editing the batch file. After locking the folder just move the batch file to another location.
- If you forgot the password in any case, just create another batch file with different password. That will also work well.