When a file is sent to the Recycle Bin, it may be simply recovered. When a file is deleted, it may often be recovered intact provided few file operations have taken place on the disk since deletion. (You need special software for this but the process is straightforward.) Clearly, there may be occaisions when files need to be destroyed in such a way that the contents are lost forever (rather like shredding and/or burning paper documents). Obviously, this should not occur accidentally, therefore a dialog is required to ensure that the user is given the chance to cancel the operation.
- If files are selected, only these will be destroyed, otherwise all files in the listbox will be destroyed.
- This dialog can operate on single files, single directories and multiple files/directories. However, files larger than 2GB cannot be obliterated.
- Before destruction of files begins, you will be required to type a word such as OBLITERATE (and press the Enter key) to confirm your choice of action.
- If a file or directory has any of the attributes System, Hidden or Read-only, and the corresponding checkbox is clear, you will have to confirm the operation.
- If any part of the obliteration process fails, an error message will be displayed. You will have the chance to continue or abort the whole process.
- Files are obliterated by the following process :-
- The file is opened with exclusive (non-sharing) read-write access. (File attributes will be cleared to gain access.)
- The file is overwritten using random data. The file's length is rounded up to the nearest multiple of 4096 (or whatever cluster size is in use on the disk) as part of this process.
- The system cache is flushed and the length of the file is set to zero.
- The file (or directory) is closed and renamed “__Erased.XXX”.
- The file (or directory) is deleted.
- Files located on a remote computer may not be obliterated. (This is a deliberate security measure to minimise damage by misuse.)
Question: Could anyone recover the data after it is obliterated?
For all practical purposes, once destroyed the data will not be recoverable from a hard disk. Floppy disks are another matter. Head alignment on floppy drives varies slightly. Someone with specialist equipment might be able to recover data fragments if files were written using one drive and obliterated by another.Unless you work in the field of national security or operate on the wrong side of the law, the obliteration process should be adequate for your needs. Nevertheless, you should be aware that the tail-end of a file that was shortened prior to destruction will not be overwritten by random data if the shortening resulted in fewer clusters being allocated to the file. That tail-end might be recovered by someone with the right skills and software.