This wikiHow teaches you how to password protect a folder on both Windows and Mac.
Steps
Method 1 of 2: On Windows
Opens
Step 1.

Beginning. This icon is in the lower left of the screen. You can also open Start by pressing
Step 2. ⊞ Win
Step 3.


Step 4. Click

It's in the lower-left part of the Start window. Doing so will open File Explorer.

Step 5. Go to the location where the files you want to hide are
You can do this using the column on the left side of the File Explorer window.

Step 6. Click the Home tab
It's at the top left of the File Explorer menu bar.

Step 7. Click New Item
This option is on the right side of the Start toolbar, which is at the top of the File Explorer window.

Step 8. Click Text Document and then press ↵ Enter.
Doing so will create a blank text document in your current folder.

Step 9. Double click on your text document
Doing so will open it.

Step 10. Click Format and then dial Word wrap.
This will ensure that the code you are going to use to lock the folder is in the correct format.
- If there is already a check mark next to Word wrap, you can skip this step.

cls @ECHO OFF title Protect folder if EXIST "Control Panel. {21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK if NOT EXIST Private goto MDLOCKER: CONFIRM echo Are you sure you want to lock this folder? (Y / N) set / p "cho =>" if% cho% == S goto LOCK if% cho% == s goto LOCK if% cho% == n goto END if% cho% == N goto END echo Invalid selection goto CONFIRM: LOCK ren Private "Control Panel. {21EC2020-3AEA-1069-A2DD-08002B30309D}" attrib + h + s "Control Panel. {21EC2020-3AEA-1069-A2DD-08002B30309D}" echo Locked folder goto End: UNLOCK echo Enter the password to unlock the folder set / p "pass =>" if NOT% pass% == Here-goes-your-password goto FAIL attrib -h -s "Control Panel. {21EC2020-3AEA-1069- A2DD-08002B30309D} "ren" Control Panel. {21EC2020-3AEA-1069-A2DD-08002B30309D} "Private echo Folder unlocked successfully goto End: FAIL echo Invalid password goto end: MDLOCKER md Private echo Private folder created successfully goto End: EndTo do so, select all the code, right-click on it and choose Copy.



- Click on File.
- Click on Save as.
- Click on the box Save as type and select All the files.
In the "File name" field write "ProtectFolder.bat"
- Click on Keep.




- If you want to access the locked folder, you must double-click on Protect Folder again and then enter your password in the pop-up window.
Method 2 of 2: On Mac

Step 1. Open

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

Step 2. Type disk utility and press Return
Doing so will open the "Disk Utility" application.

Step 3. Click File
This menu option is at the top left of your Mac screen.

Step 4. Select New Image and then click Image from folder.
A Finder window will open.
On some older Mac models, this option may appear 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, then your folder location (for example, the Desk), then in the folder and finally in To open.

Step 6. Enter a name for your folder
Write it in the "Save as" field.

Step 7. Click on the "Encryption" drop-down box and select 128-bit AES Encryption
It's one of the options in the drop-down menu.

Step 8. Click the "Image Format" drop-down box

Step 9. Click read / write
By selecting this option, you will later be able to delete files from your protected folder.

Step 10. Click Save
This button is in the lower right corner of the window.

Step 11. Create a password and click Select
Type the password you want to put on the folder in the "Password" field and then type it again in the "Verify" field to confirm it. Then click the "Select" button to set the password.
In order to continue, the passwords must match

Step 12. Click Save
It's a blue button at the bottom of the window. Once you do, an encrypted copy of the original folder will be created.
- If you gave the image the same name as the original folder, click Replace when asked if you want to replace the folder.

Step 13. Click Done when that option appears
Now you will have created your password protected folder. This folder will appear as a ".dmg" file.
If you want, you can delete the original folder that you used to create the password-protected folder. Your files are safe in the ".dmg" file you just created

Step 14. Open the password protected folder
Double-click the ".dmg" file you just created to open the password-protected folder. They will ask you to enter the password.

Step 15. Enter the password you chose earlier and click OK
The folder will open as a virtual "drive" mounted on the desktop. Once it is unlocked, a window will open and your files will appear.

Step 16. Lock the folder
Once you're done, you can lock the folder again by "ejecting" the open drive. You can do it in any of the following ways:
- Click on the drive icon and drag it to the trash.
- Right-click on the icon and select Eject "[your folder name]".
- Click the "eject" button that appears next to your folder name on the left side of the Finder window.