Password protection is really important when it comes to personal and private documents, which are meant not to be shared with anyone using your computer. You can protect files in many ways, but I would always prefer to do it without using any third party softwares, because you never know the authenticity of these tools. So the method we would be talking about here is will be done with the help of a script, which is error-free and is very efficient. All you’ll need is a password to unlock the folder, in which all your documents will be contained. And before entering the password, the user cannot even see the folder, so it’s very safe. So let’s get started. Please Note: “Virtuaniz” or the author is not responsible for any loss of documents or files because of any error on the users’ end.
Step 2: Open an empty notepad file (press Windows key + R and then type ‘notepad’ and hit enter). Paste the following code in the notepad pad file and save the file as “locker.bat” in the same folder which contains all your files.
title Folder Private
if EXIST “HTG Locker” goto UNLOCK
if NOT EXIST Private goto MDLOCKER
echo Are you sure you want to lock the folder(Y/N)
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
ren Private “Virtuaniz Locker”
attrib +h +s “Vituaniz Locker”
echo Folder locked
echo Enter password to unlock folder
if NOT %pass%== PASSWORD_GOES_HERE goto FAIL
attrib -h -s “Virtuaniz Locker”
ren “Virtuaniz Locker” Private
echo Folder Unlocked successfully
echo Invalid password
echo Private created successfully
Replace ‘PASSWORD_GOES_HERE’ with a password of your choice.
Step 4: Click on “locker.bat” file again, now it will ask whether you want to lock the folder or not. To lock the folder enter “y” and hit enter.