Formatting via the command line can be useful if this procedure cannot be performed using standard system tools. There are several ways to format a disk or its individual volumes through the console, but they all involve one command - format. We tell you how to use it correctly in our instructions. See also: how to format a hard drive with Windows 10.
- Run Command Prompt with Administrator Rights
- Using the format command
- Formatting via DISKPART
- Cleaning the system disk
Important: formatting deletes all data from the disk. If you don't want to lose them, make a backup copy.
Run Command Prompt with Administrator Rights
An administrator account is required to format the disk. The console must also be launched with extended rights. On Windows 8 and Windows 10, you can open it through the context menu, which appears when you right-click on the Start menu or press the Win+X keyboard shortcut. In the latest builds of Windows 10, the PowerShell console is fixed to the menu instead of the command line. It can also be used to format a disk.
Select to run the command line with administrator rights
An alternative way is to find “Command Prompt” in the list of applications in the “Start” menu, right-click on it and select “Run as administrator.”
This way you can also get a console with extended rights
On Windows 7, the console is hidden in the “All Programs” - “Accessories” section. Right-click on it and select “Run as administrator.”
On Windows 7, the startup order differs slightly
In addition, all versions of Windows have a built-in search that will help you find and open the console with administrator rights.
Loading …
Format your hard drive from File Explorer
1. Open “This PC”, select the desired local drive that you want to format and right-click on it, then select “Format” from the menu.
2 . Select the file system for the drive from the File System drop-down list, make sure the method is selected as Quick , and then click the Start button.
Using the format command
Format is a command that has been used to format disks since DOS. On Windows 10 it continues to perform its function. Using format, you can format partitions on any external or internal drive. See also: Command Prompt commands in Windows 10.
The peculiarity of the command is that it does not merge partitions after cleaning. For example, if you have logical volumes C, D, and E on your disk, then you can format partitions D and E, but you won’t be able to merge them. Disk C cannot be cleaned because the Windows folder is located on it, which means it is a system drive and is formatted in a different way, which we will consider below. The letters may be different, but the principle is clear.
If we are satisfied with formatting the sections without merging them, then we perform the following steps:
- Launch the command line with administrator rights.
- Execute the command format d: /fs:fat32 /q. D in syntax is the letter of the section we are formatting; fs:fat32 - file system, in this case FAT32, can also be NTFS; q - quick formatting (if you don’t select it, it will be normal, which takes longer).
- When the message “Insert a new disk” appears, press Enter.
- Enter the volume label at your discretion or leave it at default.
We formatted partition D in NTFS and gave it a label
The procedure is very simple but limited. If you need to not only clear partitions, but also merge them, then you will have to use another method.
Loading …
Formatting a disk or partition using Disk Management
1 . Press the Win+X and select “ Disk Management ”.
2 . Right-click on the drive or partition you want to format and click the Format .
3. A new dialog box will open in which select the file system (I recommend NTFS) and check the “Quick format” checkbox.
FAQ
What to do if the operating system does not boot and you need to format the media?
You can use a Windows boot disk by specifying it as a boot device through the BIOS. Read more here.
The flash drive is formatted in exFAT, is it possible to convert it to FAT32 via the command line?
Yes, use the format command for this (the method is described above). There are also various GUI formatting applications, see all methods for converting from exFAT to FAT32.
When formatting via cmd you have to wait a very long time.
The fact is that when using format K:/FS:FAT32, normal formatting is applied, it takes up to 10 minutes or more. You can use DiskPart or use the “quick” switch for the format command, then the quick method with clearing headers will be used.
Please rate the article:
Did not find an answer to your question? Perhaps you will find a solution to the problem on our Youtube channel! Here we have collected small but effective instructions. Watch and subscribe to our YouTube channel!
Watch on Youtube
What is low- and high-level formatting
Format is a factory operation of physically structuring a disk. In its process, tracks (tracks), sectors, magnetic marks and service records are created on the surface of the new drive, which remain on it for the rest of its life. Each disk manufacturer uses its own proprietary methods of low-level formatting, and the data applied during marking is somewhat unique not only for the brand, but also for each instance of the device.
In the 90s of the last century - in the era of low-capacity and slow "discosaurs", low-level formatting was available through the BIOS of a regular computer. Because old hard drives did not have their own control program - this function was performed by the controller on the motherboard, and the marking standard was practically unified. Moreover, this procedure was necessary to maintain normal operation of the hard drive, otherwise, due to the imperfection of the magnetic head positioning system, it would become covered with “bads” - areas inaccessible for reading and writing, and would fail ahead of time.
Modern highly integrated hard drives with their own management system undergo Low Level Format once in their life - at the production stage. And all the functions of the same name in programs for home users are simply zeroing (overwriting with zeros) the logical space of the hard drive without affecting service areas and remapping “bads” - replacing unreadable sectors with good ones from the reserve. This complex, of course, solves a number of problems, but has nothing to do with the low level, so we will call it pseudo-low-level.
Format is the operation of creating a logical structure of an electronic medium in accordance with file system standards: recording boot data, file tables and other special information. It can only be carried out on disks with correct low-level markings applied by the manufacturer, and does not require special knowledge or training from the user.
High-level formatting is performed after the HDD is partitioned. Different sections of the same physical media can be marked up according to the standards of different file systems.
The High Level Format function is available from the operating system and applications running on it, as well as from the OS installation and recovery environment. It is harmless for drives of any type (does not affect performance or service life, with the exception of frequent use on SSDs under Windows older than version 7), but is critically dangerous for data - during the formatting process they are completely erased. In many cases, deleted files can be restored, but not in all cases and not always in their original form.
High-level formatting is fast and complete . With fast, only the boot sector and a clean file table are recreated, and the main partition space is simply marked as free. If it is full, the HDD surface is additionally tested for “bad sectors” and all records are destroyed. The second procedure takes much longer, but in some situations it is preferable to the first.
Diagnostics using ChkDsk
In Windows, there is a special tool called check disk (ChkDsk), which is launched through the command line. It can also be used through the Explorer window, but not with all the parameters and other interface. The utility allows you to improve performance, fix problems and damage. Be sure to refer to this tool before you decide to format your media. Perhaps this will solve the problems of poor performance. To run the program do the following:
- Run Command Prompt as Administrator.
- Type chkdsk c:, where c is the media to be checked.
- Press enter.
- If the computer displays a message that the command cannot be executed because the disk is being used by Windows and prompts you to check before booting the OS the next time, type “y” (yes) and press enter.
- Reboot, and before the OS starts, a disk check will be launched, after which a report on the result will appear on the screen. How many problems and damaged sectors were found and how many were fixed.
Disk scanning can be carried out with various parameters:
- /f—fix errors;
- /v—shows the names of files and directories being checked;
- /r— searches for and repairs damaged sectors;
- /I—check indexes with less thoroughness, used only for the NTFS file system;
- /x—with the f parameter, forcefully dismounts the volume;
- /l:size - changes the log file to the specified size, works only with the NTFS system.
The parameter is written after the command, for example:
chkdsk with: /f /r
This means that disk c will be checked, errors will be corrected automatically (/f), sectors will also be checked for damage and an attempt will be made to recover information (/r).
If the checkdisk finds errors but cannot fix them, run the following command:
chkdsk with: /f /offlinescanandfix
This will perform the so-called off-line diagnostics of the hard drive, and you may also have to reboot.
Correct operation of ChkDsk is possible only if the command line is launched as an administrator, and also only with FAT32 and NTFS.
What type of formatting to choose
High level fast
This method is optimal when:
- installing the operating system on a new or used but working drive;
- creating a partition for storing data on working media;
- need to quickly free up a partition or an entire disk;
- there is a non-zero probability that after formatting you will have to restore erased files.
High level full
It is more suitable for cases:
- saving or occurrence of errors during operations with the drive during or after quick formatting;
- desire to delete information so that it cannot be recovered using relatively simple methods.
Pseudo-low-level
This is the choice when:
- full formatting did not eliminate errors during disk operations;
- the surface of the drive has defects and you want to get rid of them;
- you are going to give (sell, donate) the disk to another person and are afraid that your personal files can be restored after regular formatting;
- The computer is infected with certain types of boot viruses that cannot be removed by other methods.