How to Lock PC or Laptop Folder without any Software, with using Bash Script – Windows

We always want to keep our file more confidential and safe from others and the hackers in our computer. We always waste our valuable time for a long in searching for the best password protect locker application/software over internet. And most of the time these software are not available for the free, we need to buy that. These software occupies more storage spaces too. If we spend money in buying these apps, we have to consider about the expiry time too, because it will get expire after a period of time.

Then what is the way to protect our private & confidential files to keep away stealing from hackers? If you want such kind of things at free of cost then this article will help you to create a password protected folder that will keep all your valuable things safe and privacy of your important files or documents in your personal computer or laptop without any third party software/apps. It is possible by a simple bash script. This works in all Windows (XP, Vista, 7, 8, 8.1, 10). Just follow the simple steps given below and keep your folder more secure.


Open Notepad/Any text editor & Paste bash-script

First of all you need to open notepad, notepad++ or any text editor. Now copy & paste the below code in notepad page. Save the file at desired location (like D:/<-folder-location->) on your system with my-locker.bat. You can change the file name my-locker to any name but please keep the extension same i.e .bat. .bat is the extension of bash-script. If you are using Notepad and you are not able to save it with .bat extension. Then to save file with .bat do this, make sure to change the Save as type: to All Files (*.*).

Set your password in bash-script

Now, change the YOUR-PASSWORD in above bash-script with your desired password and save the file. For example, if you want to set the password CodersDen the this line should look like.

Copy confidential files & folders

When you double click on the my-locker.bat file, it will create a new folder (if folder not exists) named Private. Now you can move all your confidential files & folders to this Private folder. After moving all the desired files & folders to this Private folder you can close this folder.

How to Open password protected folder

After protecting the folder using above script, if you want to open your Private folder or you want to access your protected files & folder. Double click on the my-locker.bat file, it will open a command promt & and ask you to enter the password. Enter the password that you saved in your above bash-script file. Now, same the hidden folder will appear again to access.

Lock PC or Laptop Folder without any Software Conclusion

Cheers!! We have seen in this article How to Lock PC or Laptop Folder without any Software, with using Bash Script for Windows XP, Vista, 7, 8, 8.1, 10. This method is free & secure.

Leave a Reply