1. Plug your drive into the USB port of your PC. Make sure only the damaged / corrupted SD card or USB flash drive is connected to PC and remove any other removable storage devices.
2. Then Open the Computer window and note down the drive letter. As you can see in my case it is D .
3. Press Win Key + R to open Run box and type cmd. Hit enter and Command prompt window will launch. You can directly open command prompt by using the shortcut Win key + X and choosing Command prompt.
4. Type diskpart and press enter. An warning message will show up, just click Yes and a new command prompt window will open with heading DISKPART. Now, you need to type all the commands in this window.
5. Type list disk in order to list all the disk drives connected to your System. Detect your drive by its size as one will be of huge size(your Internal hard disk) and other will be your SD card/ USB flash drive. That’s why I asked you to remove all the other drives from your system.
6. Next, you need to choose your corrupted disk drive. Perform this step very carefully because if you select the wrong disk number by mistake, it can remove all the data from your internal hard disk. Type select disk “your disk number” . As you can see, In my case it is Disk 2 of size 8 GB, so I will type select disk 2 and hit enter.
7. Next type clean and a message will displayed that Diskpart succeeded in cleaning the disk.
8. Next you need to type the command – create partition primary and hit enter. A success message will be displayed.
9. After this type active and hit enter.
10. Now you need to execute the command select partition 1.
11. Finally, we are going to format the drive with file system FAT32. So type format fs=fat32 and press enter.
12. It will start formatting your drive. It will take quite a long. Just minimize it and wait for format completion.
When the format completes (100%), close the command prompt window and go to Computer in order to check the drive. Verify your drive by copying some data in it.
By this method, you can repair your corrupted SD cards, USB flash drives and even your External hard drives. Again, after performing above steps you will lose all your previous data. So, if you have some important data in your drive, try to recover it first using hard drive recovery software. Here is the summary of all the above performed operations in order:
Hope this help you in repairing your corrupted SD card, hard drive or flash drive. Let me know whether it worked for you or not via comments.
– See more at: http://www.superpctricks.com/2014/09/repair-corrupted-raw-sd-card-usb-drive.html#sthash.ssP6W8UN.dpuf