How to Zero Fill Hard Drive via Command Prompt in Windows PC

This article will demonstrate how to zero fill hard drive via Command Prompt for wiping it step by step. And more secure wiping methods that provided by AOMEI Partition Assistant Professional will also be illustrated.

Dervish

By Dervish / Updated on December 21, 2023

Share this: instagram reddit

What does it mean to zero filling a hard drive?

How do you protect your personal data when you want to give away your hard drive? Formatting or deleting? Actually, some common deleting methods, like formatting and move data to the Recycle Bin cannot really erase the data, any recovery tool can restore them. 

Zero filling a hard drive with Command Prompt can give you help. Zero filling hard drive, or writing zeros to hard drive is a process of writing zeros to hard disk. It is a secure way to wipe data on a hard drive or other storage devices. Each bit in the hard drive would be replaced by a zero value.  Once a hard drive is zero filled, it is very difficult to recover data on the drive. 

When need to zero fill a hard drive?

There are lots of circumstances where you can zero out a hard drive. Here are 2 references of performing such operation below:

The main purpose is to prevent private data leakage. When you give your computer/hard drive away where store many personnel files, it is an effective way to protect these information from misuse.
Eliminating infected virus. If your hard drive got infected, write zero to this hard drive can help you to delete infected files.
Forcefully delete data that cannot be deleted. Because of an unexpected reason, you may find Windows cannot delete files. You can zero out the hard drive to forcefully delete them.

To completely wipe a hard drive, lots of people would like to employ Windows built-in tool, Command Prompt, which is the command line interpreter to help system administrators to excute tons of disk partitions management tasks in most Windows systems.

Next, we will demonstrate the steps to zero fill hard drive via Command Prompt.

How to zero fill hard drive via Command Prompt?

Now follow the next steps to write zeros to hard drive via CMD for wiping it permanently on Windows.

Step 1. Press "Windows+R" and type “CMD” in the Run box to open Command Prompt window.

Step 2. Type “format X: /fs:NTFS /p:1”(X is the drive letter of your hard drive, NTFS is the file system, p:1 means writing zeros to every sector once) and press Enter.

✐ Notes:
1. You can type “p:2” to write zeros to each sector for twice.
2. To check the file system of your hard drive, open computer right-click your hard drive select Properties.

Step 3. Type “y” and press Enter. It may need a long time.

Step 4. Type a name for the hard drive as volume label, or don’t and press Enter.

Step 5. And “Creating file system structures” will be shown on the window.

Step 6. When the prompt returns, you can repeat the above steps for other partitions on the drive.

Step 7. Type “exit” and press Enter to exit Command Prompt.

Easier way to write zeros to hard drive (GUI tool)

As you see, zero filling hard drive via Command Prompt is complicated. And for many PC beginners, they may make mistakes that can't be undo when writing command lines. Besides, if you need to zero fill an entire hard drive, you have to repeat the same commands on each partition on the disk, which takes you lots of time. So, Command Prompt is very inconvenient and error-prone.

Luckily, there is an alternative to Command Prompt to zero fill hard drive- AOMEI Partition Assistant Professional. It comes with lots of outstanding features that make zero filling easier:

● Intuitive interface: Either computer experts or newbies can easily choose the right partition or hard disk to wipe out.
● Support zero fill a partition only: It can not only help write zeros to an entire hard drive within three steps, but also can wipe a specific partition.
Support various Windows system: This tool can help you to zero fill a hard drive in Windows 11, 10, 8, 7, XP, vista. And if your PC is running with Windows Server, there are AOMEI Partition Assistant Server edition spalicialized for you.
● Four wiping methods: Besides zero filling, it also provides more secure wiping methods: fill sectors with random data, DoD 5220.22-M, Gutmann.

Next, you can download the Demo version and follow the steps of writing zeros to hard drive to have a try.

Download Demo Win 11/10/8.1/8/7/XP
Secure Download

Step 1. Install and open AOMEI Partition Assistant. Click “Wipe” in the top toolbar, and choose “Wipe Hard Drive”.

Wipe Hard Drive 16gb

Step 2. In this window, choose “Fill sectors with Zero” as wiping methods. Also, you can select other methods to wipe your hard drive.

Wiping Method 16gb

Step 3. Confirm the operation, click “Proceed” and “Apply” to start the process.

Proceed 16gb

● Bonus feature of AOMEI Partition Assistant Professional

If you have a SSD that needs to be wiped, you may also want to zero fill it via Command Prompt. Actually, you can’t do it, because writing zeros would affect SSD’s performance and shorten its lifespan.

But with AOMEI Partition Assistant Professional, you can securely erase SSD without hurting its performance and lifespan since it provides a special function-SSD secure erase, which can completely clean a SSD with a computer that runs Windows 7 and make the SSD at its ideal performance.

Ssd Secure Erase Samsung

● Zero filling without booting Windows

AOMEI Partition Assistant supports create bootable WinPE drive. You can make USB (or DVD/CD disc) bootable, and write zeros to hard drive without booting Windows.

Make Bootbale Media Wizard

Conclusion

This article gives the steps to zero fill hard drive via Command Prompt. When the process is finished, your hard drive will be wiped completely. If you want more secure ways to wipe hard drive, you can try the other three wiping methods. Moreover, AOMEI Partition Assistant Professional can provide other functions like converting system disk from MBR to GPT for Windows 11, migrating OS, recovering lost data, and more to meet different demands of users.

Dervish
Dervish · Staff Editor
Dervish is an English editor of AOMEI Technology; He is delicated to offering users easy and effecitve solutions for issuses related to disks and partitoins. In his spare time, he enjoy wathcning films, playing footable, traveling and so on.