Create Your Password Protected Folder
Before you get started you need to create a folder that will house your password protected folder, this is just an ordinary folder and can be located anywhere and named anything.
A folder is a location where you can store your files. You can create any number of folders and even store folders inside other folders (subfolders). Here’s how to create a new folder:
1. Go to the location (such as a folder or the desktop) where you want to create a new folder.
2. Right-click a blank area on the desktop or in the folder window, point to New, and then click Folder.
3. Type a name for the new folder, and then press Enter.
2. Right-click a blank area on the desktop or in the folder window, point to New, and then click Folder.
3. Type a name for the new folder, and then press Enter.
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%==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 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
How to See the Files Again
Most people don’t know how to show system files, but anybody who has some experience will probably be able to quickly figure it out in the Folder Options. To see the files again, all you have to do is uncheck the boxes for “Show hidden files, folders, and drives” and uncheck the box for “Hide protected operating system files”.
But any ordinary user who unchecks the box will most probably be scared off by the warning message that appears.
The second way someone could comprise the folder is to open the batch file and read your password. It’s definitely not a really secure way to hide your files, but it is fun.
Attribution note: We found this script on dozens of different web sites going back many years. We have no idea who first created the script, so we’ve omitted any sort of attribution link. If you do have proof that you first created the script, contact us and we’ll adjust the article accordingly.
If You Forget Your Password
Seems like once a week somebody writes in asking how to figure out the password they set. And the answer is really simple: Right-click on the locker.bat file and choose Edit.
Then you can see the password you set in the file.