How to hide and password protect a folder in windows 10

Hide and use password protect for Folder in Windows 10 using Notepad.

1. Create a bat file with the scripts (see at below of the post) by copying and paste it to the Notepad. and save as *.bat , for example Private.bat. Save anywhere you want,  at root of the drive or inside the folder.

 See example. My bat file named Private.bat  I put inside the folder.


2. Double click Private.bat
It will generate a new folder, in this example the name is PrivateFolder (you can rename/replace it, by setting it in the Notepad).






3. Then you can put your privacy files into this folder (PrivateFolder)
4. To hide the PrivateFolder, double click again the Private.bat , it will ask you 'Are you sure to lock this folder? (Y/N)', write Y and hit enter key.



Now the PrivateFolder is missing. At this condition your files are safe when someone else using your computer.



5. To make it (PrivateFolder) appearing again.
Double click Private.bat
It will ask you the password. 'Enter password to unlock Your secure Folder'.


Enter the password.
(The temporary password is howto72 you can change it inside the scripts, find the word howto72 then replace with yours)


The PrivateFolder will appear again.




Here the code/scripts, copy and paste it to Notepad.

cls
@ECHO OFF
title Folder PrivateFolder
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST PrivateFolder goto MDPrivateFolder
: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 PrivateFolder "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%==howto72 goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" PrivateFolder
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDPrivateFolder
md PrivateFolder
echo PrivateFolder created successfully
goto End
:End
.


You can change the name of folder by rename all PrivateFolder (red font) with yours.
To change the password, replace howto72 (blue font) using your password.

Save it with bat extension (*.bat), for example Private.bat
Save as type; All Files