How to Protect Folders With Passwords
Open Start ., Click ., Go to a location with files you'd like to hide., Click the Home tab., Click New item., Click Text Document, then press ↵ Enter., Double-click your text document., Click Format, then check Word Wrap., Copy the script below: cls...
Step-by-Step Guide
-
Step 1: Open Start .
This icon is in the bottom-left corner of the screen.
You can also press ⊞ Win to open Start. , It's in the lower-left side of the Start window.
Doing so opens the File Explorer., You'll do this in the column of folders on the left side of the File Explorer window., It's at in the top-left side of the File Explorer menu bar., This option is on the right side of the Home tool bar, which is at the top of the File Explorer window., Doing so creates a new, blank text document in your current folder., This will open it., This ensures that the code you use to lock the folder will be properly formatted.
If there's already a checkmark next to Word Wrap, skip this step. ,{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK if NOT EXIST Locker goto MDLOCKER :
CONFIRM echo Are you sure you want to lock this 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%==Your-Password-Here 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 To do this, highlight the entire script, right-click it, and select Copy., To do this, right-click the text document window, then click Paste., To do this, change the "Your-Password-Here" line of text to the password you want to use., To do so:
Click File.
Click Save As.
Click the "Save as type" box and select All Files.
Type "FolderLocker.bat" into the "File name" field.
Click Save. , This will run the code you copied earlier, which creates a folder entitled "Locker" in your current folder., To do so, highlight the folders by clicking and dragging your mouse across them, then click and drag the files onto the "Locker" folder., Doing so opens a Command Prompt window., This will lock and hide the folder with your files in it.
If you want to access your locked folder, you'll have to double-click FolderLocker again and then enter your password into the pop-up window. -
Step 2: Click .
-
Step 3: Go to a location with files you'd like to hide.
-
Step 4: Click the Home tab.
-
Step 5: Click New item.
-
Step 6: Click Text Document
-
Step 7: then press ↵ Enter.
-
Step 8: Double-click your text document.
-
Step 9: Click Format
-
Step 10: then check Word Wrap.
-
Step 11: Copy the script below: cls @ECHO OFF title Folder Locker if EXIST "Control Panel.
-
Step 12: Paste the script into your text document.
-
Step 13: Edit your password.
-
Step 14: Save your text document as a batch file.
-
Step 15: Double-click FolderLocker.
-
Step 16: Move your files into the "Locker" folder.
-
Step 17: Double-click FolderLocker again.
-
Step 18: Press Y
-
Step 19: then press ↵ Enter.
Detailed Guide
This icon is in the bottom-left corner of the screen.
You can also press ⊞ Win to open Start. , It's in the lower-left side of the Start window.
Doing so opens the File Explorer., You'll do this in the column of folders on the left side of the File Explorer window., It's at in the top-left side of the File Explorer menu bar., This option is on the right side of the Home tool bar, which is at the top of the File Explorer window., Doing so creates a new, blank text document in your current folder., This will open it., This ensures that the code you use to lock the folder will be properly formatted.
If there's already a checkmark next to Word Wrap, skip this step. ,{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK if NOT EXIST Locker goto MDLOCKER :
CONFIRM echo Are you sure you want to lock this 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%==Your-Password-Here 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 To do this, highlight the entire script, right-click it, and select Copy., To do this, right-click the text document window, then click Paste., To do this, change the "Your-Password-Here" line of text to the password you want to use., To do so:
Click File.
Click Save As.
Click the "Save as type" box and select All Files.
Type "FolderLocker.bat" into the "File name" field.
Click Save. , This will run the code you copied earlier, which creates a folder entitled "Locker" in your current folder., To do so, highlight the folders by clicking and dragging your mouse across them, then click and drag the files onto the "Locker" folder., Doing so opens a Command Prompt window., This will lock and hide the folder with your files in it.
If you want to access your locked folder, you'll have to double-click FolderLocker again and then enter your password into the pop-up window.
About the Author
Frances Knight
Dedicated to helping readers learn new skills in crafts and beyond.
Rate This Guide
How helpful was this guide? Click to rate: