Formatting a flash drive using diskpart. How to format a flash drive or hard drive if it is not formatted. Convert files without data loss

Formatting a flash drive using diskpart. How to format a flash drive or hard drive if it is not formatted. Convert files without data loss

Today I want to tell you about such a wonderful program as. What's so wonderful about it? - you ask. And the fact that with its help you can (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 via the command line, in other words, it does not require installation. And don’t let the phrase “command line” scare you – using it is much more convenient and simpler than it seems at first glance.


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

In the command line that appears, we 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's Disc 6. Therefore, next we write the command. If your flash drive is number 4, then you need to enter the command. If the number is 2, then , accordingly. Click Enter.

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

Then we enter the command. Thus, 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 quick or complete. Full formatting is performed with the command format fs=NTFS. If you don’t want to wait and time is running out, then we do quick formatting with the command format fs=NTFS QUICK. Click Enter.

We are waiting for the formatting to finish.

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

The flash drive is automatically assigned a letter, and then the media automatically starts.

Now you can shut down the program. Enter the command exit and press Enter.

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

I would like to note that with the help of the program you can carry out many 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:

Formatting a flash drive to NTFS
How to recover data from a flash drive after deleting or formatting? How to change disk size in Windows 2000/XP/Vista/7/8. Free program EaseUS Partition Master Free How to create a bootable UEFI USB 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?

Hello friends.

During the time you have been using a flash drive, I think you have noticed that it is often subject to software glitches. Fortunately, almost any problem with it is usually solved by formatting.

If you can’t do it using the usual methods, then I’ll tell you how to format a flash drive via the command line. Moreover, this can be done in several ways and any of them will not cause you any difficulties. By the way, this formatting is suitable for various flash drives, including microSD.

Whichever method you use, first run Command Prompt as Administrator.

Don't know how?

One option: find it in the Start menu among the standard programs, then right-click on it and select the appropriate item in the context window.

Or type “cmd” in the OS search bar. And accordingly open the found utility.

Method one - to Format command

This method involves using a command like this:

format /FS:exFAT F: /q

What does it mean?

  • format - a command line explanation of what you want to do with the flash drive. That is, format it.
  • exFAT - file system indication. And if you suddenly have a question about why this particular FS, then you are welcome to read this old one of mine.
  • F: - path to the drive to be formatted, or rather its root directory. If you have it located under another letter, you should indicate it accordingly.
  • /q - means quick cleanup.

Well, how about formatting??

Your actions are:

  1. Form a team as needed in your case.
  2. Enter it where the cursor is blinking.
  3. Press Enter.
  4. Next, a notification will pop up: “Insert a new disk into drive H: and press the Enter key...”. Since the drive is already inserted, we perform only the second instruction.
  5. After this, you will see the following message: “Volume label (N number of characters, Enter - no label needed).” Click the same button again.

Now the flash is clean.

Method number two - inbuilt utility Diskpart

Use this option only if for some reason you did not like the first method. Well, or something didn’t work out there.

The Windows operating system has a standard utility that allows you to work with disks, including formatting them. To do this, you need to give the command line several tasks one at a time.

Below I will give their order and notation:


I hope I could help you in some way.

Maybe your friends also encountered a similar problem? Share this article with them on your social media pages.

Hello everyone, in this review I will tell you and show you how to format a flash drive or hard drive even if they are not formatted.

In the last article we made our own. Today we’ll talk about ways to format USB devices and hard drives.

To do this, we need a flash drive or hard drive of any size and some free time. In the examples, I will have a portable USB device with a capacity of 8 GB, you may have other sizes.

Let's look at three formatting methods using Windows:

  • Standard
  • Disk management
  • Command line

Standard Formatting

We connect the flash drive to our computer and go to My Computer.

Select our device, right-click on it and select Format from the pop-up menu.

Specify the file system, select the fast or normal formatting method and click Start. You can also choose to restore default settings.

Warning about data destruction, if there are files that need to be saved, do so, otherwise they will be deleted. Click OK to start formatting.

A notification may appear that this disk is being used by another program or process, click YES.

Formatting begins; if you have little time, I recommend using the quick one (clearing the table of contents); if you have time, you can perform normal formatting.

When finished, a window will appear - formatting is complete, click OK and close all open windows.

How to format a flash drive or hard drive in the standard way | website

