This wikiHow teaches you how to password protect folders on Windows and Mac computers.
Step
Method 1 of 2: For Windows
Open menu"
Step 1. Start
Step 2.
. It's a menu icon in the lower-left corner of the screen. You can also press the button
Step 3. Win to open the menu
Step 4. Start ”
Step 5.


Step 6. Click
It's in the lower-left corner of the “Start” window. After that, a File Explorer window will be opened.

Step 7. Go to the folder with the files you want to hide
Select a location in the folder column on the left side of the File Explorer window.

Step 8. Click the “Home” tab
It's in the upper-left corner of the File Explorer menu bar.

Step 9. Click New item
This option is to the right of the “Home” toolbar at the top of the File Explorer window.

Step 10. Click Text Document, then press the button Enter.
After that, a new blank document will be created in the currently open folder.

Step 11. Double-click the text document
After that, the document will be opened.

Step 12. Click Format, then mark Word Wraps.
With this option, the code used to lock the folder will be properly formatted.
If a check mark is displayed next to the option “ Word Wrap ”, skip this step.
Copy the following code:

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 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 copy it, mark the entire code, right click, and select “ Copy ”.
Paste the code into the text document. To paste it, right-click the text document window, then select “ Paste ”.

Edit password. To edit it, change the "Your-Password" line of text to the password you want to use.

Save the text document as a batch file. To save it:

- Click the menu " File ”.
- Click " Save As ”.
- Click the "Save as type" box and select " All Files ”.
Type "FolderLocker.bat" into the "File name" field
Click " Save ”.
Double-click FolderLocker. After that, the previously copied code will be executed and a folder labeled "Locker" will be created in the currently opened folder.

Move the files you want to hide to the " Locker " folder. To move them, mark the folders by clicking and dragging the cursor over all the files, then click and drag files to the " Locker " folder.

Double-click FolderLocker again. After that, a Command Prompt window will be opened.

Press the Y key, then press the Enter key. Now, the folder containing the file will be locked and hidden.

If you want to access the locked folder, double click the folder “ FolderLocker ” and enter the correct password in the pop-up window.
Method 2 of 2: For Mac

Step 1. Open Spotlight
It's in the upper-right corner of the screen.

Step 2. Type disk utility and press Return key
After that, the Disk Utility application will be opened.

Step 3. Click File
This menu option is in the upper-left corner of your computer screen.

Step 4. Select New Image, then click Images from Folders.
After that, a new Finder window will open.
On some older Mac computers, this option may be labeled as " Disk Image from Folder"

Step 5. Select the folder you want to password protect and click Open
Click the box at the top of the pop-up window, click a folder location (eg Desktop ”), click the folder, and select “ Open ”.

Step 6. Enter the folder name
Type a name in the "Save As" field.

Step 7. Click the " Encryption " drop-down box and select 128-bit AES encryption
This option is in the " Encryption " drop-down menu.

Step 8. Click the “Image Format” drop-down box

Step 9. Click read/write
This option allows you to add and remove files to an encrypted folder.

Step 10. Click Save
It's in the lower-right corner of the window.

Step 11. Create a password and click Choose
Enter the password you want to set in the folder in the " Password " field, and re-type the password in the " Verify " field to confirm. After that, click the "Choose" button to set a password.
The password must match before you can move on to the next step

Step 12. Click Save
It's a blue button at the bottom of the window. After that, an encrypted copy of the original folder will be created.
If you named the copy with the same label as the original folder name, click the “ Replace ” when prompted to change the folder.

Step 13. Click Done when prompted
Now, you have a password protected folder. The folder will appear as a ".dmg" file.
You can delete the original folder used to create the password protected folder if you want. Your files are safely stored in the ".dmg" file you just created

Step 14. Open the password protected folder
Double-click the newly created ".dmg" file to open the folder. After that, you will be asked to enter a password.

Step 15. Enter the previously set password and click OK
The folder will load as a virtual disk on the desktop. Once open, a new window will open and display the files stored in it.

Step 16. Re-lock the folder
When you're done, you can re-lock the folder by “unmounting” the open disk in one of the following ways:
- Click and drag the disc icon to the trash (Trash).
- Right click the icon and select " Eject "[folder name] "
- Click the eject button next to the folder name, on the left side of the Finder window.