Sometimes formatting with the first two methods will cause the computer to freeze or display an error that the process cannot be completed. In this case, use the command line. There are two ways to format: using the Diskpart utility or using the Format command.
Start command line
It is carried out as follows:
- Open Task Manager (right-click the taskbar - "Task Manager" or the keyboard shortcut Ctrl+Shift+Esc),
- Click "File" and go to "Run New Task" menu,
- In the window that appears, enter the CMD command and check the "Create task with administrator rights."
- Hit "Ok".
- After doing this the console (command prompt) will be displayed on your computer.
Solution 1: DiskPart Utility
- Insert the USB flash device into a USB port of a PC or a laptop.
- From the command line enter the following (after each entry press Enter):
- diskpart (a tool to access the mapped drives will start),
- list volume (the list of all drives in the system is displayed. The USB stick we have formatted will be displayed as volume 15),
- select disk 14 (select device),
- attributes disk clear readonly (remove attributes),
- clean (remove it),
- create partition primary (create primary partition on the storage),
- format fs=fat32 (change the file system to FAT32 if needed).
Method 2. Format
The second way to format a USB flash drive using the command line is to use a specific task. The main thing is not to confuse the name of the removable disk.
How to format the USB stick:
- Switch the stick to the PC,
- Look up the name of the stick in "My Computer" (e.g. removable disk (K.):),
- In the command line enter: format [letter USB key or disk]:/FS:FAT32 quick, press Enter,
- The message "Put a new disk in the K: drive",
- Press Enter.
- The file system of the flash drive has been changed and the drive is formatted.
Thereby there are two basic ways to format sd-cards and usb sticks through the command line interface.
Frequently asked questions
What to do if the operating system does not boot and you need to format the medium?
You can use a Windows boot disk indicated as boot device in BIOS. More details may be found here.
The stick is formatted in exFAT, may I use the command line to reformat it to FAT32?
Yes, use the format command (described above). There are also different formatting applications with graphical shell, see all the ways to convert from exFAT to FAT32.
When formatting via cmd you have to wait very long time.
The point is that format K:/FS:FAT32 applies a normal format, it takes up to 10 minutes or more. You can use DiskPart or use the "quick" key in the format command, then the quick method with header cleansing applies.