@ECHO OFF
Private title Folder
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 "let =>"
if% for% == Y goto LOCK
if% for% == y goto LOCK
if% for% == n goto END
if% for% == N goto END
echo Invalid choice.
goto CONFIRM
: LOCK
Private "HTG Locker" lace
attrib + h + s "HTG Locker"
Folder locked echo
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"
lace "HTG Locker" Private
echo Folder Unlocked successfully
goto End
: FAIL
Password echo invalid
goto end
: MDLOCKER
md Private
Private echo created successfully
goto End
: End
Note:
In the above code, replace PASSWORD_GOES_HERE with the password you want to set. Finally, in Save as type select All type , name the file locker.bat .
Now you can delete the original text file.
Next, double click on the locker.bat file to open the file. Now it will create a new folder called Private . This Private folder is where you can store all important files and folders .
After moving the confidential data into the Private folder, double-click the locker.bat file.
Immediately a command line dialog box will appear with content asking if you agree to hide this folder, you just need to enter 'Y' then press ENTER.
After completing the Private folder will disappear.
If you want to access the Private folder, double-click on the locker.bat file and proceed to enter the password you have set up in the command line window and press ENTER.
To review the files, all you need to do is on the Folder Options window, uncheck the items that are Show hidden files, folders, and drives and Hide protected operating system files .
A warning window will appear on the screen as shown below:
To open the Folder Options window as well as to hide or show files and folders on Windows 7, 8 and 10, refer to the steps here.
If you accidentally forget your password or if you want to change your password, all you need to do is right-click on the locker.bat file and select Edit and change your password.
This way only helps protect your sensitive files from prying eyes. People who know this trick or are knowledgeable about computers can easily open the file you have hidden, then you need a real password setting tool for the directory. You can see the 3 software introduced by TipsMake.com: Wise Folder Hider, Folder Guard, Secure Folder
Refer to some of the following articles:
Good luck!