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. How to Protect Folders With Passwords Picture 1How to Protect Folders With Passwords Picture 1
    Open Start
    How to Protect Folders With Passwords Picture 2How to Protect Folders With Passwords Picture 2
    . This icon is in the bottom-left corner of the screen. You can also press Win to open Start.
  2. How to Protect Folders With Passwords Picture 3How to Protect Folders With Passwords Picture 3
    Click
    How to Protect Folders With Passwords Picture 4How to Protect Folders With Passwords Picture 4
    . It's in the lower-left side of the Start window. Doing so opens the File Explorer.
  3. How to Protect Folders With Passwords Picture 5How to Protect Folders With Passwords Picture 5
    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. How to Protect Folders With Passwords Picture 6How to Protect Folders With Passwords Picture 6
    Click the Home tab. It's at in the top-left side of the File Explorer menu bar.
  5. How to Protect Folders With Passwords Picture 7How to Protect Folders With Passwords Picture 7
    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. How to Protect Folders With Passwords Picture 8How to Protect Folders With Passwords Picture 8
    Click Text Document, then press Enter. Doing so creates a new, blank text document in your current folder.
  7. How to Protect Folders With Passwords Picture 9How to Protect Folders With Passwords Picture 9
    Double-click your text document. This will open it.
  8. How to Protect Folders With Passwords Picture 10How to Protect Folders With Passwords Picture 10
    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. How to Protect Folders With Passwords Picture 11How to Protect Folders With Passwords Picture 11
    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. How to Protect Folders With Passwords Picture 12How to Protect Folders With Passwords Picture 12
    Paste the script into your text document. To do this, right-click the text document window, then click Paste.
  11. How to Protect Folders With Passwords Picture 13How to Protect Folders With Passwords Picture 13
    Edit your password. To do this, change the "Your-Password-Here" line of text to the password you want to use.
  12. How to Protect Folders With Passwords Picture 14How to Protect Folders With Passwords Picture 14
    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. How to Protect Folders With Passwords Picture 15How to Protect Folders With Passwords Picture 15
    Double-click FolderLocker. This will run the code you copied earlier, which creates a folder entitled "Locker" in your current folder.
  14. How to Protect Folders With Passwords Picture 16How to Protect Folders With Passwords Picture 16
    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. How to Protect Folders With Passwords Picture 17How to Protect Folders With Passwords Picture 17
    Double-click FolderLocker again. Doing so opens a Command Prompt window.
  16. How to Protect Folders With Passwords Picture 18How to Protect Folders With Passwords Picture 18
    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. How to Protect Folders With Passwords Picture 19How to Protect Folders With Passwords Picture 19
    Open Spotlight
    How to Protect Folders With Passwords Picture 20How to Protect Folders With Passwords Picture 20
    . It's in the top-right corner of the screen.
  2. How to Protect Folders With Passwords Picture 21How to Protect Folders With Passwords Picture 21
    Type disk utility then press Return. This will open the Disk Utility app.
  3. How to Protect Folders With Passwords Picture 22How to Protect Folders With Passwords Picture 22
    Click File. This menu item is in the top-left side of the Mac's screen.
  4. How to Protect Folders With Passwords Picture 23How to Protect Folders With Passwords Picture 23
    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. How to Protect Folders With Passwords Picture 24How to Protect Folders With Passwords Picture 24
    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. How to Protect Folders With Passwords Picture 25How to Protect Folders With Passwords Picture 25
    Enter a name for your folder. Do so in the "Save As" field.
  7. How to Protect Folders With Passwords Picture 26How to Protect Folders With Passwords Picture 26
    Click the "Encryption"drop-down box and select 128-bit AES encryption. It's in the "Encryption" drop-down menu.
  8. How to Protect Folders With Passwords Picture 27How to Protect Folders With Passwords Picture 27
    Click the "Image Format" drop-down box.
  9. How to Protect Folders With Passwords Picture 28How to Protect Folders With Passwords Picture 28
    Click read/write. This option will allow you add and remove files to your encrypted folder later.
  10. How to Protect Folders With Passwords Picture 29How to Protect Folders With Passwords Picture 29
    Click Save. This button is in the bottom-right corner of the window.
  11. How to Protect Folders With Passwords Picture 30How to Protect Folders With Passwords Picture 30
    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. How to Protect Folders With Passwords Picture 31How to Protect Folders With Passwords Picture 31
    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. How to Protect Folders With Passwords Picture 32How to Protect Folders With Passwords Picture 32
    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. How to Protect Folders With Passwords Picture 33How to Protect Folders With Passwords Picture 33
    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. How to Protect Folders With Passwords Picture 34How to Protect Folders With Passwords Picture 34
    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. How to Protect Folders With Passwords Picture 35How to Protect Folders With Passwords Picture 35
    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.
4.5 ★ | 2 Vote