HOW TO PASSWORD PROTECT YOUR FOLDERS IN WINDOWS
Perhaps you might be looking for ways you could use to protect your files from other users. One of the simplest ways is to lock them in a password protected folder. Below is a simple 9 steps procedure of locking your folder.
Procedure
- Open the Notepad app on your computer.
- Copy and paste the code below
CODE To password protect your folder
cls
@ECHO OFF
title Folder Locker
if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
: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 Locker “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%==247127 goto FAIL
attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End
- On the code locate the line if NOT %pass%==MyPassword goto FAIL
Replace ‘ MyPassword ’ with your password of choice ( Set your password).
- Now open the folder or file you wish to lock.
- Go back to the code on Notepad and click ‘Save As’.
→Locate your folder and choose it as where you wish to save the code.
→Name the code file as ‘FolderLocker.bat’.
→Click save and close the Notepad window.
- In your folder there are two files with the name ‘FolderLocker’.
– A text file. Delete this text file to prevent other users from accessing your password.
– A windows batch file. Double-click this batch file. A new folder named ‘Locker’ will be generated.
- Cut all the files you wish to lock and paste them in the new Locker folder.
- Now, to lock your folder go back to the batch file and double-click it. A window prompting you to lock the folder will pop up. Type Y and click enter. Your locker folder disappears implying that you’ve successfully locked your files.
- To unlock the hidden folder for use.
→Double-click FolderLocker batch file.
→Enter your password and click enter. The Locker folder containing your hidden files will pop up. Open it to access your files.
Every time you finish accessing this your hidden folder you must lock it.
To lock it you : →Go to the FolderLocker file and double-click it. A prompt window will pop up.
→Type Y and click enter. Your Locker folder disappears; you’ve locked your folders successfully.
N.B: The Locker folder may appear on the Quick access list. Even though other users can’t access its contents, make sure you delete it as well.
I hope you found this article informative. Even thought this isn’t the best way to password protect your folders, it’s the easiest and you don’t have to download any dependencies.
You must log in to post a comment.