1

The main objective is to completely remove the content of a text file from HDD or SSD, without drive formatting and overwriting, and be completely sure that it cannot be recovered. The file can remain on the disk, just its original content should be permanently removed. OS: Windows. Admin rights: NO (executable cannot be run).

If I only delete my_text.txt file, someone else will be able to recover the file and it's data using certain file recovery software. What is the best way to remove such a file without using any of the tools?

I came up with one solution, but I am not sure, if it does the job.

Possible solution which I got after reading this question and encryption not being an option:
Let us assume that the my_text.txt file size is 40960 bytes. The original file should be opened in the text editor, where an alternate (meaningless) text of bigger size (45056 bytes) should be pasted over the selected old text. The file should be saved after this.

QUESTION: Will this solution permanently overwrite the original content of the file on disk? I suppose so, because the header and pointer of the file were not modified, just the data in its container was overwritten.

6
  • groovypost.com/howto/7-free-ways-securely-delete-files-windows - just override the file multiple times.
    – CaldeiraG
    Dec 18, 2019 at 13:31
  • @CaldeiraG I forgot to mention that the user has no administrator rights to run an executable, let alone install it.
    – Mike
    Dec 18, 2019 at 13:33
  • Use a portable version of the app, one of them is referred on that article.
    – CaldeiraG
    Dec 18, 2019 at 13:34
  • You still need administrator rights to run the executable on an external drive in my case.
    – Mike
    Dec 18, 2019 at 13:45
  • "Will this solution permanently overwrite the original content of the file on disk?" - Maybe; If File History is turned on a non-Administrator can restore the file.
    – Ramhound
    Dec 18, 2019 at 15:03

2 Answers 2

0

TL:DR… this is not possible at single-file level without an already-encrypted drive.

Your potential solution will not work.

When you save a file, the old location is not overwritten. Instead, a new file is written at a random free location decided by the OS & drive hardware. Once that file is safely written, the marker as to where the old file was is then silently removed.

The file is still exactly where it was - & by extrapolation, so are all other earlier versions of it, each time you save [or your system auto-saves or backs up].

Your remaining option is still not secure… Erase free space on the drive.
For an HD this is merely tedious, takes a long time & may result in all traces of the file being overwritten, though it has potential that some information may survive in unused areas of the drive, set aside for provisioning or marked as bad.
For an SSD, this is rather harmful, forcing overwrite of sectors with a known write cycle limit. Additionally, the amount of over-provisioning & redundancy employed by the drive is opaque to the user. Forcing a manual TRIM will aid this, but will also reduce the drive's life, & shouldn't be used as part of any regular 'cleaning' or 'optimisation'.

Your only completely, utterly, paranoid-safe way to ensure a deleted file is completely & irrecoverably gone is to have encrypted the drive before first use.

Your best bet now is to encrypt it now.
That is really not much safer than secure erase in absolute terms, but is less taxing on the drives themselves.

-1

I may suggest you could boot to a windows PE from a USB and use a tool to "wipe free space" this will go over with 0 and 1 all the FREE space so not the whole drive.

CCleaner has this feature: https://www.ccleaner.com/docs/ccleaner/using-ccleaner/wiping-free-disk-space

I use Hirens boot CD for the Windows 10 PE: https://www.hirensbootcd.org/

For this to work you would have to delete the file and empty the Recycle bin first, boot to the USB run something like CCleaner portable or many others and use the "wipe free space" feature. Good luck

4
  • and while your there you could shrink the main partition and install your own windows 10 with admin rights :).
    – Davef
    Dec 18, 2019 at 13:51
  • So your suggestion is for a non-Administrator on a machine is to boot to another environment? While this might work for mechanical drives it does not actually work that well for SSDs.
    – Ramhound
    Dec 18, 2019 at 14:54
  • no overwriting of any kind is good for SSDs in any capacity.
    – Davef
    Dec 22, 2019 at 15:17
  • So why do you make that suggestion?
    – Ramhound
    Dec 22, 2019 at 16:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .