How to Password Protect a Folder in Windows 10
All of us have got computer files which we don’t want to share with the world. Fortunately you can easily keep your files safe from unauthorized access in Windows 10. You don’t need to buy an additional software for keeping your personal files. You can also learn about How to Turn your Windows PC into Wi-Fi Hotspot using Command Line.
Locking a Folder with a Password in Windows 10:
In order to lock a folder with password in Windows 10 you need to follow these simple steps.
- 1st of all you need to right click inside the folder where all the files are located which you want to protect.
- Now select New from the contextual menu.
- Now click on the Text Document.
- Now press Enter and it does not matter what name will be given to the file as you can delete the file once the loackable folder is created.
- Now double click on the text file and then open it.
- Paste the text written below into the new document.
cls
@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 u 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%==Your-Password-Here 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
- Now find where does it say “Your-Password-Here” in the document.
- Now replace the “Your-Password-Here” field with the password with which you want to lock the folder with.
- Click on the File from the menu bar.
- Select Save As…
- Click on the “Text Documents (.txt) menu bar which is next to “Save as Type.”
- Select All Files.
- Now change the file name to FolderLocker.bat.
- Now click on Save.
- Double click on FolderLocker and you will notice that The Locker folder has been generated.
- Now fill in the Locker folder with the items which you want to protect.
- Now open the FolderLocker file as it’s time to lock the folder.
- Type “Y”into the screen.
- Click on Enter and the FolderLocker window will disappear along with the Locker folder as well and with this your secrets will be safe.