How to Prevent a File from Being Recovered on Windows 10

To make a deleted file harder to recover on Windows 10, choose the method that matches the storage drive. On a traditional hard disk drive (HDD), use Microsoft Sysinternals SDelete to securely delete a file that still exists. If you already deleted it, Windows cipher /w can overwrite unused space across that volume. On a solid-state drive (SSD), neither command can guarantee that every physical flash cell containing old data was erased, so use the drive maker’s supported sanitization method if you need to erase the whole SSD.

Windows 10 File Explorer with a document selected and the Recycle Bin visible on the desktop
Deleting a file in File Explorer does not by itself confirm that its storage blocks were overwritten.

Why deleting a file may leave recoverable data

When you delete a file and empty the Recycle Bin, Windows generally marks the file’s space as available for reuse. The content can remain in that space until something overwrites it, which is why recovery software may be able to find a file that is no longer listed in File Explorer. Formatting or reinstalling Windows is not a reliable way to securely erase an individual file either.

Replacing a deleted file with a decoy that has the same name is not a dependable fix. NTFS may allocate different clusters for a replacement, and an SSD may remap writes internally. The name and folder location do not force Windows or the drive to reuse the exact physical location that held the original content.

First, check whether the drive is an HDD or SSD

Open Start, type defrag, and select Defragment and Optimize Drives. Check the drive’s media type. The Microsoft Windows instructions distinguish hard disk drives from SSDs because Windows handles their optimization differently. If the file was stored on a secondary drive, check that drive rather than assuming it is the C: drive.

Securely delete an existing file on an HDD

Microsoft Learn page for Sysinternals SDelete beside a Downloads folder containing the SDelete ZIP
Download SDelete from Microsoft Sysinternals and extract the ZIP before running it.
  1. Download SDelete from Microsoft. Use the official Sysinternals SDelete page, then extract the ZIP file to a folder you can find again.
  2. Open Command Prompt in the extracted folder. In File Explorer, open that folder, select the address bar, type cmd, and press Enter. If Windows reports a permissions problem, reopen Command Prompt with the access needed for that file.
  3. Run SDelete on the file’s full path. Replace the sample path with the path to your file. Keep quotation marks around paths that contain spaces.
Windows 10 Command Prompt open at the C drive prompt, ready for an SDelete command
Run the file-specific command from the folder containing the extracted SDelete executable.
sdelete64.exe -p 1 "C:\Users\YourName\Documents\private.txt"

SDelete securely overwrites and deletes the file. The -p 1 option requests one overwrite pass; one is also the documented default. Add more passes only if your policy specifically requires them. Extra passes take longer and do not solve SSD remapping. Check the quoted path before pressing Enter.

If the file was already deleted from an HDD

For data that is already in unallocated space, use Cipher’s free-space option on the volume that held the file. Close other programs first. In Command Prompt, enter a folder on that same volume; for example:

cipher /w:C
Windows 10 Command Prompt window with a short progress indicator and an otherwise blank console
cipher /w works on unused space across the selected volume, rather than targeting one deleted file.

Change C to the affected drive letter. Microsoft documents that cipher /w:<directory> overwrites available unused space on the entire volume containing that directory. It does not erase a currently existing file by itself, and it can take a long time on a large or nearly full drive. Avoid saving new files to that volume until the process finishes. Read the Cipher command reference before running it.

What to do on an SSD

Do not treat SDelete or cipher /w as a guaranteed physical wipe on an SSD. SSD controllers use wear leveling to spread writes across flash cells, so a command that overwrites a file’s logical address may not overwrite every older physical copy. Samsung’s SSD documentation describes this controller behavior. Microsoft also notes that Windows sends TRIM information to SSDs as part of normal drive optimization; TRIM is routine drive maintenance, not proof that a particular file has been securely erased.

If you must sanitize an entire SSD, use the manufacturer’s instructions or management utility for that exact model, and make a backup first: a sanitize or Secure Erase operation removes other data on the drive too. NIST’s current SP 800-88 Revision 2, published in September 2025, covers media sanitization and points organizations to current approved standards and methods. BitLocker can protect a locked volume from offline access, but it is not a tool for shredding one file after the fact.

Check copies outside the local file

A local wipe does not remove copies in File History, backup software, email attachments, shared folders, or a cloud recycle bin. If the file was synced with OneDrive, delete it from OneDrive’s recycle bin as well; Microsoft says deleted OneDrive items can remain recoverable there for a retention period that depends on account type and policy. Review the OneDrive deletion guidance and separately remove any backups you control.

For an HDD, use SDelete before deleting a file or Cipher after it has already been deleted. For an SSD, rely on the drive maker’s full-device sanitization method when the whole drive can be erased. In either case, check cloud and backup copies separately; Windows cannot erase copies stored elsewhere.

Leave a Comment

How to Set Different Scaling Levels for Multiple Monitors in Windows 10

How to Set Different Scaling Levels for Multiple Monitors in Windows 10

Adjust each Windows 10 monitor independently with per-display scaling, keep text readable, and troubleshoot custom scaling or blurry apps.

How to Type on an iPhone From a Windows 10 PC

How to Type on an iPhone From a Windows 10 PC

Use AirType’s browser pairing setup to type on an iPhone from a Windows 10 PC, with current setup steps, troubleshooting, and privacy limits.

How to Hide the Mouse Cursor in Windows 10 Apps

How to Hide the Mouse Cursor in Windows 10 Apps

Hide the mouse pointer in Windows 10 videos, games, and other apps with built-in typing controls or PowerToys CursorHide’s adjustable inactivity timer.

How to Open Control Panel Power Options on a Windows 10 Desktop

How to Open Control Panel Power Options on a Windows 10 Desktop

Find Control Panel Power Options on a Windows 10 desktop, open the page with a Run command, and adjust power plans, display timeouts, sleep, and button behavior.

How to Prevent a File from Being Recovered on Windows 10

How to Prevent a File from Being Recovered on Windows 10

Learn what Windows 10 deletion leaves behind, how to use SDelete on an HDD, and why SSDs and cloud backups need separate treatment.

How to Access Advanced Settings for an Integrated Webcam in Windows 10

How to Access Advanced Settings for an Integrated Webcam in Windows 10

Use FFmpeg’s DirectShow tools to open an integrated webcam’s driver properties in Windows 10, find the correct device, and troubleshoot missing controls.

How to Identify a Keypress on Windows 10

How to Identify a Keypress on Windows 10

Identify a keypress in Windows 10 with a browser event tester or SharpKeys, then separate layout, software, and keyboard hardware issues.

How to Enter File or Folder Paths with Spaces in Windows 10 Command Prompt

How to Enter File or Folder Paths with Spaces in Windows 10 Command Prompt

Use double quotes around each complete path with spaces in Command Prompt. Learn how to list, change to, copy, and troubleshoot Windows 10 files and folders.

How to Disable Start Menu Auto-Expand on Windows 10

How to Disable Start Menu Auto-Expand on Windows 10

Turn off the Windows 10 Start menu’s hover-to-expand behavior with a legacy Mach2 command, check build limits, and see the built-in app-list alternative.

How to Fix the “iTunes Library.itl Cannot Be Read” Error in Windows 10

How to Fix the “iTunes Library.itl Cannot Be Read” Error in Windows 10

Fix the iTunes Library.itl read error on Windows 10 by updating iTunes, restoring a compatible backup, or safely creating a new library without deleting media files.