Here's How To Lock A Folder On Windows 10

By Gizbot Bureau
|

Corporate espionage or a jealous spouse isn't the only driving factor behind what's driving users crazier than usual about digital security, the knowledge that someone might be privy to your private information is something that can make anyone cringe. Important documents and private data that you wish to keep private are not things users might feel comfortable to just leave lying around in your computer where anyone will be able to access it.

 
Here's How To Lock A Folder On Windows 10

There are always files and folders which you might want to keep away from prying eyes. Although Windows doesn't give you a straightforward way to lock a specific folder by default. We do have the option of encrypting a folder or a file but there is no straightforward way you can it with a password. Resorting to a third-party applications might slow your system down with malware. But a little bit of work can help you password-protect your folder without relying on third-party applications.

 

Step 1: Create a new folder on your drive. This will be the location where you will store your private pictures and folders.

Step 2: After doing this, you will need to open notepad and copy the code given below into it.

@ECHO OFF
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private goto MDPrivate
:CONFIRM
echo Are you sure to lock this 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 Private "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 Your Secure Folder
set/p "pass=>"
if NOT %pass%== PASSWORD-HEREgoto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDPrivate
md Private
echo Private created successfully
goto End
:End

Step 3: Replace the option called 'PASSWORD HERE' with the password that you wish to assign for your folder and then go to File > Save As > and then change the file extension to .bat from .txt and then choose 'All Files' in the save as type drop down menu. You can save the file as whatever you want.

Step 4: Now double click on the .bat file you have just created and you will notice a new folder has appeared, this name will be named 'Private' and this is where all the files and folders will be saved.

Step 5: Double-click the .bat file once again and a CMD prompt will ask you whether you want to lock your folder or not. If you wish to lock your folder, you will have to type in Y meaning yes and if you do not want to lock your folder, you will have to type N meaning No.

Step 6: Once it has been locked, the folder named 'Private' will have disappeared. In order to access the folder again, all you need to do is double click the .bat file and enter the set password.

Best Mobiles in India

Read More About: windows how to tips and tricks news

Best Phones

Get Instant News Updates
Enable
x
Notification Settings X
Time Settings
Done
Clear Notification X
Do you want to clear all the notifications from your inbox?
Yes No
Settings X
X