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

Posted by Katrina to RAW Drive Data Recovery on November 21th, 2017

Here's the tutorial about how to fix the corrupted USB flash drive or Pen drive using cmd (command prompt), such as CHKDSK and Diskpart. You can also recover data from the corrupted USB flash drive with iBoysoft Data Recovery, if necessary.

Why my USB flash drives got corrupted?

Your USB flash drives, as well as SD memory cards, Pen drives, and external hard drives, might get corrupted in two ways: the software error which can be fixed using cmd or other third-party programs, and the hardware error which is unable to be fixed on your own. What's more, USB flash drives don't last forever and they tend to get corrupted. In this article, we only focus on the software level corruption.

Some of the most common symptoms of corrupted USB flash drives.

"The disk is not formatted. Do you want to format it now?"
File or directory is corrupted and unreadable
The USB flash drive is not working, recognized, or readable when plugged into your PC.
G:\ is not accessible. Access is denied.
USB flash drive 0 bytes in used space and free space.
and so on.

Solution 1: Fix/repair corrupted USB flash drive using CMD command prompt?

CMD might not be a fool-proof solution when fixing corrupted USB flash drives, but you can give a try and it might help you fix corrupted USB flash drive. Please follow the steps carefully and type the commands exactly.

Method 1. Fix/repair corrupted USB flash drive via chkdsk /f command.

Chkdsk /f command will scan and repair for both logical errors and bad sectors. If it successfully fixes/repairs corrupted USB flash drive, your USB flash drive will be usable again and the data stored on the drive keep intact.

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

Step 2: Go to the start menu, type in "cmd" in a search bar, hit enter and then you can see something named "cmd. exe" under a list of programs.

Step 3: Right click "cmd. exe" and select "Run as Administrator".

Step 4: In command window, type in "chkdsk /X /f USB flash drive letter:" or "chkdsk USB flash drive letter: /f ", for example, "chkdsk /X /f G:" or "chkdsk G: /f" to start to repair damaged USB flash drive.

Please note that CHKDSK is not available for RAW drives. If you get such a message, move to the next method.

Method 2. Fix/repair corrupted USB flash drive with diskpart command.

If you think that the data in this USB flash drive is useless any more, what you long for is to fix RAW partition, you can use the following way:

Step 1: Type "cmd" in the search box. Right-click on it and choose "Run as administrator".

Step 2: On the Command Prompt window, type "diskpart" and press Enter.

Step 3: Type "list disk" and press Enter. According to the list disk information, check which disk is your USB flash drive.

Step 4: Type "format fs=ntfs" and press enter. If you prefer other file system formats, change the command ntfs to the desired one such as fat32, exfat, etc.

Step 5: Type "exit" and press enter to close the command window.

The diskpart commands will forcefully format your corrupted USB flash drive, which means you will lose all data on the USB flash drive. So, use this cmd command to fix corrupted USB flash drive carefully.

Solution 2: Easier way to fix corrupted USB flash drive without losing data

If you're not 100% confident with your cmd knowledge, or you have tried out the above cmd commands but failed to fix the corrupted USB flash drive, an easier way is to recover data from corrupted USB flash drive with free data recovery software, then format the drive to make it usable. iBoysoft Data Recovery is a reliable USB flash drive data recovery software for your choice.

iBoysoft Data Recovery is the best free data recovery software that can help you to recover data from corrupted USB flash drive, recover data from corrupted SD card, recover data from corrupted external hard drive, recover data from corrupted memory card, etc in Windows XP/Vista/7/8/10 and Windows Server 2016/2012/2008/2003.

What's else? iBoysoft Data Recovery can also recover deleted/lost files, recover data from formatted drive, recover data from inaccessible drive, recover data from RAW drive, recover data from deleted/lost partition, etc.

With three simple steps, you can recover data from corrupted USB flash drive.

Step 1: Free download and install iBoysoft Data Recovery on your computer.

Step 2: Launch iBoysoft Data Recovery, choose the corrupted USB flash drive and click "Next". The program will scan the USB flash drive to find your lost files.

Recover data from corrupted USB flash drive

Step 3: Choose files you want to recover, then click "Recover".

Since you've recovered your data from the corrupted USB flash drive, you can go to My Computer/Computer/PC > Disk Management to format the corrupted USB flash drive so that it can be used again.

Still have questions?