How to fix/repair corrupted USB flash drive/Pen drive using CMD?

By Katrina | Posted to Home > Data Recovery Tips, updated on Aug.22nd, 2019

This article talks about how to fix the corrupted USB flash drives/Pen drives using CMD (command prompt), including CHKDSK and Diskpart. You can also follow the tutorial to recover lost data from corrupted USB drives with iBoysoft Data Recovery.

One of the more common computer-related issues that more and more users appear to be encountering on a regular basis is a corrupted or damaged USB flash drive. USB drives related issues like USB device not recognized may be common, but they're still incredibly annoying and can make life very difficult indeed. That's because, such media store a wide variety of different types of info on them, so keeping them in perfect working order is hugely important. With that said, however, sometimes they do wind up becoming damaged or corrupted for no apparent reasons. Does this mean that you should give up with them? Absolutely not. You can even fix a corrupted SD card or USB drive using Windows built-in tool - Command Prompt (CMD).

Let's go into detail.

What are USB flash drives?

USB flash drives, or Pen drives, thumb drives, are basically small, portable electronic devices used for storage purposes. The devices have a built-in USB type-A plug that slots directly into a USB port. These devices basically serve the same purpose as other storage media, in that they're used to store data and info and transfer it from one device to another. USB flash drives can be used to store files, like audio files, images, videos, written documents, and much more besides. Basically, if you think of them as digital filing cabinets, you're on the right track. As these things are technological, they do sometimes go wrong and damaged or corrupted USB flash drives are unfortunately quite common, such as the USB flash drive not showing up when connected to computers. Luckily, there are things you can do if you do happen to encounter any issues regarding your USB flash drive, and again, it's what we're going to be looking at for today's article.

Common problems on USB flash drives

As you now know, USB flash drives are sometimes prone to damage or corruption. Recently, we received an email from one of our users who was overcome with worry because her USB flash drive appeared to be corrupted. Take a look at what she had to say and see if any of the issues she raised in her email sound familiar to you.

"Hi, Guys, I really hope you can help me. Recently I was clearing my old computer and had stored plenty of photographs and videos to one of my USB flash drive (yes, I have 4 USB-based drives). Everything's right till this morning. I inserted the USB flash drive into my computer, only to be greeted with an error message. The message stated that 'The disk is not formatted. Do you want to format it now'? Many of the files on the drive were very important so I didn't format the USB flash drive. I'm now panicking as I really don't want to lose any of the files stored on the card. Please, guys, is there anything I can do to fix this corrupted USB flash drive, or can I just recover files from the USB drive?"

As you can see, she was quite distressed, and for good reason too. Thankfully, instead of throwing in the towel, she did reach out to us and we were able to help her retrieve all of the important images and videos of her and her family, that clearly meant so much to her.

Besides that, we have also received other USB flash drive related issues include:

  • Damaged USB flash drive;
  • USB flash drive infected with virus;
  • USB flash drive not recognised by computers;
  • USB flash drive incorrect capacity;
  • Cannot format USB flash drive, and so on.

How to fix a corrupted USB flash drive using CMD?

Now it's time for us to look at what you can do to repair a corrupted USB flash drive using CMD. There are actually a number of things you can try here, so the good news is that you do still have plenty of options.

Before we can proceed any further, we need to draw your attention to the fact that using CMD to fix corrupted USB flash drives, SD cards, or any other type of storage devices for that matter, could potentially wipe all files stored on the device in question. To avoid data loss, ensure you have a backup, or alternatively, download iBoysoft Data Recovery to ensure that data loss isn't an issue for you.

Video tutorial: How to fix corrupted USB flash drives using CMD?

Method 1: Fix corrupted/damaged USB flash drives using CHKDSK

The first CMD method we're going to look at today for repairing a USB flash drive, or an SD card, an external hard drive as well, is to utilize CHKDSK command. If you find that your USB flash drive is corrupted or damaged, the first thing you should do is utilize Windows chkdsk /f command prompt to perform a check disk error. This method could help to keep your important files intact and potentially repair a corrupted flash drive and make the files accessible once more.