Formatting via Disk Management

There are times when it is not possible to format a flash drive or hard drive using standard means and various errors appear. To do this, there is a second formatting method through disk management.

Right-click on my computer and go to Management.

Go to the Disk Management tab.

We select our device, in my case it is Disk number 1, right-click on it and go to Format again.

They warn that this is an active partition and all data on it will be lost, click Yes.

Then formatting options appear. You can write a volume label, select a file system, cluster size, and quick or regular format. After everything has been selected, click OK.

They again warn that formatting will destroy all files on this volume, click OK to continue.

The volume formatting process starts.

Upon completion, this drive should be healthy and active.

This way you can format a portable USB device or hard drive if standard formatting methods do not help.

How to format a flash drive or hard drive using Disk Management | website

Formatting using the command line

If you are not looking for easy ways, then I suggest you use the third formatting method via the command line, which is available in standard Windows programs and features.

Call up the Execute window, press a combination of buttons on the keyboard , write the command and press OK or enter.

A black screen and a command line opens, in which we will carry out the formatting procedure.

Now you need to write the following command and press enter.

  • format - formatting
  • fs:ntfs - select a file system, you can enter fat32 instead of ntfs
  • j: - drive letter (flash drive)
  • q - quick format

Asks you to insert a new disc into the drive and press enter, we just press enter.

File system structures are then created and formatting is completed.

To exit the command line, type the word or just close this window.

This way you can format any USB device or hard drive without resorting to standard formatting tools.

How to format a flash drive or hard drive - command line | website

Results

Today we learned how to format a flash drive or hard drive in three different ways, even if they are not formatted.

You may have questions related to formatting external and internal devices. You can ask them below in the comments to this article, and also use the form with me.

Thank you for reading me on

One way to format a flash drive is to use the command line. Usually it is resorted to in cases where it is impossible to do this using standard means, for example, due to an error occurring. We will look further at how formatting occurs via the command line.

We will consider two approaches:

  • through the team "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 everything the same as in the case of standard formatting, but only using the command line.

The instructions in this case look like this:


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

Method 2: "diskpart" utility

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

To use this utility, do the following:



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

One of the most common actions with hard drives of any type is formatting them. There can be quite a lot of situations when a logical partition or hard drive requires formatting. But in some cases, in particular with regard to the system partition, the standard procedure cannot be performed using Windows. In this case, the command line is used (we take Windows 10 as an example), which can be launched by booting from removable media. Next, we will consider several options for carrying out the formatting process both in the operating system environment and when booting from an optical disk or a regular flash drive.

Formatting a hard drive via the command line: why is this necessary?

First of all, it is worth saying that absolutely all experts note the fact that formatting is best done from the command console, despite the fact that the system itself has its own tool.

Firstly, additional attributes can be applied to the basic formatting commands, which, in addition to carrying out the process itself, allow you to perform some additional actions. Secondly, the console becomes absolutely indispensable when reinstalling the operating system, troubleshooting problems, or when the hard drive does not open, for example due to damage, and loading the OS becomes impossible. If critical failures occur on your hard drive, whether you like it or not, you cannot do without a full format. Some users try to use quick formatting, however, as practice shows, it can only clear the table of contents and, in the end, when you need to bring the hard drive back to life, it turns out to be far from the best tool, unlike full formatting.

How do you open the Windows 10 Command Prompt?

First, let's look at calling the console itself. Any Windows system has several simple methods.

The most used and most common method specifically for Windows 10 is to use a special “Run” menu, in which you enter In systems of a lower rank, this option can also be used, but previously the link to the console was displayed directly in the main menu, called through the “Start” button , but in the tenth modification this is not the case.

An equally simple way is to enter a query in the search field, which can be called up from the right-click menu on the Start button. Here you can simply launch the console, or you can start it via RMB as an administrator (working with the command line very often requires administrative rights, especially to carry out any critical actions in relation to the hard drive and the operating system itself as a whole).

Finally, you can open the System32 directory in the standard Explorer, located in the main system directory, and launch the cmd.exe file using the methods that were shown just above (opening the file as administrator).

When booting from removable media (installation, recovery disks or USB drives), in most cases the combination Shift + F10 is used.

Some nuances of disk access

