NESTICT BLOG

The Nest for Resource Center

HOW TO PASSWORD PROTECT YOUR FOLDERS IN WINDOWS

keyboard hd

keyboard hd

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

  1. Open the Notepad app on your computer.
  2. 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

 

  1. On the code locate the line  if NOT %pass%==MyPassword goto FAIL

Replace ‘ MyPassword ’ with your password of choice ( Set your password).

  1. Now open the folder or file you wish to lock.
  2. 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.

  1. 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.

  1. Cut all the files you wish to lock and paste them in the new Locker folder.
  2. 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.
  3. 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.

 

Print Friendly, PDF & Email