No, but kind of, yes.
Yes and no, and probably not in the way you’re imagining it.
You can do something similar to password-protecting it using Windows security features, but success depends on using the computer the “right” way. I don’t recommend it. If you have something you want to password-protect to keep secure, I recommend a different approach.
Become a Patron of Ask Leo! and go ad-free!
Protecting a folder
Windows folder security can control access based on user accounts, but it’s complex and limited. For better security, use encryption tools like VeraCrypt or Cryptomator. These create password-protected virtual drives, keeping your data secure.
The Windows way
Windows allows you to place restrictions on who can do what with a folder or file. In Windows File Explorer, right-click on a folder. Click on Properties and then click on the Security tab.
Here you can see the security properties of a folder on my machine titled SecretFolder.
You can control who has access to that folder. By default, any “Authenticated Users” — users with login accounts on this machine — can examine the contents of that folder. I can remove that and further restrict access on an account-by-account basis.
It’s powerful but also complex.
The problem is it’s based on Windows user accounts. If you give your own account full access to the folder, as I assume you would, then anyone who can log in to the machine as you can access the folder. There’s no real password; it’s your ability to log in to Windows using the correct credentials that gives access.
For many who use Windows in what I’d call “the Windows way” — different login accounts for different users and always logging out when you’re not using the machine — that might be enough.1 For example, in a corporate environment, this might be the recommended approach.
I prefer a different approach: encryption. There are two options I’d consider.
For many years, my approach was to use the free open-source tool VeraCrypt to create an encrypted volume.
An encrypted volume is a single file on your computer’s hard drive. If someone looks at the file, they have no way to view its contents.
For example, I might have a file “C:\Users\askle\secretstuff.vc”. There’s nothing you can do with that file without VeraCrypt and the passphrase to the file. Since I know the passphrase, I can mount it using VeraCrypt, and suddenly a new drive appears — say drive “P:”. That drive contains all my protected files. I can change them, update them, delete them, or do whatever I want with them. Once I’m done, I can hide them all again by unmounting the VeraCrypt drive.
It’s both simple and elegant.
It’s also not tied to Windows user accounts or anything else. You can copy your encrypted file to another machine and mount it with VeraCrypt. You can even mount it on Macs and Linux machines.
Cryptomator works similarly to the process I just outlined for VeraCrypt except that each file is encrypted separately. Rather than a single encrypted volume, you’ll have many individually encrypted files and folders. When you “mount” the encrypted folder — once again specifying a passphrase to unlock it — the unencrypted version of that folder appears as an additional drive on your system.
Cryptomator is designed for encrypting files placed in cloud storage. Encrypting them individually allows them to be uploaded to cloud storage systems individually rather than needing to upload an entire volume every time any file changes.
But there’s nothing that says you need to use it in conjunction with cloud storage.
For example, I might have a folder “C:\Users\askle\SecretFolder” on my machine. Its contents appear as randomly named files and folders, each containing only random, encrypted data. When I mount that folder using Cryptomator and specify the correct passphrase, a new drive appears on my machine — say drive “P:” again. That drive contains all the unencrypted files and folders within SecretFolder. I can change them, update them, delete them, or do whatever I want with them. Once I’m done, I can hide them all again by simply unmounting the folder in Cryptomator.
Encryption is the answer. Password protection isn’t enough. Solutions like VeraCrypt, Cryptomator, and others are the safest ways to ensure your data remains secure.
My newsletter might be the answer, too! Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.
Footnotes & References
1: I’d probably want to add Bitlocker or Windows’ own file encryption so the file is actually encrypted on disk, and only decrypt-able by the login account that encrypted it.