I would immediately like to draw the attention of all users to the fact that even when using the cmd.exe applet, formatting the system partition will not work. This is understandable. Well, the system cannot format the disk on which it is located.

Therefore, formatting a hard drive via the Windows command line in the operating system itself applies exclusively to logical partitions, removable media (including USB HDD), as well as to other hard drives installed on the computer (RIAD arrays). By the way, even if the operating system is installed not on drive C, but, for example, on partition D, formatting the first partition will still be unavailable, since when booting the primary BIOS system accesses this partition, and in any case it contains the files necessary to start the OS.

Standard logical partition formatting

Now directly about the process itself. For now, we will not touch the system partition, but will focus on logical and additionally installed disks of any type.

After calling the console, in the simplest case, formatting the hard drive through the command line is done using the universal format command, after which the drive or partition letter is entered separated by a space with a colon. For example, the disk in the system is designated by the letter H. The command in this case will look like “format h:”.

This is a complete formatting of the hard drive via the command line, although you can use another method, which will be described in more detail below.

Additional format command attributes

As already mentioned, the good thing about this command is that you can add additional attributes to it, as a result of which some other actions can be performed.

You can view a complete description of all possible options for executing a command in the console itself by entering the line format /? (this command opens the full list of additions). There are quite a lot of attributes, but among all of them it is especially worth noting quick formatting by entering /q after the main command, formatting with installation of a specific file system, for example fs:ntfs, as well as the use of the V:NAME combination to set the volume label, where NAME is an arbitrary disk name or section.

Booting from removable media and calling the command line

In situations where there are problems accessing the system partition, in particular the hard drive cannot be opened, formatting it (if other troubleshooting methods do not help) can be done exclusively from the command console launched when booting from removable media. One of the most popular tools is starting from a LiveCD.

Formatting a hard drive through the command line, which can be accessed with the combination Shift + F10 (from the recovery console or without it), can be done using the same format command, indicating the letter of the system partition and specifying additional formatting parameters.

Using the diskpart tool

However, as most experts admit, it is not always appropriate to use a standard command. Another method is considered more effective, however, in most cases it is usually used for removable USB devices, including USB hard drives, from which you need to make a boot device.

In this case, formatting a hard drive via the command line (diskpart) begins by entering the command of the same name, after which the list disk combination is entered to view all drives installed in the system.

All disks are marked not with letters, but with numbers. Therefore, some users are faced with the problem of identifying their device. The easiest way to recognize it is by the indicated size (you obviously can’t confuse the same flash drive with a hard drive).

Next, to select a disk, use the select disk X command, where X is the number of the desired disk from the list presented. After this, the clean line clears the contents of the media, and then creates a primary partition (the create partition primary command). After this, the current partition is selected again (select partition 1) and activated (active). This command is not always used. If you do not plan to make it bootable, you can skip it.

Only at this stage does the actual formatting of the active primary partition begin, indicating the preferred file system, for which the format fs=ntfs (or fat32) command is used. If you need to do quick formatting, quick is added to the line separated by a space. But to achieve optimal results, you should not use it.

At the end of the process, the partition (device) needs to be assigned a volume label. This is done with the assign command (the letter will be assigned to the device automatically). After this, all that remains is to transfer the installation distribution files to the created drive.

Third party utilities

If someone does not like such methods, any free one like Disk Director from Acronis, HDD Low Level Format Tool, Partition Magic, Paragon Hard Disk Manager, etc. can be used to simplify the work.

True, they are all equipped with a graphical interface, and we are not talking about using the command console, although many users will find it much easier to work with such utilities. But, since in this case it is the use of the command line that is being considered, there is no point in dwelling on such utilities and their capabilities.

Conclusion

As a result, it remains to be said that using the console, in which commands specially provided for in Windows systems are entered, which, by the way, migrated to these operating systems from DOS, is not particularly difficult. In addition, it is the command line that allows you to eliminate a great many problems that cannot always be fixed using Windows tools and system tools. And the formatting process itself is much higher than if it were run in the operating system environment. It’s no secret that quite often you can see a message appear that Windows, for some reason, cannot complete the formatting. And if you work with a console, such problems almost never arise. And that is why, in most cases, it is recommended to carry out all processes related to cleaning, formatting disks and partitions, preparing bootable media, etc. exclusively using standard console commands, and not other built-in system tools.

views