Diskpart - Another way to clean the disk of a previous partition and format

بِسْمِ ٱللهِ ٱلرَّحْمٰنِ ٱلرَّحِيمِ
السَّلَامُ عَلَيْكُمْ


This article describes the DiskPart utility. DiskPart differs from many command-line utilities because it does not operate in a single-line mode. The commands are read from standard input/output (I/O) and can be direct these commands to any disk, partition, or volume.

The situation

I have a 4GB USB Thumbdrive which is not even properly detected by the MS Windows and almost every data that I copy into it will be corrupted. I been in a situation which my work file were copy into it and all the file become unreadable, and also the binary bit become 0. So I try to find some software to fix it but mostly need to buy the full version. So the search engine come across to some blog which is write about the DiskPart utility that comes with the MS Windows it self. So this is the way I fix my 4GB drive and hope you will solve your problem too with this solution.

Caution: 
  • Please backup any necessary data from your removable drive before execute any command from this page. 
  • I will not responsible for any losses occurred during the process or any changes that happen to your devices.  
  • This method were meant for  moderate/expert people that know what to execute the command.
  • Please search some advice and read more about this method before executing.

Lets Execute

  • Press Start - type cmd.

  • The command prompt will execute. Type diskpart.

 


  •  DiskPart utility window will popup.


  • Type list disk. This command will list any available device that your computer can read from your I/O device. In my situation, the disk that need to clean is Disk 1.


  • Next type select disk 1. Windows don't differentiate between capital letter and small letter. So don't mind to type it in small letter or capital letter.


  • After the select disk 1 command is execute, there is some notification below the line which state "Disk 1 is now the selected disk.".
  • Now, type clean. After the clean process is success, there is new notification below the line we type that state "DiskPart succeeded is cleaning the disk.".
  • This command is meant for cleaning any partition and partition file system type.


  • Next we create a new partition to our drive. We type create partition primary. This command will create a partition for the drive and change the drive logic state to primary drive.
  • Success command will show "DiskPart succeeded in creating the specified partition.".


  • Next we type active to make the partition in active states.
  • Success command will show "DiskPart marked the current partition as active.".


  • Now,  type select partition 1. This command will select the current partition that we clean before.
  • Success command will show "Partition 1 is no the selected partition.".


  • Next we must decided the file system type for the drive we clean so that the format process will change it.
  • I choose the drive file system as FAT32 type.
  • So next, we type format fs=filesystem. (replace the word filesystem to the type that you want. In my case I choose fat32).


  • Wait for the format process to reach 100 percent and the process is completed. To end the DiskPart prompt, type exit.


After all this process, you can use the drive as usual and minimal the corrupted data that stored in the drive. 

Now that you know the way of doing it. Hope this guide will help you solve the problem of yours.

That all from me and see you again in my next writing.
If you have any question, please email me at: 9m2aim [at] gmail.com (replace [at] with @). 73! .