How to repair corrupted pen drive using cmd

Who does not have a USB today? Well, today we are going to see how to repair damaged USB with the tools that Windows 10 provides us . Surely it has happened to everyone that the USB drive has been damaged or our files have been corrupted. Perhaps we have also seen that our unit appears in RAW format. All this will have an easy solution, so let’s see them.

Well, we must take that “easy solution” between tweezers. We will obtain a satisfactory solution if the damage caused to the pendrive is not too important , and if it is some bad sectors, loss of the drive letter, or the lost format (RAW drive).

There may also be more serious errors that have occurred due to continuous use of the device, memory cell wear or various other causes. Precisely for this reason, we are going to see some preliminary actions to check if our pendrive has a solution.

The first, does the computer detect it?

It seems silly, but the first and most important requirement of all is that the computer must recognize our damaged USB. Otherwise, there will be nothing to do. Let’s see what we can do to make it recognized and we know it.

  • Insert the pendrive in the USB port of your PC, if it does not work in one, try another one.
  • It would also be good if you tried on a different computer or even on another operating system, such as Mac or Linux.
  • Identify the typical sound the USB drive makes when plugged in

Well, to know if it has been detected, we will only have to go to our file explorer and access ” This computer “, there should be the damaged USB.

If we don’t see it , we can still know if we can really know if our team recognizes it or not. Sometimes the only problem we have is that the USB has lost its letter , and Windows is not able to mount as a valid drive. With this precisely we are going to start with the solutions :

Solution 1: If I don’t see the corrupted USB on my computer, it’s Diskpart’s turn

We are going to use this solution in the event that our unit is not recognized by our PC or even so, we cannot access it, as is our case. If we click on it, a message appears saying that ” Let’s insert a disk in the unit “, although we know that it is already inserted.

Diskpart is undoubtedly the star program in storage unit repair tutorials and articles, and this is no exception, in addition, it is a program that is installed natively in our operating system . With Diskpart we can do a lot of things, but for now we are only interested in two very specific things, so let’s proceed.

Let’s insert the damaged USB into our computer and then we will open a CMD or PowerShell window . To do this we press the ” Windows + X ” keys and open a menu with a gray background, here we are going to select the option ” Windows PowerShell (Administrator) “.

Now we are going to type and then hit Enter:


Now we are going to list the volumes (mounted disks) on our system by typing:

list volume

Here we see that all our partitions appear. In one of them we see the designation of removable , so we can repair damaged USB or at least try. In our specific case, we see that the drive actually has a letter (F) but a “ Not usable ” message appears Anyway, we are going to do the complete procedure to repair the damaged USB .

We identify the number of the unit (the one that appears in the first column). We wrote:

select volume <number>

list partition

To list the partitions that have our USB.

If no partition appears in the corrupted SUB

We don’t have any, so let’s see the complete procedure to create one. Follow these steps if you don’t have any partitions either or your drive looks like RAW :


We clean the entire disk.

create partition primary

We create the partition.

select partition 1

We entered the partition.

format fs = FAT32 label = USB quick

We format and name the partition. If it is a portable hard disk, we are going to write “fs = NTFS”.


We activate the partition.

assign letter = <letter>

Now our USB should be repaired and ready to use. What’s more, a file explorer window will open in order to work with the USB.

If a partition appears on the damaged USB

If in your case, when you placed the command “list partition” a partition appeared on your USB, but it had no letter , all you have to do is assign it to it:

list partition

select partition <number>

assign letter = <letter>

This way, you may be able to repair damaged USB without losing the files inside. In the event that you have not been able to, follow the previous section to format and leave it completely clean.

Solution 2: Search with CHKDSK for bad sectors and repair them

Do not close PowerShell, because we are going to continue using it, with this method, what we are going to do is analyze the storage unit to look for errors in the sectors or memory cells and thus try to repair them. CHKDSK is a program that comes installed natively in Windows and is used in command mode to shave all kinds of drives.

Well, in this case, we need to know the letter of our damaged USB . We will only have to locate it by going to ” this computer ” and looking at the list of hard drives, the one that corresponds to it. The process does not involve the loss of data .

Now we go directly to PowerShell, or CMD as Administrator and we write the following command:

chkdsk / x / f <drive letterm>:

With this method we will try to repair the unit. If we still cannot use it, we will move on to the next method.

Solution 3: format the damaged USB.

This solution is basically what we have done in the section in which we have worked with Diskpart. So you can do it from there. If, on the other hand, it gives you respect to format the drive in command mode, we can also do it easily from the file explorer.

We go to ” this computer ” and right click on the damaged USB . At this point we will choose the option ” format … “. Beware that the process implies the loss of data .

A window like the one shown in the image will appear. In it we will have to choose the file system ( FAT32 or NTFS ) and the allocation unit size , which we can leave as it appears by default. Finally we put a name to the unit and click on ” Start “.

We will have our USB formatted and ready to use.

At this point, if you still cannot use the USB, it is probably irreversibly damaged . So it’s time to burn it or take it to specialized personnel, if your files are crucial.

You may also be interested in these articles:

Have you been able to repair damaged USB with these methods, with which of them? Otherwise leave us a comment, or tell us what you have done to make it work on your own.

Leave a Comment

Your email address will not be published. Required fields are marked *