Locking a .TXT File?

Best way to achieve the same results is to make an encrypted dmg and leave your private files on that. Leave it in the dock so you only have to click once to open it, enter the password you chose and presto there are your secure files. This also hides the name of your private files just not their content.
 
Launch Disk Utility, and select File > New > Blank Disk Image. Set the size to whatever you want, set encryption to AES-128, and set the format to "Sparse disk image". Create it, and specify a password. This will give you a read/write disk image that will dynamically resize itself to fit the data you store in it (up to the amount you specified under "size").
 
You can lock your entire computer if you go to System Prefs/Security/check "Require password to wake this computer... Are you trying to protect a file/data while you're away from your computer at work?
 
Back
Top