Command Prompt, also known as cmd.exe or cmd, is the command line interpreter on Windows operating systems. It is the counterpart of COMMAND.COM in DOS and analogous to the Unix shells used on Unix-like systems.
Command Prompt interacts with the user through a command line interface. Comparing to graphical user interface, many software developers, system administrators and advanced users take advantage of the command line interface to execute unattended tasks or scripts.
More and more common users prefer to manage hard drive and partition from Command Prompt nowadays. A lot of simple command line operations are accepted, so does to wiping hard drive. Let's get to know how to apply it in details.
When it comes why you do something, 100 persons may have 100 reasons. In general, people would like to wipe a hard drive in Windows 7 Command Prompt out of these reasons.
● Reformat a hard drive. Some users just want to rebuild a new structure for the selected hard drive and make it useable again. But before that, a data wiping is necessary for him. This task can usually be completed by writing zeros or deleting existing partitions.
● Erase data completely on the hard drive. When upgrading hard drive to new drive or SSD, the older one may be sold to others or thrown away. The sensitive data or information on the hard drive may be utilized by malicious intentions. It is better to erase all data instead of formatting or deleting to prevent future recovery.
You can deploy different methods for different solutions. Generally, you can achieve your goal with the help of following three tools.
Attention: It may be somewhat redundant to say that all data on the selected hard drive will be wiped or erased. Make sure you've backed up important files before you start.
Three tools to wipe hard drive will be introduced below. Choose the most suitable one according to your situation.
This command allows you to wipe a hard drive partition by formatting. This method is used to format a specific partition.
1. Type cmd from the Search box after clicking Start in Windows 7. Right click cmd.exe or command prompt from the list and select "Run as administrator".
2. Type format F: /fs:NTFS (replace F with the correct drive letter) and press Enter. It will format F: drive to NTFS file system. And it may take a long time to complete.
Tips: repeat the command to format other partitions if necessary.
You can format a drive using CMD from BIOS as well. It is needed for formatting a drive containing operating system. A bootable device like installation disc or repair disk is required.
1. Shut down computer and insert the installation disc. Boot from the disc.
2. At the page of "Where do you want to install Windows", press Shift+F10 to bring out Command Prompt.
3. Type format C: /fs:ntfs and press Enter.
Another way to wipe hard drive from Command Prompt is to take advantage of DiskPart tool, which is also a way that is widely used by common users. It is faster in formatting or cleaning. This method is used to wipe entire hard drive.
1. Open an elevated Command Prompt as instructed. Type diskpart and hit Enter.
2. At the diskpart prompt, run these commands successively.
● list disk
● select disk n (where n is the disk number of the hard drive you want to wipe)
● clean (or clean all)
Till now, the selected hard drive is wiped, means all partitions and data on the disk are gone. If you have further plan for it, keep run following commands to build a new structure.
● create partition primary
● select partition 1
● format fs=ntfs quick (or format fs=fat32 quick)
● assign drive letter=G
● active (if you want to install operating system on the disk)
● exit
In case you encounter diskpart clean error or other similar virtual disk service errors, Qiling Disk Master Professional, dedicated hard drive and partition manage tool, is recommended. Here are some outstanding features of the software in disk cleaning.
● Four options for wiping data. To be specific, Fill sectors with Zero, Fill sectors with random data, DoD 5220.22-M, and Gutmann. For common data wiping, the first two options are enough.
● Delete partitions only. It allows you to only delete all partitions on the hard drive instead of erasing data. It is faster than erasing data and is quite helpful when you have the drive for second use.
● Wipe hard drive without booting Windows. The software supports create bootable WinPE drive (USB or CD/DVD disc). You can complete data wiping even when the disk contains an operating system.
● Extra bonus – SSD secure erase. It allows you to securely wipe data on SSD drives without hurting its lifespan.
● Supports command-line interface and graphical user interface. It offers approaches for both computer beginners and advanced users.
Now, get this software to wipe hard drive from Command Prompt in Windows 7, 8/8.1, 10, XP and Vista. Next part will take deleting all partitions on the disk using command lines for example.
To delete a specific partition, you can type "DiskMasterX.exe /hd:o /del:0" (delete by volume number) or "DiskMasterX.exe /del:F" (delete by drive letter).
Descriptions:
● /hd: hard drive.
● /del: delete.
This passage gives multiple ways to wipe hard drive in Windows 7 Command Prompt. Different purposes require different approaches. Choose the best one for your case. Above steps also apply to wipe hard drive in Windows 10 and XP Command Prompt.
Except for hard drive wiping, Qiling Disk Master Professional allows you to recovery deleted partitions or data if you delete mistakenly. For detailed steps, please refer to recover lost partition in Windows 10.