The “Mysterious” Cipher Command

By | December 4, 2022
Print Friendly, PDF & Email

 

 

The “Mysterious” Cipher Command

After last week’s Wednesday Newbytes, we received several questions about the cipher command.

The Cipher command has been around as long as Windows and is still an available command in Windows 10 and Windows 11.

When you delete files or folders, the data isn’t removed from the hard drive. Instead, the space on the disk that was occupied by the deleted data is deallocated. After it’s deallocated, the space is available to use when new data is written to the disk. Until the space is overwritten, you can recover the deleted data using data recovery software.

So, simply put, when you delete something on your computer, it’s still there until the disk space occupied by whatever you deleted is overwritten by something else. Until that space is overwritten, the data you deleted is easily recoverable.

You can use the cipher command to overwrite the space that was occupied by deleted data thus making it unrecoverable. You can use the cipher command to overwrite deleted data on an entire drive or directory. The cipher command does not delete, change, or affect undeleted data. So, you can run the cipher command without affecting the undeleted data in directories or drives.

To overwrite all deleted data on an entire hard drive, type CMD into the taskbar search and press enter when you see Command Prompt appear.

To overwrite all deleted data on the C: drive, use the command:

CIPHER /W:C \TEST

Cloudeight InfoAve Windows tips

The spaces in the command must be included. W:C means overwrite deleted data on drive C:\. If you want to overwrite deleted date on drive E:\ then the command would be CIPHER /W:E \TEST

The Mysterious Cipher Command - Cloudeight InfoAve

To overwrite deleted data in a specific directory use the example command below. You can substitute the directory name in which you want to overwrite all deleted data. Below we’re overwriting deleted data in the Documents folder. You can substitute any directory name (folder name) instead of Documents.

CIPHER /W:DOCUMENTS

Cloudeight InfoAve - Cipher command

Remember…any files or folders you delete in Windows are not deleted, they ca1 still be recovered until the space occupied by those files and folders is overwritten. If you want to make all your deleted files and folders unrecoverable, you can use the Cipher command to overwrite all deleted data. 

13 thoughts on “The “Mysterious” Cipher Command

  1. SB

    Hmm … in your text, there is a space between the C and \TEST but in the screenshot it appears there is no space. Should there be a space or not?
    Also, you don’t explain the “test” aspect. In normal command line parlance, C:\TEST would indicate a directory called TEST. If I were to copy and paste your command, would it go looking for a directory called TEST? Or is TEST a separate command? Actually, now I see that your example does not include the colon after the C, although it is there in the screenshot. Maybe you entered a space instead of a colon by accident?
    This is a really cool tool which I was unaware of until I read this, so thanks for that. I hope you can clear up these questions. Thanks!

    Reply
    1. infoave Post author

      You are incorrect. The command in the article is CIPHER /W:C \TEST
      If you copy and paste that into a command prompt it executes correctly

      Reply
      1. SB

        I don’t mind being incorrect. But can you explain why the article states the command is
        CIPHER /W:C \TEST
        but the screenshot shows
        CIPHER /W:C:\TEST
        Are the space and colon interchangeable?

        Reply
        1. SB

          So you switched out the screenshot to match the example in your article, rather than admitting I had a valid question. That’s called gaslighting, right? Cool, cool….

          Reply
  2. Larry G

    Yes, I concur – the commands shown are correct. I copied and pasted CIPHER /W:C \TEST directly from the article and ran Cipher. Thanks for posting this article. Larry G.

    Reply
  3. R. M.

    Worked for me too. I used to use this command in Windows XP and forgot all about. Using Win 11 and the command still works. The command is cipher /w:c \test … i think the complainer was confused by the all caps which makes it look as if there is a space between the backslash and the word Test \TEST . Commands are not case-sensitive though.

    Reply
  4. Sherry Moore

    Should a person do this before they do a factory reset to donate a computer?

    Reply
    1. infoave Post author

      If you’re not sure who you’re giving it to it might be a good idea.

      Reply
  5. Mike R.

    I don’t know what SB is complaining for. Both the commands shown work. Some people love to nitpick and find fault, even when nothing’s wrong!

    Reply
    1. SB

      How is this a complaint? It’s a simple question. Nitpick? The text clearly says “The spaces in the command must be included.” So when that particular space is not shown in the screenshot, it’s confusing – especially when you know that a space or no space means everything to a computer.
      It’s very curious that someone can’t ask a simple question without being attacked, even on what I thought was a user-friendly site.

      Reply
      1. infoave Post author

        Mike’s comments are his own and have nothing to do with Cloudeight. As long as comments are not nasty, profane, degrading, or abusive we do not censor them.

        Reply
  6. Susan Poston

    Hi,
    This is Susan Poston. If you have time and can go to https://www.hp.com/us-en/shop/pdp/hp-laptop-15z-ef100-touch-optional-8ze47av-1?utm_content=S2R2C1%208ZE47AV_1&jumpid=em_con_nc_ns&aoid=3105023101&utm_medium=em&utm_source=sf&rid=2C281527ABE0660C4914CA1F0C5DF2BE&test=&jobid=3105023&emailid=80462 and look at this laptop computer that I am thinking about buying at tell me if you think it is a good deal and if I need to change any specs on it? At my age I am beginning to think I need a little more help in buying a computer. I want a laptop so I can take it with me when I go places. If you don’t have time I will understand.
    Thank you
    Susan

    Reply
    1. infoave Post author

      Hi Susan. If you’re not going to use it for gaming or intensive graphics work, it should be fine. It has a low-end AMD processor and a small (128 GB) SSD, but it does have 8GB of RAM and the computer comes with Windows 11. For $300, it looks like a good deal for the money.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *