Tip of the day: Delete a file permanently

When you delete a file, it hangs around longer than you think, and that can be bad news if your goal is to get rid of truly sensitive information.

When you press the Delete key, Windows normally moves the deleted file to the Recycle Bin. You no longer see the file in an Explorer window, but it’s still there and you can recover it with a quick visit to the Recycle Bin.

After you empty the Recycle Bin, is the file gone? Nope. Deleting a file actually gets rid of only the file’s directory entry; the data that was in that file remains intact until another file uses its space. To prevent your files from being viewed by someone with file-recovery tools, you need a file-wiping utility. There are plenty of so-called file shredding utilities designed to handle this task, but you can do simple deletions with a command-line utility that’s built into Windows XP Professional (it’s in Windows 2000 Professional as well, as long as you’ve installed Service Pack 2 or later). If you use Windows XP Home Edition, you’re out of luck

The primary function of the Cipher.exe command is to manage encrypted files, but it also does a great job of scrubbing disk areas clean. Used with the /w switch, it overwrites all the unused areas of a drive with zeros, then fills all unused bits with ones, and finally overwrites all unused areas with random numbers. After you’ve deleted all sensitive information and emptied the Recycle Bin, follow these steps to wipe the deleted data clean:

  1. Click Start, Run. In the Open box, type cmd and press Enter. This opens a Command Prompt window.
  2. At the command prompt, type cipher /w:directory, where directory is the name of a folder — any folder — on the drive you want to wipe.
    • To scrub the current drive clean, type cipher /w:. (a period is command-line shorthand for the current folder).
    • To wipe a different drive, include the drive letter in the command – (to wipe your E: drive, for example, type cipher /w:e:\).
  3. Press Enter to begin deleting and overwriting data. The command window displays the progress of the job.

Leave the Command Prompt window open while the Cipher utility performs its work. (You can do other tasks while it’s working.) When the job is complete, you can close the Command Prompt window.