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.

Posted by @Dervish July 24, 2024 Updated By @Dervish July 10, 2024

Quick Guide:

  • Using "format [drive letter]: /fs:NTFS /p:1" command can zero fill the drive. However, this method is technically demanding.
  • This tutorial will introduce the best zero fill format tool  - AOMEI Partition Assistant, with only 3 steps you can write zeros to hard drive Windows 10/11.

How do you protect your data when you want to give away your hard drive? Formatting or deleting? Some common deleting methods, like formatting and moving data to the Recycle Bin cannot erase the data, any recovery tool can restore them. Zero-filling a hard drive can give you help. This guide will introduce how to zero fill hard drive via command prompt and zero fill format tool. Before we start, let's know more information about zero filling.

What does it mean to zero filling a hard drive?

Write-zero, also known as single overwrite, zero-fill, or zero-fill erase, is one of the most common methods of completely writing data. 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. 

AOMEI will show you two effective solutions for hard disk writing, including zero fill hard drive via command prompt and the professional zero format hard drive tool. Zero-filling a hard disk using the command prompt is complex and time-consuming. Using a professional tool will avoid any unnecessary data loss and other possible errors. Let's begin with the simple way

How to write zeros to hard drive via Command Prompt Alternative - easier

Let's begin with the alternative to Command Prompt to zero fill hard drive- AOMEI Partition Assistant Professional. The tool follows the kernel of the command prompt, simplifying its steps and providing more advanced and secure features.

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.  ● 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.

Free Download 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”.

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

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

● 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.

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

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.

● 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.

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.

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. Please turn to the method one and use AOMEI Partition Assistant for help.

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

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.

In the above, we have demonstrated the steps to zero fill hard drive via Command Prompt and zero format tool.

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.