Do you have a secret files or folders in your computer that should not be discovered by your girlfriend, kids or colleagues? Here we will show you how to put a password on a folder in Windows 10 without installing the 3rd party software.
Note: Backup all your files that should be protected before you start. After you create a secure folder, try it several times before copying files and folders in.
How to put a password on a folder in Windows 10:
- Open file explorer and go to a folder you want to protect
- Right-click inside this folder
- Select New > Text document
- Open the text file you’ve created
- Copy the code below this tutorial and paste it into the text file you’ve created.
- Find the line in the code where is written “if NOT %pass%==Your-Password-Here goto FAIL” (on line 45) and replace Your-Password-Here with a password you want to use.
- Go to File > Save as
- Switch at the bottom of Save dialog Save as type to All Files (*.*)
- Change the filename to FolderLocker.bat and Save it.
- Open the FolderLocket.bat
- A new folder named “Locker” has been created. Now move there all files you want to hide.
- Open the FolderLocket.bat. A new command window appears.
- Type Y in the command window
- Press Enter. The folder Locker will disappear. Your files are now hidden and password protected.
- To reveal and unlock the hidden folder, open again FolderLocket.bat. You will be asked for your password.
- Enter your password and press Enter.
- Your protected folder Locker will appear again and you can work with files inside.
______________________________________
Code to be inserted into a text file:
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

