How to Set a Password to a Folder

Techwalla may earn compensation through affiliate links in this story.
Image Credit: Westend61/Westend61/GettyImages

Whether you share your personal computer with others or you're just cautious about cybersecurity, it's likely that you want to keep some of your files private and secure. Things like banking information, confidential work documents, and notes with personal information can be exposed even if they're sitting in a folder hidden deep in an unexpected file directory. If you want to secure a folder, methods exist to password protect your files.


Setting a Folder Password

The question of how to put a password on a folder is complicated to answer. On both Windows and Mac computers, it is not possible to password protect a given folder from other users by default. It is possible to set a password requirement for a folder flagged as system-related, like those in a Windows system directory. However, they can be opened by any user on the computer who enters their own password – The folder password cannot be customized to a single user. This does not mean that folders cannot be password protected; it just means that the process requires more complicated procedures.


Video of the Day

Mac: Protected Disk Images

On Mac computers running Mac OS X 10.6 and above, you can lock a folder by turning it into what is called a "protected disk image." This is essentially a virtual hard drive that requires a password to access. To do this, open the Applications folder by pressing "Command + Shift + A" on your keyboard from the desktop. Locate and access the "Utilities" folder, and then open the program "Disk Utility."

In the Disk Utility program, click "File" and then "New Image," followed by "Image from Folder." You are asked to select a folder on your computer. Go to the folder you want to password protect and click "Open." Set the Image Format to "read/write" and set the Encryption to "128-bit AES encryption," which is the recommended setting. You are then prompted to enter and verify your chosen password. Name the disk image and then click "Save" and "Done" when the operation finishes. You can then delete the original folder. Your files are password secure in the new DMG file you've created, which can be opened and used as a secure folder.


Windows: Archive Encryption With 7-Zip

On Windows machines, answering the question of how to put a password on your folder requires you to download the free program 7-Zip. 7-Zip is an archival tool that can create highly compressed and encrypted files. While an archive created with 7-Zip cannot be opened and used as a secure folder in the same way a protected disk image can, a 7-Zip archive can still be used to keep files locked away from other users.

With 7-Zip installed, right-click the folder you want to secure to begin the process. Select "7-Zip" from the drop-down menu, followed by "Add to archive." In the window that appears, name the archive file and select its location. In the "Encryption" section at the bottom of the window, enter and verify your desired password and select the "Encrypt file names" option if you want to protect those from outside view as well. Click "OK," and your archive is created. You may then delete the original folder. You need 7-Zip and your password to access the new archive, and you need to repeat this process if you want to add files to the folder later, but the archive is secure and encrypted.