Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Cipher Command - Overwrite Deleted Data in Windows

Cipher Command - Overwrite Deleted Data in Windows

How to Overwrite Deleted Data using the "Cipher" Command in Windows
Published by Golden
28 Jan 2013
Published by

How to Overwrite Deleted Data using the "Cipher" Command in Windows

information   Information
The Windows cipher command line tool is predominantly used to manage the encryption status of NTFS volumes. A lesser known function of this command is the ability to securely overwrite free disk space.

Files deleted on a volume are only marked for deletion and can still be recovered. By using the cipher command, the free space occupied by the deleted files are securely overwritten resulting in a more secure system in which the previously deleted files cannot be recovered.

The advantage of using the cipher command is that it ONLY overwrites free disk space - the remainder of the volume is untouched. The cipher command can be run from a booted system without the need to dismount volumes/partitions/disks, or to resort to more complex tools.

This tutorial will show you how to securely wipe or overwrite free disk space on any partition or disk using the inbuilt cipher command in Windows.


1. Open an elevated command prompt.

2. Type the command below, and press Enter.

The syntax required is:
cipher /w:[drive]:\[folder]
where [drive] = drive letter, [folder] = folder name

In the example below, I wish to wipe all free disk space on my F drive (a logical partition on a physical disk). Thus, I use the following syntax:

cipher /w:F:\
The output from the cipher command is shown below. The free space is overwritten 3 times:
  • once with a series of 0's (zero)
  • once with a series of 255's
  • once with a series of random numbers
Cipher Command - Overwrite Deleted Data in Windows-cip1.png
Note   Note
Disks with large amounts of free space will take some time to be overwritten - on my system, wiping 25 GB of free space takes approximately 10 minutes.


28 Jan 2013   #1

Windows 7 Home Premium 64bit SP 1

Thanks Golden! I just learned something new.
My System SpecsSystem Spec
28 Jan 2013   #2
Microsoft MVP

Windows 10 Pro x64 ; Xubuntu x64

No worries mate - glad you found it useful.
My System SpecsSystem Spec
14 Aug 2014   #3

Win-7-Pro64bit 7-H-Prem-64bit

Very nice :)
My System SpecsSystem Spec

14 Aug 2014   #4

Windows 10 Pro

Great tutorial. Thank you.
My System SpecsSystem Spec
21 Apr 2016   #5

windows 7 pro 64 bit
Wiping areas of a disk with no partition

One of my disks is a backup disk with one partition of 100gb, 400gb remains un-partitioned i was wondering if theirs a way to cipher this disk as it has previously had data on it. Or if theirs a way to select a whole disk to cipher.

My System SpecsSystem Spec
21 Apr 2016   #6
Microsoft MVP

Windows 10 Pro x64 ; Xubuntu x64

No, since no partition exists, there is nothing to overwrite.

You need to create an empty partition, run cipher on it, then remove the partition again if you feel you need to overwrite any historical data that was there.
My System SpecsSystem Spec
01 May 2016   #7

windows 7 pro 64 bit

My System SpecsSystem Spec
29 Feb 2020   #8

Windows 7 Home Premium 64 bit

Thank you for this information. Never too old to learn......
My System SpecsSystem Spec

Thread Tools

Similar help and support threads
Thread Forum
Cipher Command
Hello guys My Laptop is an Acer Inspire 280 GB with W7. I used the inbuilt Cipher facility to wipe the Hard Drive. But none of the Forums I read indicate how to know when the procedure has completed successfully. After about eight or nine hours, at the bottom of the Command...
General Discussion
Cannot overwrite deleted emails on free space
I am trying to overwrite a file in the free space on drive C, but it keeps telling me that it is unable to overwrite the special file type. The file name is "Thunderbird". When I first found it I recovered it then went back later to overwrite the emails so it would not be in my ssd...
Browsers & Mail
Recovering deleted data, Windows 7 Home Edition (x64)
Hi everyone I've been searching and searching try to figure out a solution here. Basically, I had a zip file (which had a bunch of images in it) in a folder on my PC. The exact destination was: C:\Users\Jack\Desktop\Jack\Random Files\Pictures Anyways, on the 24th of March (2012), I deleted...
Backup and Restore
Recover deleted data from a deleted user account?
How to recover deleted data from an deleted user? Hi Guys, Please help I had an old user account which was corrupted, So I deleted that however forgotten to keep the files...... Is there any way I can get my old data back??:( Using Windows 7 Ultimate 32 bit
Chillout Room

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 01:34.
Twitter Facebook