1. Lock the Folder Using a Batch File
If you are not keen on using third-party apps and programs, creating a batch script is perhaps the best way to lock folders with a password of your choice. Here's how to do it.
- Locate the folder you'd like to lock and open it.
- Right-click on an empty space within the File Explorer window and select New > Text Document.
- In the text document, copy and paste the following code: @ECHO OFFif EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCKif NOT EXIST Private goto MDPrivate:CONFIRMecho Are you sure to lock this folder? (Y/N)set/p "cho=>"if %cho%==Y goto LOCKif %cho%==y goto LOCKif %cho%==n goto ENDif %cho%==N goto ENDecho Invalid choice.goto CONFIRM:LOCKren Private "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"echo Folder lockedgoto End:UNLOCKecho Enter password to Unlock Your Secure Folderset/p "pass=>"if NOT %pass%==your_password goto FAILattrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Privateecho Folder Unlocked successfullygoto End:FAILecho Invalid passwordgoto end:MDPrivatemd Privateecho Private created successfullygoto End:End
- In the text file, replace your_password in the line if NOT "%pass%==your_password" goto FAIL to a password of your choice.
- Click the File menu at the top and select Save As.
- Give any name to the file and add the .bat extension at the end.
- Select All Files under the Save as type dropdown menu and hit Save.
- Double-click the BAT file to run it. This will create a new folder named Private in the same directory.
- Move all the files and folders you want to lock into the Private folder.
- Double-click your batch file again once you've placed your files in the Private folder.
- In the command prompt window, input Y and press Enter.
Your folder should now disappear. To access it later, double-click the batch file and enter the password you set earlier. If you enter your password correctly, the private folder will reappear.
2. Lock the Folder Using 7-Zip
Another way to secure and compress your sensitive documents on Windows is by utilizing a popular desktop program called 7-Zip. Primarily used for unzipping folders and extracting files, 7-Zip also lets you password-protect folders. Here's how to use it:
- Download and install 7-Zip on your PC.
- Open the 7-Zip File Manager app using the search menu.
- Locate the file or folder you want to protect, select it, and click the Add option at the top of the window.
- Select the Delete file after compression checkbox.
- Enter your new password in the Encryption section and click OK.
Once you complete the steps above, your folder will be replaced by a ZIP file. To access its content, right-click your ZIP file and select 7-Zip > Extract Here. You'll then be prompted to enter your password.
While this method isn't particularly efficient, as you'll need to go through the entire process every time you need to add files, it works perfectly and relies solely on trusted software.
3. Use the Folder Lock App
You can always install a third-party tool for added convenience or advanced features. Numerous good programs are available to lock folders on Windows. One such option is Folder Lock, which enables you to protect files and folders and allows you to lock your USB or external storage drives.
Once the targeted folder is locked, you'll need to use the Folder Lock app to unlock it. This tool is free, but you can upgrade to the Pro version if you want to access its premium features.
Bonus Tip: Hide Sensitive Files and Folders on Windows
While Windows does not have a feature to lock folders with a password, it does provide the option to hide them. By changing the folder's properties to "hidden," you can make it invisible in File Explorer.
To do this, simply right-click a file or folder and select Properties. Then, check the Hidden option under Attributes and click Apply.
Your file or folder should now disappear. To view your folder again, you will need to configure Windows to show hidden files and folders. You can do this by opening File Explorer Options and selecting the Show Hidden Files, Folders, and Drives checkbox under the View tab. To hide your files again, head to your File Explorer Options window and select Don't Show Hidden Files, Folders, or Drives. That's it!
So, these are some of the best options to protect your sensitive folders on Windows. No matter which method you choose, you can be assured that your sensitive documents will be safeguarded under an additional layer of protection that's not available by default on your PC.

0 Comments
Post a Comment