Howto Delete Files Permanently and Securely in Windows
Note: this is a Windows equivalent of my popular article, Howto Delete Files Permanently and Securely in Linux.
When you normally delete a file in Windows, you aren’t actually making that file disappear from your hard drive — not even when you empty it from the recycle bin. This is because deleting a file doesn’t actually overwrite it on your hard drive, it simply marks the space used by that file as “free.” As a consequence, programs are able to find and restore files you thought were destroyed. This howto will explain how to delete files permanently and securely in Windows, so that they cannot be recovered.
Step one in this process is to download the “SDelete” tool. We are going to use this tool to write random data over the file you want to delete; doing this will make it unrecoverable. You can get the SDelete program from the Microsoft website.
The download is a simple zip file, so extract it wherever is convenient for you (such as in your Downloads directory, or on your desktop). It contains two files: eula.txt, which is the licence agreement, and sdelete.exe, which is the actual program.
There are two ways to use SDelete. You can drag and drop a file onto it, which will delete that file using a single pass to overwrite it. This is the simplist, least-powerful way to use the tool, but it’s also the quickest. For most users who simply want to make sure prying eyes won’t be able to find a file once they delete it, this is probably sufficient.
The second way to use the tool is from the command prompt. You can open a command prompt either by using Start –> Run and typing “cmd”, or by going the Accessories menu. Once you’ve opened the command prompt change to the directory where you unziped SDelete. You can view the help by running it with no options:
As you can see here, the usage for SDelete is fairly straight-forward. For deleting files, you’re concerned primarily with options -p and -s. You can specify multiple passes, which greatly decreases the chances that someone will be able to recover the file, and/or -s, to tell SDelete to recurse into subdirectories, if you’ve specified a directory.
Note that in the above screenshot, once the SDelete utility had finished wiping the files, there was an error deleting the directory, “The directory is not empty.” This is due to having the directory open in Windows Explorer; the directory cannot be deleted because it is in use. Make sure that, when deleting directories, nothing those folders are in use, or the tool will not be able to finish its job.
SDelete also runs in a disk cleaning mode, which you can see is -z. This option will overwrite all the free space on the given drive, which is useful if you have already deleted a file, and now want to go back and make sure that it is unrecoverable. When using this mode, you can also select -c, which will end the operation by writing zeros over all the free space on the disk.
While SDelete is cleaning the space on device, it will show the percent completed. Once the device is wiped clean, it will tell you that it has finished. Here, it took about 5 minutes to clean out about half of a 8GB SD card; keep in mind that the access time for these devices is not that great. Obviously, the tool can only clean space as quickly as it can write to the target device.
If you want to delete files permanantly and securely in Windows, so that they can never be recovered, SDelete is a simple, free, and quick tool that will get the job done for you.
Like this post?
- Subscribe to the RSS feed to get more like it!
- Share it:
- Leave a comment!






Thu, Mar 25, 2010