• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

How to clean a drive through DISKPART

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.
So it just looks like this is a command line/longer way to quick format and format the drive. Cool! Thanks for the write up!

Your instructions are still missing what application you are trying run in the first post. ;)
 
to say that I "started" would indicate that I stopped.
making the answer to his question, no.

and I have edited the information, please reread it and comment
 
+1 caddi : clean and clean all have saved alot of my disks /flash drives from the round file :)

I am not sure if saying that it is like a quick format is quite correct but I dont know that anyone but a nitpicker would notice the difference. Diskpart is quite the powerfull little tool and can do alot of things, including format. QUick and full. The clean command however removes formatting and leaves your drive in a preformat state... I think.

whereas if you would like to format a drive you must enter diskpart and then :
Code:
DISKPART> format fs=ntfs label=(name) quick

if you dont specify quick at the end then you will get a full format (simply using the letter "q" will also specify quick format). I have to use this option when FAT32 is not specified in the windows format tool (which is plenty but I dont really understand why it is there sometimes and then not at others). Diskpart can also be used to create partitions and assign drive letters and a couple other usefull little things that most folks (myslef included) use a graphical front end for. Sometimes the Windows format tool or whatever you may use (PartedMagic etc) may not do the job though, and that is when I turn to disk part... or like caddi says, when a disk is being a pill and just isnt acting right. Then its time for a cleaning! :)
 
The clean command however removes formatting and leaves your drive in a preformat state... I think.
The only difference between it and formatting is that formatting completes the process. I have linked above what it does and that is to simply remove the partitions. When you use the clean all, it then zeros out the drive/secure erases it.

I guess what I am getting at is what is this doing that is different from a format? A format seems to be the 'complete circle' of this process, no? Meaning it wipes out at partitions and boot records (as clean does), THEN (what clean doesn't do) makes the drive in a useable state. This process is seemingly more easily done in Windows with a couple of clicks versus this command line method. Right now, this is a long way to complete half of a drive format.

Anecdotes that it 'saved a drive or two acting wonky' doesn't mean anything if the format process would have accomplished the same thing. That is what we don't know. Is there some magic in clean to help get a drive back/functional versus a more simple (procedure wise) and complete windows formatting process???




and I have edited the information, please reread it and comment
Not sure you did anything???

1. In the first post, you never say what you are trying to find (DISKPART - you say "it" twice) and your picture doesn't show what to click on, just a whole bunch of chopped off run search hits. You need to be clear with what you are doing.
You say:
The first steps are to open start, open file explorer, and type run in the search pane.
In win ten I had to scroll about 3/4 way down the page to find it, I used the highlighted one.
In win 7 it shows right at the top of the results.
Just double click it and it opens a thingy on your screen.


I would change it to...
The first steps are to open start, open file explorer, and type run in the search pane.
In win ten I had to scroll about 3/4 way down the page to find DISKPART, I used the highlighted one.
In win 7 it shows right at the top of the results.
Just double click it and it opens a thingy on your screen.

2. I mentioned an easier way to get to it as well (at least in W10.. try it on other OSs)... just type DISKPART in the search. No run, no click on, no nothing. Just type DISKPART, then hit enter.. BAM.
 
Last edited:
I guess what I am getting at is what is this doing that is different from a format? A format seems to be the 'complete circle' of this process, no? Meaning it wipes out at partitions and boot records (as clean does), THEN (what clean doesn't do) makes the drive in a useable state.

Right. This is the part that I was saying only a nitpicker would notice. Clean destroys your partition table/mbr and anything else read at the beginning of the startup process before using the drive. Formatting happens afterwards and only if you tell diskpart to do it. Semantics right? :)

This process is seemingly more easily done in Windows with a couple of clicks versus this command line method. Right now, this is a long way to complete half of a drive format.
It is usually, but I seem to have a high rate of disks that can only be formatted through disk part (USB sticks mainly). I will get a dialogue about Windows being unable to complete the format and then Ill move on to diskpart. And as I said at times I want a file format that isnt listed in the Windows formatting tool (Fat32 ,for instance, is just not there sometimes). TBH the Windows format tool fails on me fairly frequently, but I can see that it would be the long way around if you dont have as many problems with it as I do.
 
you can start diskpart from simply typing diskpart into cmd.
de210bc1241d4ae520f58dcc4c6db521.png
also cleaning the disk is not just reformatting it, or some reason if you os doesnt want to install or boot to a disk formatting it wont fix it sometimes but cleaning it will.

as knoober touched on it kills the entire partition table which the hidden partitions are usually what break stuff and make it not want to boot.
 
Thanks for the additional information gents! :)

It is usually, but I seem to have a high rate of disks that can only be formatted through disk part (USB sticks mainly). I will get a dialogue about Windows being unable to complete the format and then Ill move on to diskpart. And as I said at times I want a file format that isnt listed in the Windows formatting tool (Fat32 ,for instance, is just not there sometimes). TBH the Windows format tool fails on me fairly frequently, but I can see that it would be the long way around if you dont have as many problems with it as I do.
Good to know there are other reasons to use DISKPART, for other file formats, but that isn't what is going on here.

Still not sure what it does outside of 'half' of what formatting does (as formatting removes all the partitions/BR too). But if you say it works better over formatting, cool! I guess I have been lucky with formatting.. or in the case of a USB stick, I just trash it if a long format doesn't work. :)
 
il be honest i have no idea if someone said that stuff before i did.
c8a.gif
 
While I have to admit that I am not familiar enough with the particulars to know "what it does" aside from what its effects are, I did think of a couple more things that might be worth noting about Diskpart:

1) Even though windows can format your disk for you it still includes Diskpart to use. They must see the need for a separate utility to use

2) Diskpart can also be used from the Windows installation disk when there is no OS present. You can Press Shift + F10 @ Windows setup to get a cmd prompt and diskpart will be available there as well.

Whew! Now there is everything I know about diskpart down in block letters :)
 
Back