Format a disk from the command prompt

coopidor Posted messages 5 Registration date   Status Membre Last intervention   -  
 Noemie64 -
Hello,
please
how to format a disk from the command prompt?

4 réponses

Sannin_WD Posted messages 4316 Status Membre 758
 
Hello coopidor,

It seems to me that formt is right to ask you the question.

Often we use the term "Format" either to say completely erase the content of the hard drive or to change its format by using the chosen file system. Hence some misunderstandings...

For this reason and depending on what you want to do, there are a few steps to follow:

I. If you want to format the HDD using a chosen file system:
Once you access the command prompt (Run > cmd), the syntax to follow is:

format <drive letter>: /fs:<file system>

or, for example: format E: /fs:fat32

II. If you want to delete and erase the content of the HDD via the command line, you can do it using DISKPART:

Run > cmd > type DISKPART > hit Enter > type list disk > Enter > the list of hard drives connected to this computer will be displayed > Identify the number of the concerned disk (it usually has the same number displayed in Disk Management). It is important to select the right hard drive > type select disk *** > Enter ( *** corresponds to the number of the disk in question: for example select disk 4) > type clean > Enter. Be careful with the disk number when you indicate it! This command will erase the hard drive and all its content (including partitions).

You can also use clean all if you are selling or giving the HDD to someone else. Here are some details that will be useful to you: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc766465(v=ws.10)?redirectedfrom=MSDN

The clean all procedure may take longer... don’t hesitate to give it the necessary time :)

Then the disk will appear as "unallocated" space in Disk Management and it will be necessary to create a new partition or volume (Disk Management > right-click on the HDD > New simple volume > and follow the instructions of the wizard) to be able to use the hard drive again.

Keep me updated :)
18
Noemie64
 
Hello. I just tried the clean all function following your instructions but it refuses to execute stating "cleaning is prohibited on the disk containing the active boot volume..."
I would like to wipe my laptop before "throwing" it away... how should I proceed??
0