In Windows 10, when you have an external storage device (such as a USB flash drive, removable hard drive, or SD card) that has stopped working as a result of data corruption or other problem, you can use the Diskpart to delete everything correctly and start a new configuration with a clean partition.
The DiskPart is a command tool that existed even before Windows 10 and allows you to use the Command Prompt to manage disks, partitions, and volumes when other tools such as Disk Management and Configuration will not work to resolve the issue.
Important: These instructions will delete everything on the drive you select, and your changes will not be undone. If the drive is still accessible, it is recommended that you create one backups of its data before continuing. If you have multiple drives connected to your device, it is recommended that you install them disconnect to avoid making the wrong choice.
1. Press Win + X at the same time and click “Command Prompt (Administrator)".
A new black command line window will open Windows 10.
3. Type the following command to display all active drives and press Enter:
4. Type the following command to select the drive you want to clean and press Enter:
select disk 0
In this command, make sure to replace 0 with the drive number you want to repair. If you do not perform this step correctly, you could remove a wrong drive. Follow his specific command Diskpart with attention.
5. Type the following command to delete everything from the drive and press Enter:
6. Type the following command to confirm that the drive is still selected and press Enter:
Note: The output must include an asterisk (*) next to the selected drive.
7. Type the following command to create a new partition and press Enter:
create partition primary
8. Type the following command to select the new primary partition and press Enter:
Select Partition 1
9. Type the following command to activate the partition and press Enter:
10. Type the following command to format the partition using the NTFS file system and set a drive label and press Enter:
format FS = NTFS label = iGuRu quick
In the command, remember to replace the data for the drive name by putting what you want to appear in File Explorer. Also the flag quick is optional to move faster format and you should not use it unless you are sure that the drive has no bad sectors. The only downside to skipping the "quick" option is that the formatting will take a long time.
11. Type the following command to assign a letter and make the drive available in File Explorer and press Enter:
assign letter = g
In the command, replace g with the letter of the drive you want to use, which is not currently assigned by another drive.
12. Enter the following command to quit Diskpart and press Enter:
13. Type the following command to close the command prompt and press Enter:
Once you have completed the steps, and as long as the drive has no hardware problem, it should be available through File Explorer and you can start saving files to it.