Completely Delete Files with Cipher

by Eric Wyatt
(last updated November 11, 2019)

1

For most of us, when we finish using a file and no longer need it on our computer, we simply delete the file. As you know, deleting the file only sends it to the Recycle Bin, which means the file can be restored at any time. Once you know for sure that you do not need the file(s) anymore, you might empty the Recycle Bin. What most users do not know is that the file is not actually deleted. Windows essentially removes the file from being visible and allows for new data to be written in its space if that space is needed.

This approach to deletion can come in handy as often the data can be recovered using data recovery software. This can pose a problem however if the file(s) you are deleting are sensitive or private in any way. If you press Shift+Delete to delete a file, which we're told will permanently delete the file, your file can still be recovered using data recovery software.

To safely and completely eliminate deleted files you need a way to actually overwrite the data that has been deleted. By overwriting the file's data, you can make it so the data is not recoverable with recovery software. There are third party programs available that say they will completely erase the files, but there is a way to do this that is built into Windows. It is using what is called the Cipher command from the Command prompt.

Before you use this tip, you need to keep two important things in mind:

  1. All other programs MUST be closed before running.
  2. All previously deleted files will be permanently erased.

To use Cipher to permanently erase the previously deleted files, follow these steps:

  1. Press the Windows key and type (without quotes) "CMD." Do not press Enter yet; Windows should show you a few options on the screen.
  2. To use Cipher, you need to run Command Prompt as an Administrator. Either right-click on the Command Prompt search result and choose "Run As Administrator" or press Ctrl+Shift+Enter. Either approach launches Command Prompt in Admin mode. You will be able to tell it is in Admin mode if the resulting Command prompt window shows "\Windows\system32>" as the prompt. (See Figure 1.)
  3. Figure 1. Command Prompt showing that it is being run in Admin mode.

  4. Type (without quotes) "cipher /w:#" (# represents the drive for which you want to run Cipher. For most users this is the C drive) then press Enter. Cipher will start running. (See Figure 2.)
  5. Figure 2. The Command Prompt Window after Cipher has completed.

  6. Once completed close the Command Prompt window.

As Cipher runs it writes over all the available space three times. The first pass it writes the value 0x00 over each byte, then the value 0xFF, and then on the third pass it writes random values. This ensures that the data is garbled and non-retrievable.

Before you choose to run Cipher, there is something you need to realize: It can take a long time to run. The length of time depends on whether you've run the program before and how large the drive is. For instance, we ran it on a 1 TB drive that only had about 50 GB of data on it. This means that there was about 950 GB of free space on the drive. Cipher, in this instance, took a bit over 12 hours to run. During that time, we could not run any other programs, which essentially made the computer unusable while the program was running.

With that caveat understood, you may still want to use Cipher if you are concerned about the sensitivity of the files you previously deleted in Windows. In today's world you can never be too careful when it comes to protecting your data and Cipher allows for an extra layer of protection.

 This tip (13699) applies to Windows 10.

Author Bio

Eric Wyatt

Eric Wyatt is a swell guy (or so his friends tell him). He is a formally trained designer and branding expert, bringing a wide range of skills to his Tips.Net articles. ...

MORE FROM ERIC

Quickly Finding Your IP Address

IP addresses identify your device on IP-governed networks. If you need to find your IP address quickly, you can use the ...

Discover More

Look to the Background

Windows 10 has several apps that run in the background that help improve performance and function for your system. Some ...

Discover More

Quick Event Creation

Windows 10 November 2019 update provides a quick method to add a calendar event. This new method allows you to create an ...

Discover More
More WindowsTips

Renaming Files Using the Command Line

The rename command can really be a timesaver over trying to do the similar sort of thing with Windows Explorer. You can ...

Discover More

Copying Files Using the Command Line

The copy command can be a timesaver over trying to do the similar sort of thing with Windows Explorer. You can copy ...

Discover More

Displaying the Command Prompt Window

You may have the need to perform repetitive operations or group several commands together to run as a batch. In such ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is four more than 8?

2019-11-11 09:09:06

Len Richards

Why don't you mention there is software free you can install and when you want to delete sensitive files you can right click the file and select the delete option ... you can set how many times to overwrite ... why don't you mention how to get to recycle.bin folder *name depends on version of windows and just use the del command to remove the files ... gone in a second ...
yes this is a windows tips newsletter but why not mention far easier methods that are for windows that don't come with windows


Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.