Kim Barloso

Formatting flash drive and drive via the command line


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.

Content :

    Start command line

    It is carried out as follows:

    1. Open Task Manager (right-click the taskbar - "Task Manager" or the keyboard shortcut Ctrl+Shift+Esc),

    2. Click "File" and go to "Run New Task" menu,

    3. In the window that appears, enter the CMD command and check the "Create task with administrator rights."

    4. Hit "Ok".
    5. After doing this the console (command prompt) will be displayed on your computer.
    Consider! The following steps may lead to the loss of personal data from the user's device. Please follow the given sequence and enter each command carefully without making any typing mistakes.

    Solution 1: DiskPart Utility

    1. Insert the USB flash device into a USB port of a PC or a laptop.
    2. From the command line enter the following (after each entry press Enter):
    3. diskpart (a tool to access the mapped drives will start),

    4. list volume (the list of all drives in the system is displayed. The USB stick we have formatted will be displayed as volume 15),

    1. select disk 14 (select device),

    1. attributes disk clear readonly (remove attributes),
    2. clean (remove it),
    3. create partition primary (create primary partition on the storage),
    4. 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:

    1. Switch the stick to the PC,
    2. Look up the name of the stick in "My Computer" (e.g. removable disk (K.):),

    3. In the command line enter: format [letter USB key or disk]:/FS:FAT32 quick, press Enter,

    4. The message "Put a new disk in the K: drive",

    5. Press Enter.
    6. 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.

    “Hello. My name is Kim. I discovered that technology, when used with a purpose, can be pretty amazing. To share the wonder of tech, I’ve written for blogs like and With over three years of freelance writing experience in the technology and entertainment niche, I can write a storm about a software app, a cool browser extension, a new mobile device and other geek-centric stuf... “

    Connect with me Instagram | LinkedIn | Twitter | About

    Kim Barloso