How to Password Protect a Folder in Windows 10

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp

Table of Contents

Advertisements
Loading...

If your PC or Laptop is used by many peoples on your home, I am sure You want to lock your personal files and folders, Right? So today in this blog I am going to teach you, how you can do this without downloading any software on your device.

There are various ways to set password protection your folders, But I am going to teach you in the easiest way. These are the steps that you need to follow.

Advertisements
Loading...
  • Create New Text File
  • Copy the given code and Paste
  • Remove YOUR-PASSWORD and Enter New Password
  • Save the file as a batch file (.bat)
  • Double Click on the batch file
  • Store your personal files, and folders on newly created Private folder
  • Again double click on the batch file
  • Enter Y in command prompt and press enter
  • And again double click on the batch file to show the Private folder

For further and detailed tutorials watch the video, which is given at the starting of this blog.

Copy this Code

@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:
set/p "pass=>"
if NOT %pass%== YOUR-PASSWORD goto 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
Advertisements
Loading...

SHARE THIS POST

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on whatsapp

Interested in partnering with us?