- Connect the corrupted pen drive or SD card to your computer.
- Hover your mouse on the Start button and Right Click.
- Click Command Prompt (Admin). A CMD window will open.
- Type diskpart and press Enter.
- Type list disk and press Enter. A list of all the storage devices connected to your computer will be displayed.
- Type select disk <the number of your disk> and press Enter. (Example: select disk 1). Important: Make sure you enter the number correctly. Otherwise, you may format your internal hard drive. You can type list disk again to check whether you are going correctly. There will be a star (asterisk symbol) before the name of the selected disk.
- Type clean and press Enter.
- Type create partition primary and hit Enter.
- Type active.
- Type select partition 1.
- Type format fs=fat32 and press Enter. The format process will finish in a few minutes. You can write NTFS instead of fat32 if you want to carry files larger than 4 gigabytes. Don’t close the CMD until the work is finished.
https://www.rmprepusb.com/