11 replies
by rproffitt edited Accepted solution
by sender282 Accepted solution
by kees_b edited Accepted solution
The maker of the program that asks for the password to protect the file. For example, a zip-file can be password protected. Then ask the author of the program you want to open it with (like 7-zip) to implement such a feature.
But, of course, any copy of that file the user made wouldn't be deleted, although still inaccessable without the password. I see no added security by deleting the original if the user can make as many copies of the file as he wants.
By the way, 7-zip is open-source. So you can build your own version that has this.
it might be easier to publish such an encrypted file on your website, and asking for a password to download it. Then only people with the password can download and read it. That's a nice protection. Maybe there is no reason even to encrypt it.
by sender282 Accepted solution
by kees_b Accepted solution
First question: yes.
Second question: no. A file that is being accessed, can't be deleted, so a file can't delete itself.
All you can do:
1. Send an encrypted file.
2. Send a program that asks for a password to open it, and deletes it when the password is entered wrong x amount of times. When it's entered correctly, it should decrypt the file to a temporary unencrypted one and open that with the right program (like MS Word if it's a word document, or Adobe Reader if it's a pdf-file), Most of such programs allow the use to save the (unencrypted) file. That's not a very good security, isn't it? And, of course, the user can make any number of copies of the original unencrypted version.
I don't think it's a feasible idea.
by rproffitt edited Accepted solution
Example of how to delete that app that would have created the document.
1. Password, etc.
2. On failure, create another app, launch that app, first app exits and the second app deletes the first executable.
Let's be honest here. If you can't write code, you should outsource this.
by kees_b Accepted solution
by sender282 Accepted solution
by kees_b Accepted solution
No, you can't wipe a file system that has a file that's being accessed.
Why do you want this so badly?
by DediRock Accepted solution
by piperrebecca977 Accepted solution
Yeah, hypothetically it’s possible. You could write a script or use a program that tracks failed attempts and deletes the file after a set number. But there are a few catches:
It’s risky — accidental typos or bugs could wipe your file.
File deletion isn’t always truly permanent unless you overwrite it securely.
Most mainstream encryption tools (like VeraCrypt or BitLocker) don’t have this feature built-in because it can lead to data loss.
You’d need custom code or a modified tool to do it safely and reliably. It’s more of a niche security measure than a standard practice.
This discussion is closed to new replies.
Trending Security posts
Sort by Trending