How to Protect Folders With Passwords

This wikiHow teaches you how to password-protect a folder on both Windows and Mac computers. Open Start . This icon is in the bottom-left corner of the screen. You can also press to open Start. Click . It's in the lower-left side of the...

Method 1 of 2:

On Windows

  1. Picture 1 of How to Protect Folders With Passwords
    Open Start
    Picture 2 of How to Protect Folders With Passwords
    . This icon is in the bottom-left corner of the screen. You can also press Win to open Start.
  2. Picture 3 of How to Protect Folders With Passwords
    Click
    Picture 4 of How to Protect Folders With Passwords
    . It's in the lower-left side of the Start window. Doing so opens the File Explorer.
  3. Picture 5 of How to Protect Folders With Passwords
    Go to a location with files you'd like to hide. You'll do this in the column of folders on the left side of the File Explorer window.
  4. Picture 6 of How to Protect Folders With Passwords
    Click the Home tab. It's at in the top-left side of the File Explorer menu bar.
  5. Picture 7 of How to Protect Folders With Passwords
    Click New item. This option is on the right side of the Home tool bar, which is at the top of the File Explorer window.
  6. Picture 8 of How to Protect Folders With Passwords
    Click Text Document, then press Enter. Doing so creates a new, blank text document in your current folder.
  7. Picture 9 of How to Protect Folders With Passwords
    Double-click your text document. This will open it.
  8. Picture 10 of How to Protect Folders With Passwords
    Click Format, then check Word Wrap. This ensures that the code you use to lock the folder will be properly formatted.
    1. If there's already a checkmark next to Word Wrap, skip this step.
  9. Picture 11 of How to Protect Folders With Passwords
    Copy the script below:
    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 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 
    1. To do this, highlight the entire script, right-click it, and select Copy.
  10. Picture 12 of How to Protect Folders With Passwords
    Paste the script into your text document. To do this, right-click the text document window, then click Paste.
  11. Picture 13 of How to Protect Folders With Passwords
    Edit your password. To do this, change the "Your-Password-Here" line of text to the password you want to use.
  12. Picture 14 of How to Protect Folders With Passwords
    Save your text document as a batch file. To do so:
    1. Click File.
    1. Click Save As.
    1. Click the "Save as type" box and select All Files.
    1. Type "FolderLocker.bat" into the "File name" field.
    1. Click Save.
  13. Picture 15 of How to Protect Folders With Passwords
    Double-click FolderLocker. This will run the code you copied earlier, which creates a folder entitled "Locker" in your current folder.
  14. Picture 16 of How to Protect Folders With Passwords
    Move your files into the "Locker" 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.
  15. Picture 17 of How to Protect Folders With Passwords
    Double-click FolderLocker again. Doing so opens a Command Prompt window.
  16. Picture 18 of How to Protect Folders With Passwords
    Press Y, then press Enter. This will lock and hide the folder with your files in it.
    1. 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.
Method 2 of 2:

On Mac

  1. Picture 19 of How to Protect Folders With Passwords
    Open Spotlight
    Picture 20 of How to Protect Folders With Passwords
    . It's in the top-right corner of the screen.
  2. Picture 21 of How to Protect Folders With Passwords
    Type disk utility then press Return. This will open the Disk Utility app.
  3. Picture 22 of How to Protect Folders With Passwords
    Click File. This menu item is in the top-left side of the Mac's screen.
  4. Picture 23 of How to Protect Folders With Passwords
    Select New Image, then click Image from Folder. This will open a finder window.
    1. On some older Macs, this option may be labeled "Disk Image from Folder" instead.
  5. Picture 24 of How to Protect Folders With Passwords
    Select the folder you want to password protect and click Open. Click the box at the top of the pop-up window, click your folder's location (e.g., Desktop), click your folder, and click Open.
  6. Picture 25 of How to Protect Folders With Passwords
    Enter a name for your folder. Do so in the "Save As" field.
  7. Picture 26 of How to Protect Folders With Passwords
    Click the "Encryption"drop-down box and select 128-bit AES encryption. It's in the "Encryption" drop-down menu.
  8. Picture 27 of How to Protect Folders With Passwords
    Click the "Image Format" drop-down box.
  9. Picture 28 of How to Protect Folders With Passwords
    Click read/write. This option will allow you add and remove files to your encrypted folder later.
  10. Picture 29 of How to Protect Folders With Passwords
    Click Save. This button is in the bottom-right corner of the window.
  11. Picture 30 of How to Protect Folders With Passwords
    Create a password and click Choose. Enter a password you want to set for your folder in the "Password" field, and enter it again in the "Verify" field to confirm. Then click the "Choose" button to set the password.
    1. Your passwords must match in order to continue.
  12. Picture 31 of How to Protect Folders With Passwords
    Click Save. It's a blue button at the bottom of the window. Doing so will create an encrypted copy of the original folder.
    1. If you named your image the same thing as your original folder, click Replace when prompted to replace the folder.
  13. Picture 32 of How to Protect Folders With Passwords
    Click Done when prompted. Your password-protected folder has been created. Your new password protected folder will appear as a ".dmg" file.
    1. You can delete the original folder that you used to create the password protected folder if you want, your files are safe in the ".dmg" that was just created.
  14. Picture 33 of How to Protect Folders With Passwords
    Open the password protected folder. Double-click the newly created ".dmg" file to open your password protected folder. This will prompt you for a password.
  15. Picture 34 of How to Protect Folders With Passwords
    Enter the password you set earlier and click OK. Your folder will open as a mounted virtual "drive" on the desktop. Once unlocked, this will open a window and display your files.
  16. Picture 35 of How to Protect Folders With Passwords
    Lock the folder. When you are done, you can lock the folder again by "Ejecting" the drive that was opened by one of the following ways:
    1. Click and drag the drive's icon to the trash.
    2. Right-click on the icon and select Eject "[Your Folder Name]"
    3. Click the eject button next to your folder's name in the Finder window on the left.
Update 05 March 2020
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile