Do you have sensitive or private files on your Windows 10 PC that you want to protect from unauthorized access? One of the best ways to do this is to lock a folder containing your important files. In this blog post, we will guide you through the process of locking a folder in Windows 10 to ensure your data remains safe and secure.
Method 1: Using a Batch File
In this method, we’ll create a simple batch file that will lock and unlock your folder. Follow these steps:
- Right-click on your desktop or inside the folder where you want the locked folder to be created. Select New and then Text Document.
- Open the new text document and paste the following code:
@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 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 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%==YourPassword 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
- Replace YourPassword in the code with your desired password.
- Click on File in the top left corner, then click Save As.
- Change the ‘Save as type’ to All Files. Name the file ‘FolderLocker.bat’ and click Save.
- Double-click the FolderLocker.bat file to create the Locker folder.
- Move all the files you want to protect into the Locker folder.
- Double-click the FolderLocker.bat file again and type ‘Y’ to lock the folder. The folder will now be hidden and locked.
- To unlock the folder, double-click the FolderLocker.bat file once more and enter your password.
Method 2: Using a Third-Party Software
If you prefer a more user-friendly option, you can use third-party software to lock your folders easily. A popular choice is Folder Lock, which offers various features including folder locking, file encryption, and file shredding. To use Folder Lock, follow these steps:
- Download and install Folder Lock from their official website.
- Launch the software and set up a master password.
- Click on the Lock Folders option in the main menu.
- Click on the Add button and browse for the folder you want to lock. Select the folder and click OK.
- Your folder will now be locked and hidden. To unlock, simply select the folder in Folder Lock and click Uninstall.
Conclusion
Now you know two effective methods to lock a folder in Windows 10. Whether you prefer using a simple batch file or third-party software, you can easily protect your sensitive files from unauthorized access. Remember to keep your password safe and secure to ensure the best protection for your data.