However, CHKDSK may also delete files, too. So, please make sure you have a backup copy.

  1. Step 1: Begin by plugging your USB flash drive into your computer via a USB flash drive cable.
  2. Step 2: Next, make your way over to the start menu, type 'cmd' in the search bar, right click on 'cmd.exe' and then choose 'Run as Administrator.
  3. Step 3: Now, you will need to type 'chkdsk *: /f /r /x, replace * with the drive letter you wish to repair. As an example, if you wanted to repair the G drive, you would need to type in chkdsk G: /f /r /x.

Hopefully, that should then work. It is also worth noting that if it shows "Cannot open volume for direct access" when chkdsk running, chkdsk can't continue working. And CHKDSK is not available for RAW drives. If you receive a message stating something to this effect, try method 2 instead.

What is RAW file system?

RAW file system is basically a state of your chosen storage device, or the computer's hard drive, which currently has no known Windows file system such as FAT32 or NTFS. Because the file system is RAW, it basically means that you are unable to access folders or files on the drive, plus you cannot use it to store any data. Thus, to fix a device showing as Raw file system, you may need to >convert RAW to NTFS, FAT32 or any other recognizable file systems. We will tablk about it later.

Method 2: Fix corrupted/damaged USB flash drives using Diskpart

Now we're going to look at how you can repair a corrupted USB flash drive utilizing Diskpart command. If you're looking to repair a corrupted USB flash without having to reformat, utilizing Diskpart command is very effective in a lot of cases. The thing to remember here is that all data on the corrupted USB flash drive will be wiped. This basically means that if there is anything on the device that you do wish to keep, you should not go with Diskpart command. So we recommend you to use Diskpart only if you have no important files on the device in question.

Step 1: Plug in your USB flash drive to the computer.

Step 2: In the search box, type in 'Diskpart' and then right click on it and then select 'Run as Administrator'.

Step 3: Next, type 'List disk' before pressing 'Enter'. According to the list disk information, check which disk is your corrupted USB flash drive. For example, disk 2.

Note: Just remember that Diskpart is basically just like reformatting, so all data, important or otherwise, will be removed if you go with this process. So, select the wrong command can actually cause harm to your data and even your computer. This is why it's vital to ensure that you've selected the right command.

Step 4: Now, you will need to Type 'format fs=ntfs' and press enter. If you would prefer other file system formats, simply change the command ntfs to your desired one, such as FAT32, exFAT, etc.

Method 3: Fix corrupted USB drives by reformatting

Finally, we have what many people consider to be most effective solution of all. This is reformatting the corrupted USB flash drive. However, if you have tons of important files on the device, you need to firstly perform USB drive data recovery.

iBoysoft Data Recovery is a free USB drive data recovery that is able to recover lost data from corrupted/damaged USB drives, and also able to recover lost data from corrupted SD cards, hard drives, USB external hard drives, Pen drives, memory cards. What's more, it can also recover lost data from inaccessible, unrecognized, unreadable, formatted drives and deleted or lost partitions, and plenty more on top of that.

Step 1: Recover lost data from corrupted USB drives/SD cards

1. Download and install iBoysoft Data Recovery on your computer. The software is completely free to install.

2. Launch iBoysoft Data Recovery, choose the corrupted or damaged USB flash drive and click "Next". The program will then start to scan for misplaced files on the corrupted drive.

iBoysoft Data Recovery

3. During, or indeed, after the scanning process, you will have the ability to preview the scanning results and select the individual files that you want to recover.

iBoysoft Data Recovery

4. Click the "Recover" button to recover lost data from corrupted SD card.

5. Now, check to ensure that all lost data has been recovered.

Step 2: Reformat the corrupted USB drives/SD cards

After the data recovery has been completed, you should then right click the USB flash drive in My Computer/Computer/PC and select "Format" or click 'Run Disk Management' to format your drive. What's more, you can run Diskpart to format corrupted USB drive as mentioned above.

More about iBoysoft Data Recovery

There are countless examples of free data recovery pieces of software out there for you to choose from, but some are unfortunately not very reliable, nor are they that effective. Finding a reliable and trustworthy piece of free data recovery software is essential, which is why iBoysoft Data Recovery comes so very highly recommended. It is considered by a number of users to be the absolute best free data recovery software option on the market today. This software is ideal, in that it supports the recovery of the following: deleted photos, deleted videos, audio files, images, text files, and more.