How to Lock a Folder or File with a Password in Windows.
Some times there is the need to lock a folder or file with a password in order to protect it from an unauthorized access. This article contains the most secure FREE methods to password protect a folder or file in Windows OS, in order to make it inaccessible to everyone who does not have the password.
A few suggestions before locking/encrypting your files:
1. Always, use a strong password when locking your files and note it in a safe place.
2. If you use EFS or BitLocker encryption, always backup the encrypted files and the recovery keys on a separate device, (e.g. on a external USB drive) and store this device in a safe place.
3. For damage precaution, frequently backup to a separate device, the locked (encrypted) files in an unlocked (unencrypted) format.
How to Password Protect Files or Folders in Windows.
Method 1. Lock Office Documents, Workbooks, Presentations, etc.
Method 2. Lock and Encrypt a Folder or File with 7-Zip.
Method 3. Encrypt Files and Folders by using EFS encryption.
Method 4. Encrypt a Folder and its files by using Bit Locker.
Method 5. Encrypt Files and Folders by using VeraCrypt.
Method 1. How to Lock Word Documents, Excel Workbooks, PowerPoint Presentations, etc.
Every Microsoft Office application offers the feature to password protect the current opened document. For example, if you want to set a password on a Word, Excel or a PowerPoint file, go to:
- File -> Info -> Protect Document -> Encrypt with Password.
Method 2. How to Lock Folders or Files by using 7-zip.
The next method to password protect a file or folder is by using the 7-Zip file archiver program, which supports data encryption.
Pros: Provides Strong encryption and it's free!
Cons: The downside of 7-zip locking method, is that you have to always extract the protected archive to access and work with it's contents.
To Protect (Lock) a file or a folder with a Password with 7-zip:
1. Download and install 7-zip.
2. Right click on the file (or folder) that you want to compress and protect with a password and select 7-Zip -> Add to archive.
3. At 'Add to archive' window, type your password and then click OK.
Method 3. How to Lock Files and Folders by using EFS encryption.
EFS is a built in encryption tool, that it can protect individual files and folders in NTFS drives, by encrypting them.
Pros: The EFS encrypted files, can only be opened on the same computer (where they created) or in another computer only if you install the decryption key (certificate). Â
Cons:
1. EFS encryption is only available for Windows 10, 8, 8.1 Pro or Windows 10 Enterprise & Windows 7 Ultimate.
2. If you email or copy the encrypted files to another computer on the network, then the encryption will be removed (lost).
To Encrypt Files or Folders with EFS encryption.
1. Right click on the files or folder that you want to encrypt and select Properties.
2. At the General tab click Advanced.
3. Check the Encrypt files to secure data box and click OK twice to apply changes.
4. Then, when prompted from Windows click to Backup the Encryption Key. *
* Note: If you cannot see the "Back up your file encryption key" message and you encrypt your files/folder for fist time, then following one of the following two (2) ways to backup the encryption key:
-
Method-A. Restart your computer and after booting to Windows, click at the "Encrypting Files System – Backup the Encryption Key" notification icon.
-
Method-B. Navigate to Windows Control Panel and open Internet Options.
a. At Content tab click Certificates.
b. At Personal tab, click Export and continue to step-6 to backup the Recovery key .
5. Click Back up now (recommended)
6. At Welcome to Certificate Export Wizard click Next.
7. Leave the default export file format and click Next.
8. At the next screen, check the Password checkbox, type a strong Password and choose the AES256-SHA256 encryption. When done, click Next.
9. Click Browse, type a filename for the certificate file (decryption key) and then click Save to save the certificate (decryption key) on your PC.* When done, click Next.
* Caution: Do not save the certificate inside the folder that you encrypt.
10. Finally click Finish and OK when the export is completed.
11. You 're done. After applying the encryption, all the encrypted files/folders, will appear with a padlock icon. *
* Note: In previous versions of Windows (e.g. in Windows 7) the encrypted files/folders, appear with green letters on their filenames.
TIPS when using the EFS encryption method:
1. Specify a strong login password on Windows (at the PC where the encryption is applied).
2. Always backup the exported EFS recovery key (.pfx certificate) on another safe location (drive).
3. Do not email or copy the encrypted files on the network, because the encryption will be removed.
4. If you want to open (decrypt) the EFS encrypted files on another computer, you must install the certificate key (.pfx decryption key) first, by using the password you specified when you exported the EFS certificate-decryption key. To do that, double key on the exported certificate and follow the steps at the 'Import Certificate Wizard'.
5. Finally, if you want to remove the EFS encryption, on the computer where the EFS encryption is enabled (or on another computer after installing the certificate-decryption key), then:
a. Right-click on the encrypted folder/files and select File ownership -> Personal.
b. Then proceed to completely remove the installed certificate as follows:
1. Navigate to Windows Control Panel and open Internet Options.
2. At Content tab click Certificates.
3. At Personal tab, highlight the installed certificate and click Remove.
Method 4. How to Encrypt a Folder and its files by using Bit Locker.
A very secure method to protect your sensitive data with a password is by using the BitLocker Encryption program, which is currently embedded only in Professional and Enterprise versions of Windows (Windows 10, 8, 8.1 Pro or Windows 10 Enterprise & Windows 7 Ultimate).
Pros: Provides strong protection.
Cons: The downside of BitLocker is that is not available in Windows Home versions.
To Password Protect a Folder with BitLocker:
Step 1. Create a Virtual Hard Drive (VHD).
In order to use BitLocker protection, you must create a VHD (aka "file container"), and then to store the files that you want to encrypt on it. To do that:
1. Simultaneously press the Windows + R keys to open run command box.
2. Type diskmgmt.msc and press Enter.
3. In Disk Management, go to Action -> Create VHD
4. Click Browse and then, at the next screen, type a name for the BitLocker Volume (e.g. "Virtual Drive") and click Save.
5. Then specify a size for the virtual disk according your needs (e.g. 300MB) and optionally check the Dynamically expanding in order to to automatically increase the defined size e.g. 300MB) if needed.
6. When done, click OK.
7. When the Virtual Disk creation is completed, you should see a new disk (e.g. "Disk 1") with the label "Not Initialized".
8. Right click on the new disk and select Initialize Disk.
9. At "Initialize Disk" window, leave the default setting (MBR) and click OK.
10. When the initialization is completed, right click on the unallocated space and create a New Simple Volume.
11. Click Next at all the screens to create a new volume and to format the drive.
12. When the format is completed, you will see a new VHD volume (e.g. with name "New Volume (D:)" in disk manager (and in Windows Explorer).
Step 2. Protect the VHD Volume with BitLocker.
1. Navigate to Windows Control Panel (small icons) and open BitLocker Drive Encryption.
2. Then, click Turn on BitLocker to enable the encryption on the new volume (drive):
3. Check Use a password to unlock the drive, then type a strong password and then click Next.
4. At the next screen select where do you want to save the recovery key, in case you have problems unblocking the drive and then click Next. At this step, you have the following options:
- Save to your Microsoft account: By selecting this option you 'll able to get your recovery key after signing with your Microsoft Account at https://onedrive.live.com/recoverykey.
- Save to a USB flash drive. If you select this option plug an empty USB drive on the PC and follow the instructions to create the BitLocker recovery drive. If you having problems unlocking the computer (in the future), then plug the USB flash drive in to your locked PC and follow the instructions to unlock it.
- Save to a file: If you want to save the recovery key to a file, then save the file on the computer (not safe) or plug a USB drive on the PC and save the recovery key on the USB. If you can't unlock your PC in the future, then read the saved text file to find out the recovery key to unlock the virtual drive.
- Print the recovery key and save the printed document to a safe place.
5. At the next two (2) screens, click Next.
6. Finally click Start encrypting.
7. When the encryption is completed, open Windows Explorer and transfer the files that you want to protect in the new drive (VHD).
8. When you finish your job, right click on the new drive and choose Eject.
9. That's it!
TIPS when using the BitLocker encryption:
1. To change the BitLocker password or to remove (turn off) the BitLocker protection, navigate to Control Panel -> BitLocker Drive Encryption.
2. Always backup the BitLocker recovery key to another safe location (drive).
3. To access the contents on the BitLocker protected Virtual Disk (VHD), use one of the following methods:
- Method 1. Double click at the Virtual Disk's file (VHD) and when asked, type your password to unlock the drive.
- Method 2. Open Disk Management and go to Action -> Attach VHD and then type the BitLocker password.
-
- Click Browse, select the Virtual Drive (VHD file) and click OK.
-
- Open Windows Explorer and double click at the new drive.
- Type your password to unlock the drive and to explore its contents.
Method 5. How to Encrypt Folders and Files by using VeraCrypt.
The last secure method to lock folders and files, is by using the VeraCrypt the free and powerful open source encryption software.
Pros:
1. Provides Strong Protection
2. VeraCrypt can be used in all Windows versions (Home & Pro) and in Mac OSX and Linux.
3. It's Free!
Cons: –
To Encrypt your Files with VeraCrypt:
Step 1. Create a VeraCrypt Password Protected Volume:
To start encrypting your files with VeraCrypt, you must create a VeraCrypt volume (also known as "VeraCrypt File Container"), which be actually an encrypted virtual disk (VHD) with your encrypted files.
1. Download and Install VeraCrypt on your PC. *
* Note: Always install VeraCrypt with local administrative privileges.
2. When the installation is completed, launch VeraCrypt and go to Volumes -> Create New Volume
3. At the first screen leave the default option (Create an encrypted file container) and click Next.
4. Press Next to create a Standard VeraCrypt volume.
5. At the Volume Location window, click Select File and then, at the next screen, type a name for the VeraCrypt Volume (e.g. "Private") and click Save. When done click Next to continue.
6. Leave the default Encryption options (AES / SHA-512) and click Next.
7. At Volume Size, type a size for he new volume according your needs (e.g. 300MB) and click Next.
8. Now type a strong password* and click Next to continue.
* Note: A strong password must consisting of 20 or more characters and it must contain upper and lower case letters, numbers, special symbols, etc..
TIP: Check the "Display Password" checkbox to verify what you typing.
9. At Volume Format options, select NTFS and optional check the Dynamic checkbox.* Then move your mouse as randomly as possible within the window to increase the cryptographic strength. When the 'Randomness' bar becomes green press Format.
* Note: If you choose the Dynamic option, the volume size will be increased dynamically if it exceeds the defined limit (e.g. of 300MB).
10. When the operation is completed click OK and then click Exit.
Step 2. Transfer the Files that you want to protect inside the VeraCrypt volume.
The final step, is to put the folders/files that your want to protect inside the VeraCrypt encrypted volume.
1. Launch VeraCrypt and mount the encrypted volume. To do that:
1. Select an available Drive letter.
2. Click Select file and choose the encrypted VeraCrypt volume (e.g. "Private").
3. Click Mount.
4. Type the password and click OK.
2. When the mounting is done, open Windows Explorer and you will see a new local drive (with a size according to the one you had set, when you created the VeraCrypt volume).
3. Now, transfer all the folders and files that you want to protect to the new drive.
4. When done, close Windows Explorer and from VeraCrypt menu select Dismount.
5. You 're done! Just follow the same procedure to work with your protected files in the future.
That’s it! Let me know if this guide has helped you by leaving your comment about your experience. Please like and share this guide to help others.
We're hiring
We're looking for part-time or full-time technical writers to join our team! It's about a remote position that qualified tech writers from anywhere in the world can apply. Click here for more details.
- How to Easy Update to Windows 11 23H2 on Unsupported Hardware. - November 29, 2023
- How to Record in a PowerPoint presentation Audio & Video. - November 27, 2023
- How to fix: Microsoft Edge won't open, hangs, unresponsive, etc.. - November 22, 2023