How To Lock A Folder On Windows 10

How To Lock A Folder On Windows 10



Corporate espionage or a jealous spouse is not the only driving factor behind what's driving users crazier than usual about digital security, the knowledge that somebody could be aware about your private information are some things which will make anyone cringe. Important documents and personal data that you simply wish to stay private aren't things users might feel comfortable to only leave lying around in your computer where anyone are going to be ready to access it.
There are always files and folders which you would possibly want to stay faraway from prying eyes. Although Windows doesn't offer you an easy thanks to lock a selected folder by default. We do have the choice of encrypting a folder or a file but there's no straightforward way you'll it with a password. Resorting to a third-party applications might slow your system down with malware. But a touch little bit of work can assist you password-protect your folder without counting on third-party applications.

Step 1: Create a replacement folder on your drive. this may be the situation where you'll store your private pictures and folders.

Step 2: After doing this, you'll got to open notepad and replica 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 choice called 'PASSWORD HERE' with the password that you simply wish to assign for your folder then attend File > Save As > and then change the file extension to .bat from .txt then choose 'All Files' within the save as type sink menu. you'll save the file as whatever you would like .

Step 4: Now double click on the .bat file you've got just created and you'll notice a replacement folder has appeared, this name are going to be named 'Private' and this is often where all the files and folders are going to be saved.

Step 5: Double-click the .bat file once more and a CMD prompt will ask you whether you would like to lock your folder or not. If you would like to lock your folder, you'll need to type in Y meaning yes and if you are doing not want to lock your folder, you'll need to type N meaning No.

Step 6: Once it's been locked, the folder named 'Private' will have disappeared. so as to access the folder again, all you would like to try to to is double click the .bat file and enter the set password.

Comments