How to Lock a Folder with a Password in Windows

How to Lock a Folder with a Password in Windows

Hello everyone, welcome back at porkaone. On this occasion, we will learn how to lock folders in Windows without additional applications. Let's follow in full below.

If you have private files stored in a folder and you don't want others to see, protecting them with a password is one solution. Especially if the computer or laptop that we use is often borrowed or used by other people.

On Windows, you can protect private folders without additional applications. The method is quite easy, but unfortunately many people don't know this method. Here's how to lock a folder with a password in Windows.



How to Lock a Folder with a Password

1. Enter the folder you want to protect.

2. Right click → then select new → then select text document

Mengunci Folder di Windows Sahretech
New Text Document



3. Open the newly created text document, then edit it with the script below. Please replace PASSWORD with the password you want.


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 Are you sure u 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 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%==PASSWORD 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


4. Then Save AS with the name FolderLocker.bat, then on save as type select All Files. Then click save.
Cara mengunci Folder Windows Sahretech
Save As FolderLocker.bat


5. Then double click on FolderLocker.bat

cara mengunci folder windows sahretech

6. Then it will automatically create a new folder called Locker. This folder is what we will use to store personal files. Please move all your personal files into that folder. You can do this by drag and drop on the selected file.





7. Then double click on FolderLocker.bat, then a command prompt window will appear, type Y then hit enter to confirm that the folder will be locked.
cara mengunci folder windows sahretech



8. Then the Locker folder is automatically hidden.

sahretech



9. To show the Locker folder again, double-click on FolderLocker.bat. Then the command prompt will appear. Please enter the password that you set earlier. Then press enter.
sahretech



OK, now you can protect folders using a simple trick. You can use this method on Windows 11, 10, 8 and 7. You can do this on all folders on your computer.

That's all for our short tutorial this time about How to Lock a Folder with a Password on Windows. Hopefully this short tutorial can be useful and can be put into practice. If there are problems, please ask directly in the comments column below. Thanks and thanks.


Post a Comment

0 Comments