Do you have a friend or member of your extended family that fears the Deep State? Do they fear that somebody will look at the deleted files on their system and find out they what they were looking at on Fox News, CNN, MSNBC, or a gun website? The truth is cookie files are stored on our computers all the time, sometimes they are deleted, and then they are overwritten by other more recent files. Your files on your computer are completely safe however many times people still have this fear. While browser cookies can be deleted, they will still be present until the blocks where they were stored on the disk are overwritten. The good news is there is a way to easily overwrite the deleted contents of a hard drive safely without spending money on a tool. It is a simple concept that has been around for decades but it still works today.
Below is source code that can be dropped into Dev C++, Visual Studio, or Visual Code to create a simple executable that will work on any recent Windows system (it assumes 64-bit). The program creates a file and fills it with zeros. As it expands, all of the free blocks on the disk that were either never used or once held data will be overwritten. Once it reaches the maximum size (nearly the entire computer), it stops and deletes the file releasing all of the space it was consuming. This will alleviate the concerns your relatives have and let you have some well deserved peace.
// Overwrite.cpp#include <chrono>#include <iostream>#include <fstream>#include <string>#include <thread>#include <Windows.h>#include <shlobj.h>using namespace std;#define kBlocksize 10000000#define kWaitTime 1std::string GetMyDocumentsFolderPath(){ wchar_t Folder[1024]; HRESULT hr = SHGetFolderPathW(0, CSIDL_INTERNET_CACHE, 0, 0, Folder); if (SUCCEEDED(hr)) { char str[1024]; size_t mySize; //wcstombs(str, Folder, 1023); wcstombs_s(&mySize, str, 1024, Folder, 1023); return str; } else return "";}int main(){ ofstream myfile; char* memblock; long myLoop; __int64 myBlockCount; ULARGE_INTEGER TotalNumberOfFreeBytes; string myFileAndPath = GetMyDocumentsFolderPath(); if (myFileAndPath.length() > 0) { GetDiskFreeSpaceExA(NULL, NULL, NULL, &TotalNumberOfFreeBytes); myBlockCount = TotalNumberOfFreeBytes.QuadPart; myBlockCount = myBlockCount / kBlocksize; if (myBlockCount > 2000) myBlockCount -= 2000; std::cout << "Overwrite - copyright 2024 Jeffrey Hummel. All Rights Reserved.\n\n"; std::cout << "Press control-c to stop this program at any time.\n\n"; std::cout << "Will write " << myBlockCount << " blocks.\n"; memblock = new char[kBlocksize]; for (myLoop = 0; myLoop < kBlocksize; ++myLoop) memblock[myLoop] = 0; myFileAndPath.append("\\overwrite.bin"); std::cout << "Writing temporary file to " << myFileAndPath << "\n"; myfile.open(myFileAndPath, ios::trunc); if (myfile.is_open()) { while (!myfile.bad() and (myBlockCount > 0)) { myfile.write(memblock, kBlocksize); std::this_thread::sleep_for(std::chrono::milliseconds(kWaitTime)); --myBlockCount; if (myBlockCount % 1000 == 0) std::cout << myBlockCount << " blocks left to write.\n"; } myfile.close(); std::cout << "Removing temporary file overwrite.bin from Internet Cache directory.\n"; std::remove(myFileAndPath.c_str()); } else std::cout << "Initial file could not be written!\n"; delete[] memblock; }}