▷ How to protect and hide folders in Windows 10 with password

How to repair Windows 10 startup step by step

Windows 10 does not have password protection for folders; neither of files nor programs. And it is that despite being one of the most requested functions by the different users of the system throughout the history of Windows, the company understands that user sessions are unique, personal and non-transferable. Fortunately, there are third-party solutions that do not need any program to work if we know how to implement them correctly. That is why this time we will teach you to protect and hide folders in Windows 10 with a password without external programs , only through CMD commands.

Since the CMD commands that we will use are universal, all the steps that we will see below are compatible with Windows 7 and Windows 8 .

So you can hide folders and files in Windows 10 with password without programs

Hiding and protecting folders and files using the built-in Windows options is not possible. For this reason, we will have to create a simple program that allows us to hide the content of a certain folder.

Before proceeding with the creation of the program we will have to create a folder inside the Windows Desktop whose content we want to protect. Once we have entered all the elements that we want to hide (files, images, songs, PDF documents, videos ...), we will create a text file in Notepad through the Windows program of the same name .

How to protect and hide folders in Windows 10 with password 1

We will then paste the code shown below into the text file. We can also download the TXT file directly from this link.

cls

@ECHO OFF

title Folder Private

if EXIST “HTG Locker” goto UNLOCK

if NOT EXIST Private goto MDLOCKER

: CONFIRM

echo Are you sure you want to lock the folder (Y / N)

set / p "cho =>"

if% cho% == AND goto LOCK

if% cho% == and goto LOCK

if% cho% == n goto END

if% cho% == N goto END

echo Invalid choice.

goto CONFIRM

: LOCK

ren Private "HTG Locker"

attrib + h + s "HTG Locker"

echo Folder locked

goto End

: UNLOCK

echo Enter password to unlock folder

set / p "pass =>"

if NOT% pass% == PASSWORD_GOES_HERE goto FAIL

attrib -h -s "HTG Locker"

ren "HTG Locker" Private

echo Folder Unlocked successfully

goto End

: FAIL

echo Invalid password

goto end

: MDLOCKER

md Private

echo Private created successfully

goto End

: End

The next logical step will be to establish a password to open the folder that we want to hide. To do this, we will replace the text string 'PASSWORD_GOES_HERE' with any password . In our case we will use the password HOLA1. Finally we will save the text file through the Save as option to generate an executable file for the system to identify it as a program. In the Name field we will write LOCKER.bat, and in Type the option All files .

How to protect and hide folders in Windows 10 with password 2

With the executable file inside the Desktop, we will double click on it and a folder called Private will automatically be generated where we can enter all the files and folders that we want to hide, like the one we have previously created. After having transferred all the elements to the folder in question, we will execute the LOCKER file again so that a window will immediately appear asking us if we want to hide its content (Y for yes and N for no).

How to protect and hide folders in Windows 10 with password 3

Finally, the folder will be permanently hidden even if we restart the computer. To discover it again, we will have to execute the LOCKER file and enter the password that we have indicated previously. It should be added that the BAT file created can be edited by anyone with sufficient knowledge, so we will have to move it to a safe location so that the password is not accessible to the public.