When you need to ensure the contents of a text file are secure, use the encryption option available in Windows 7 and Windows 8.1. Encryption makes the file inaccessible without the encryption key.
Locate the text file in File Explorer. You can encrypt the text file directly or put it in a new folder and then encrypt the folder. Right-click the file, select Properties and click the Advanced button. Select Encrypt Contents to Secure Data. Note that you can also compress the contents to save disk space. Click OK.
Click the Encrypt the File Only option to encrypt the text file. Select the Encrypt the File and Its Parent Folder only if you have placed the text file in a separate folder. Encrypting a Parent Folder encrypts everything in that folder.
Move the file to any drive that supports encryption using the NTFS file format. Encrypted file names appear green in File Explorer.
If you want to put an encrypted file into a FAT32 formatted USB drive, you need to reformat the drive to NTFS first.
If the destination drive doesn't support encryption, a dialog box may open to warn you that the encryption will be lost. You'll get this notification when moving the file to a FAT32 drive, however you won't get it if you move the file to a cloud-based drive like Google Drive.
Backing Up the Encryption Key
Because encrypted files require the encryption key created by Windows, you could lose access to the file if your computer crashes. After creating an encrypted file, back up the encryption key to a backup drive.
Click the Encrypting File System icon that appears in the Windows Taskbar immediately after creating your first encrypted file. If it doesn't appear there, click the Expand arrow to find it.
Alternatively, type "encryption" in Windows Search and select Manage File System Certificates.
Click Next when the Encrypting File System window opens. Click Next again.
Select a backup location drive and folder, then enter a secure password in both Password fields. Click Next once again.
Click the I'll Update My Encrypted Files Later if this is the first time you've encrypted a file. If you have encrypted files in the past, select All Logical Drives to update all of your encrypted files to use this one key. Click Next again to finish the backup process.
Sharing Encrypted Files
To access an encrypted file on two different computers, such as a computer at work and at home, you need to export the encryption key to the other computer.
- Type "certmgr.msc" in Windows Search and click the Certmgr.msc icon.
- Expand the Personal folder by clicking its Arrow and then select the key you made.
- Click the Action menu, select All Tasks and click Export to launch the Certificate Export Wizard.
- Launch Certmgr on the other computer, open the Personal folder and select Import from the Action menu's All Tasks option. The Certificate Import wizard opens.
To share an encrypted file with another person, such as via a USB drive, the other person must first export his encryption key using Certmgr and give it to you. You then need to import that key using your computer's Certmgr. Then:
- Right-click the file you are going to share and select Properties.
- Click the General tab, select Advanced and then Details.
- Click Add, and then click the certificate in the Select User dialog box. Click OK.