How do I securely delete (i.e., permanently delete) a file and/or folder in Windows? Secure in terms that the deleted file/folder can not be restored.
Can you recommend any free or open source tool?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
For a nice GUI tool, there is File Shredder.
With File Shredder you can remove files from your hard drive without fear they could be recovered. There are quite a few software tools today for retrieval of deleted files under Windows OS. Those tools, often referred to as "file recovery" software, are taking advantage of shortcoming of WIndows "delete" command that we all use regularly to delete files. Actually, the "delete" operation in Windows only removes bits of information from files so they appear deleted in OS. It is easy to retrieve those files using aforementioned specialized file recovery software.
In order to remove, or shred files permanently from your system you have to use a program that is capable of rewriting the files with random series of binary data multiple times. This process is often called shredding. That way, the actual content of the file has been overwritten and the possibilities to recover such a shredded file are mostly theoretical.
For a CLI approach, Sysinternals SDelete is excellent.
The only way to ensure that deleted files, as well as files that you encrypt with EFS, are safe from recovery is to use a secure delete application. Secure delete applications overwrite a deleted file's on-disk data using techiques that are shown to make disk data unrecoverable, even using recovery technology that can read patterns in magnetic media that reveal weakly deleted files. SDelete (Secure Delete) is such an application. You can use SDelete both to securely delete existing files, as well as to securely erase any file data that exists in the unallocated portions of a disk (including files that you have already deleted or encrypted). SDelete implements the Department of Defense clearing and sanitizing standard DOD 5220.22-M, to give you confidence that once deleted with SDelete, your file data is gone forever. Note that SDelete securely deletes file data, but not file names located in free disk space.
Usage: sdelete [-p passes] [-s] [-q] sdelete [-p passes] [-z|-c] [drive letter] -c Zero free space (good for virtual disk optimization). -p passes Specifies number of overwrite passes. -s Recurse subdirectories. -q Don't print errors (quiet). -z Cleanse free space.
Both tools are freeware.
I recommend Ccleaner which allows secure deletion (overwriting with up to 35 passes). this feature can be enabled via Options > Settings > Secure Deletion.
Ccleaner can also wipe free space, overwriting all free blocks and thus making it impossible to recover any files you have deleted.
In relation to Wipe free space feature
I haven't used this feature but when you delete something from your computer, let's say a picture, what's erased is the address or direction of the file, the picture is still in you computer but the location in the hard drive is open to receive (write) new information on it, when your system writes something in that location is when the picture is really deleted. This feature will wipe the data that is still kept on that space that you think is 'free'. This is how data recovery programs can get back your data.
I am always using Eraser, it has nice Interface and easy to use it, also, supports various algorithm for erasing: