"Format C": what is the command? Formatting hard disk partitions. Quickly format a flash drive using the command line How to format a computer using the command line

"Format C": what is the command? Formatting hard disk partitions. Quickly format a flash drive using the command line How to format a computer using the command line

05.02.2022

The other day I tried to connect my old WD external hard drive (which had been idle for a very long time) to a Windows 8.1 computer and found that they couldn't access it. As soon as I plugged it in and opened the This PC folder, I saw a green bar slowly filling up the window's address bar, and when I right-clicked on that drive's icon, the system hung for a moment. Then I realized that something was wrong with the disk, and in order to try to "revive" it, it was necessary to check it for errors and format it if necessary.

External hard drive not available

If you encounter a situation where your external hard drive has become inaccessible, this guide will help you check for errors / format it using the command line (CMD).

How to perform a disk check using CMD

Using the WinX menu in Windows 8 (8.1), open a command prompt window and type the following command:

Where "D" is the letter of the external hard drive - or any other drive, for that matter - that needs to be scanned for errors and then corrected if any are found. In short, you just need to replace "D" with your drive letter and then press the Enter key on your keyboard.

This will start the process of checking the disk and fixing the errors that are found.

Advice: Command Prompt can also be launched using the Run dialog. To do this, press Win + R on the keyboard, enter the command "cmd" (without quotes, of course) and press Enter.

In my case, it was the verification that helped - as soon as the process was completed, I found that I again had access to the disk.

How to format a drive using CMD

There is nothing complicated here either. To format a drive using the command prompt, type the following command and press Enter:

Again, replace "D" with the letter of the drive you want to format.

Hope this information helps you someday. Good luck!

Have a great day!

One way to format a flash drive is to use the command line. It is usually resorted to when it is impossible to do this by standard means, for example, due to an error that occurs. How formatting occurs through the command line, we will consider further.

We will look at two approaches:

  • through command format;
  • through the utility diskpart.

Their difference is that the second option is used in more complex cases when the flash drive does not want to be formatted in any way.

Method 1: "format" command

Formally, you will do the same as in the case of standard formatting, but only using the command line.

The instruction in this case looks like this:


If an error occurs, you can try to do the same, but in "safe mode"- so no extra processes will interfere with formatting.

Method 2: Diskpart utility

Diskpart is a special utility for managing disk space. Its wide functionality provides for media formatting.

To use this utility, do the following:



Thus, you can set all the necessary settings for formatting the flash drive. In this case, it is important not to confuse the drive letter or number so as not to erase data from another medium. In any case, the task is not difficult to complete. The advantage of the command line is that all Windows users, without exception, have this tool. If you have the opportunity to use special programs for removal, use one of those indicated in our lesson.

The command line is a program that allows you to control the operating system using special text expressions called commands. It is a versatile and advanced tool for diagnosing and fixing computer problems. Of all its functions, it is worth highlighting the ability to check for errors and format the disk via the command line in Windows.

The hard disk of a computer is a data store for both the OS itself and users. A well-known weakness of Windows is its inability to clean up after itself "garbage": remnants of unused files and deleted applications, registry problems and data recording. Therefore, periodically, in addition to all other measures, it is necessary to diagnose whether there are errors. Also in many cases formatting may be required:

  • When installing a new hard drive.
  • In the presence of a large number of failures, glitches in work, infection with viruses.
  • When reinstalling the OS.

Formatting is the marking of a data storage area, the formation of a file system, i.e. a set of logical rules by which access to the recorded information is carried out. Moreover, the old information is erased, the damaged areas of the hard drive are marked so that data is not written there. Before formatting a hard drive, it must be checked for errors.

Diagnostics with ChkDsk

Windows has a special tool called Check Disk (ChkDsk) that runs through the command line. It is also possible to use it through the explorer window, but not with all the parameters and a different 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:


A disk check can be performed with various options:

  • /f- fix errors;
  • /v- shows the names of files and directories to be checked;
  • /r- searches for and restores bad sectors;
  • /I- checking indexes with less thoroughness, used only for the NTFS file system;
  • /x- with the f option forces the volume off;
  • /l:size - changes the log file to the specified size, works only with NTFS system.

The parameter is written after the command, for example:

This means that disk c will be checked, errors will be corrected automatically (/f), sectors will also be checked for corruption 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, you may also have to reboot.

Correct operation of ChkDsk is possible only if the command line is run as administrator, and also only with FAT32 and NTFS.

Formatting

Formatting is a more radical way to put your hard drive in order. All information on it will be lost, in most cases, it will be impossible to recover it. It depends on the chosen method and on the presence of damage. There are special data recovery programs, but it's still better not to take risks and format the hard drive only after copying data from it to another medium.

You can perform formatting through the command line using the following algorithm:


As with ChkDsk, you can set options here. Help on features can be obtained with the expression format/?. We note the following most important:

  • format c: /FS:filesystem - formatting in a specific file system, instead of "filesystem" you need to specify FAT32 or NTFS.
  • /q - quick format. The table of contents is cleared, but the data itself is not destroyed. They continue to be physically there, but Windows sees the disk as completely empty and writes information over the old data. If possible, we recommend that you do not use this option to avoid further media problems.
  • /a:size - format with the default cluster size.
  • /v:label - create a volume label, that is, a disk name.

Formatting your hard drive will allow you to use it like new again, increase its performance and eliminate errors. Together with the ChkDsk and Format commands, you can also run one such as DiskPart through the command line to partition the media into sections with different sizes and names. Remember that if you bought and installed a new hard drive in your computer, you need to format it. And if you are simply not satisfied with the work of the old hard drive, first try just running a check with ChkDsk, especially if the OS is installed on it.

Today I want to tell you about such a wonderful program as. What is so wonderful about her? - you ask. And the fact that it can be used (data from a flash drive after formatting) or a disk, and the most interesting thing is that this program is available to any Windows user through the command line, in other words, it does not require installation. And let the phrase “command line” not scare you - using it is much more convenient and easier than it seems at first glance.


So, after we have inserted the USB flash drive into the USB connector, we launch the command line. To do this, press Start and in the search bar write cmd, and press Enter.

In the command line that appears, write , thereby launching the disk management program. Click Enter.

In the list of devices we find our flash drive - it can be recognized by its size. In my case it is Disc 6. Therefore, we write the following command. If your flash drive is number 4, then you need to enter the command. If under the number 2, then, respectively. Click Enter.

Then we enter the command clean, which will delete all files from a flash drive or disk. Click Enter.

Then we enter the command. Thus, we select the specified section and move the focus to it. Click Enter.

Then we execute the command. The system marks the partition as active. Click Enter.

Now it is necessary. It can be fast or complete. Full formatting is done with the command format fs=NTFS. If you don’t want to wait and time is running out, then we do a quick format with the command format fs=NTFS QUICK. Click Enter.

We are waiting for the end of formatting.

Now you need to assign a letter to the flash drive. We do this with the command assign. Click Enter.

The flash drive is automatically assigned a letter, and after that, the autorun of the media is triggered.

Now you can exit the program. We enter the command exit and press Enter.

The last thing to do is copy the distribution files of the operating system (the one for which we made a bootable USB flash drive) to, in fact, our flash drive. After that, our flash drive will be bootable, and will boot absolutely everywhere, on any device. With its help, it will be possible to install your operating system anywhere.

I want to note that with the help of the program you can carry out a lot of manipulations with both hard drives () and flash drives. The example discussed today is only a small part of all the possibilities. I will consider other commands and examples of working with this program in the following articles.

Also read on this topic:

Format flash drive to NTFS
How to recover data from a flash drive after deletion or formatting? How to change disk size in Windows 2000/XP/Vista/7/8. EaseUS Partition Master Free How to create a bootable UEFI flash drive to install Windows 8.1 and 10?
How to freeze a row in Excel? How to create a disk image using Daemon Tools?

When installing the operating system, as well as when changing files, redistributing space between partitions, it is necessary to clear the hard disk. This is a fairly common operation performed by PC users. If you have not done anything like this yet, then let's deal with the theoretical part of the question.

Formatting process, what is it?

The marking of information storage areas, in which some of it is deleted, is called formatting. It creates a system for accessing stored information and is performed to:

  • changing one file system to another;
  • deleting files from disk space.

At the moment, there are a large number of different file systems. They are used on various equipment, including not only computers, but also mobile devices. The latest versions of Windows use the NTFS file system.

How to format a hard drive: detailed video instruction

Why delete files from disk?

Formatting is done to remove files from the hard disk, as well as to change one file system to another.

Why clean the disk

In most cases, they resort to it:

  • before installing a new OS;
  • to create a Windows installation image, for example, on a flash drive;
  • due to the need to clean the disk from files, in case they are not needed.

Windows utilities for deleting files

Despite the large number of programs for working with a disk, Windows has its own set of utilities.

Consider the process of formatting disks using Windows:

  1. select the disk to be cleaned;
  2. press the right mouse button;
  3. select Format;
  4. in the window that appears, select the file system, cluster size, and formatting method;
  5. as a file system, it is recommended to set NTFS, and leave the cluster size by default - 4096;
  6. after setting the required parameters, click Start.

Windows also includes a more complete service for working with the hard drive.

To open this menu, do the following:

  1. right-click on My Computer;
  2. select Manage;
  3. open Disk Management;
  4. In this menu, the user can perform various operations on the hard disk.

You can perform this operation using the command line:

  • press the key combination Win + R;
  • enter cmd and press Enter;
  • on the command line, write the format y: command, where y is the letter of your drive, maybe, for example, c or d;
  • the system will ask you to confirm the operation by pressing the Y key;
  • after confirmation, the system will start the cleaning process;
  • this message will appear when finished.



If you need to format a disk partition from the BIOS, you will have to tinker a little. Unfortunately, the BIOS does not have tools for this purpose, therefore, third-party software should be used to perform these operations.

One of the most common is Acronis Disk Director. To work with it, you need to create bootable media in the operating system with the files of this program. But before you start creating bootable media, you should consider one more option - formatting using the Windows Installer. This solution is a simpler option compared to Acronis Disk Director.

For this method, you only need a disk or flash drive with a recorded Windows installation package, and you must also perform the following steps:


Attention! Drive partition letters may not match. To more accurately determine the required disk, use the wmic logicaldisk get deviceid, volumename, size, description command.

To create a bootable flash drive you will need:


Action algorithm:

  1. insert a flash drive;
  2. install and open the program;
  3. in the application, open the Tools section and select Acronis Bootable Media Builder;
  4. click "Next";
  5. select the type of Windows PE bootable media;
  6. in the next menu, you should mark the necessary components for recording to a USB flash drive;
  7. after selection, you must select the media to which the recording will be made, and click Next. The flash drive should be formatted in FAT 32 format using the Windows utility;
  8. you can also create an image for later burning to a flash device or disc using Ultra ISO.

To download a flash drive you need:


How to format an external file drive to NTFS

The most convenient formatting method is to perform all actions using standard OS utilities. This solution does not involve additional software installations and the creation of boot disks.

If you do not have an OS installed, then in this case you should use special programs, such as Acronis.

To execute as ntfs:

Utilities

In addition to the standard Windows, there are various utilities used for the same purpose. Among the most common options are the following:


What is the best program in ntfs to format drives?

Each program has its own characteristics, but the main direction for all utilities remains the same - working with disks, including creating partitions, forming into other file systems, etc. Therefore, their choice is a purely personal matter for each user.

Problems and solutions


  • format command - cannot be used for a system drive if it is in its environment;
  • if the OS is on another partition of the hard drive, it cannot be deleted;
  • antivirus settings may block access to different sections of the hard drive;
  • different applications and viruses can block access.

If you have removed the above factors, but you still cannot start the process, you will have to resort to special programs. The most popular tool is HDDscan, which is easy to install and free of charge.

Action algorithm:

  • download the utility;
  • open and install;
  • run as administrator;
  • click on the icon in the form of a sphere located in the center of the interface;
  • select Surface tests;
  • check the box next to Erase;
  • go to the Add test tab;
  • click on Scan;
  • in the right, lower corner, write down these errors;
  • set the EraseWAITs option to ON and select Scan again;
  • repeat until the error is gone.

You can also use Acronis Disk Director. If it is impossible to format a portable drive using this program, most likely it is partially out of order. And the whole procedure, sometimes it is possible to perform, only from bootable media, that is, not in the operating system.

How to force format a flash drive?

You can use the HP USB Disk Storage Format Tool to clean flash drives.

How do I format a write-protected drive? Simply, first open the command line and write the following commands in it:

  1. diskpart;
  2. list disk;
  3. select disk Z. Z is the number of the flash drive, the execution of the previous command is shown;
  4. attributes disk clear readonly;
  5. clean;
  6. create partition primary;
  7. format fs=ntfs;
  8. exit.

Windows includes utilities that:

  • provide the necessary set of functions;
  • have a fairly simple interface that will be easy for novice users to work with.

© 2022 hecc.ru - Computer technology news