Secure File Delete

I know how to do a simple file deletion in vb.net but is there a way to do a permanent delete so that the file could not be recovered using 3rd party recovery tools?
dthillsrAsked:
Who is Participating?
 
JohnConnect With a Mentor Business Consultant (Owner)Commented:
You should be able to write the data into existing records in your file. Open a record and write it back out with 0 (or 1) for the length of the record. Then do this for all records.

... Thinkpads_User
0
 
JohnConnect With a Mentor Business Consultant (Owner)Commented:
I think almost any file can be recovered if the computer is working properly.

I suggest you change the contents internally in VB to all zeros (the whole file) and then save it. Then delete it.

The contents of the old file might linger on for a bit but (a) not as a file and (b) they will disappear in time.

... Thinkpads_User
0
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
I agree that from disk, bits and bites can be recovered, the normal "file delete" will only delete the file pointer in the file system.
so, overwriting the file is the only way to go, the more often you change the contents, the better the security will be.
the important point is: the data you save must be the same size, otherwise the file data might be relocated on disk, so you actually may not overwrite the exact disk parts of where your file was.
so, you may replace the contents first with "only 0 bits", then with "only 1" bits, then with "01" sequences, finally with only "10" sequences.
0
 
dthillsrAuthor Commented:
I like the idea of changing the bits as suggested by the two of you but I don't know how to do this. Do you have something that could get me started?
0
 
JohnBusiness Consultant (Owner)Commented:
@dthillsr - Thanks and I was happy to help.

... Thinkpads_User
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.